deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

mraible
I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can use Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).

Today, I discovered that I can turn off parsing of #{} by adding deferredSyntaxAllowedAsLiteral="true" to my page directive, or by adding the following to my Servlet 2.5 web.xml:

    <jsp-config>
      <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
      </jsp-property-group>
    </jsp-config>

This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This looks like a bug in Jetty 6.1. Is it?

Thanks,

Matt
Reply | Threaded
Open this post in threaded view
|

Re: deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

Jan Bartel
Matt,

In your struts-dev posting you mentioned using the el-ignored directive
in a container like glassfish. Did you perhaps also try the
deferred-syntax-allowed-as-literal in glassfish? I ask because Jetty's
jsp engine is the same as glassfish, so it would be helpful to know if
it is working there.

Also, I have to admit I'm not entirely clear on the meaning of the
deferred-syntax-allowed-as-literal as compared to the el-ignored. I've
read the spec, but obviously I need to keep reading it until it makes
sense.

:-(

regards
Jan

mraible wrote:

> I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can use
> Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).
>
> Today, I discovered that I can turn off parsing of #{} by adding
> deferredSyntaxAllowedAsLiteral="true" to my page directive, or by adding the
> following to my Servlet 2.5 web.xml:
>
>     <jsp-config>
>       <jsp-property-group>
>         <url-pattern>*.jsp</url-pattern>
>        
> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>       </jsp-property-group>
>     </jsp-config>
>
> This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This looks
> like a bug in Jetty 6.1. Is it?
>
> Thanks,
>
> Matt


--
Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

mraible
I haven't tried deferred-syntax-allowed-as-literal in GlassFish, but I have in Tomcat.

The following article seems to explain things pretty well:

http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/

Search for "backward compatibility". Basically, this directive (or web.xml entry) allows you to turn off processing of #{}.

Matt

Jan Bartel-2 wrote
Matt,

In your struts-dev posting you mentioned using the el-ignored directive
in a container like glassfish. Did you perhaps also try the
deferred-syntax-allowed-as-literal in glassfish? I ask because Jetty's
jsp engine is the same as glassfish, so it would be helpful to know if
it is working there.

Also, I have to admit I'm not entirely clear on the meaning of the
deferred-syntax-allowed-as-literal as compared to the el-ignored. I've
read the spec, but obviously I need to keep reading it until it makes
sense.

:-(

regards
Jan

mraible wrote:
> I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can use
> Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).
>
> Today, I discovered that I can turn off parsing of #{} by adding
> deferredSyntaxAllowedAsLiteral="true" to my page directive, or by adding the
> following to my Servlet 2.5 web.xml:
>
>     <jsp-config>
>       <jsp-property-group>
>         <url-pattern>*.jsp</url-pattern>
>        
> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>       </jsp-property-group>
>     </jsp-config>
>
> This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This looks
> like a bug in Jetty 6.1. Is it?
>
> Thanks,
>
> Matt


--
Jan Bartel, Webtide LLC | janb@webtide.com | http://www.webtide.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
Jetty-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

Jan Bartel
Matt,

While I look into this, it would be helpful if you could provide the error
stack trace, the generated java from the jsp and indicate whether the error
occurs when #{ appears in template text or as an attribute value or both.

thanks
Jan

mraible wrote:

> I haven't tried deferred-syntax-allowed-as-literal in GlassFish, but I have
> in Tomcat.
>
> The following article seems to explain things pretty well:
>
> http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/
>
> Search for "backward compatibility". Basically, this directive (or web.xml
> entry) allows you to turn off processing of #{}.
>
> Matt
>
>
> Jan Bartel-2 wrote:
>> Matt,
>>
>> In your struts-dev posting you mentioned using the el-ignored directive
>> in a container like glassfish. Did you perhaps also try the
>> deferred-syntax-allowed-as-literal in glassfish? I ask because Jetty's
>> jsp engine is the same as glassfish, so it would be helpful to know if
>> it is working there.
>>
>> Also, I have to admit I'm not entirely clear on the meaning of the
>> deferred-syntax-allowed-as-literal as compared to the el-ignored. I've
>> read the spec, but obviously I need to keep reading it until it makes
>> sense.
>>
>> :-(
>>
>> regards
>> Jan
>>
>> mraible wrote:
>>> I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can use
>>> Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).
>>>
>>> Today, I discovered that I can turn off parsing of #{} by adding
>>> deferredSyntaxAllowedAsLiteral="true" to my page directive, or by adding
>>> the
>>> following to my Servlet 2.5 web.xml:
>>>
>>>     <jsp-config>
>>>       <jsp-property-group>
>>>         <url-pattern>*.jsp</url-pattern>
>>>        
>>> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>>>       </jsp-property-group>
>>>     </jsp-config>
>>>
>>> This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This looks
>>> like a bug in Jetty 6.1. Is it?
>>>
>>> Thanks,
>>>
>>> Matt
>>
>> --
>> Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>> _______________________________________________
>> Jetty-support mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jetty-support
>>
>>
>


--
Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

jan_bartel
Replying to my own mail ...


Matt,

I've successfully tested this in jetty by:

1. adding the following lines to the test webapp's expr.jsp to contain this:
  <tr>
    <td>test of hash in 2.1</td>
    <td>#{ some stuff }</td>
  </tr>

2. Adding this to the test webapp's web.xml file:

      <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
       </jsp-property-group>


With the deferred-syntax-allowed-as-literal enabled, I get this on output:

test of hash in 2.1   #{ some stuff }

Without it enabled I get:

/jsp/expr.jsp(24,10) PWC6228: #{...} not allowed in a template text body.


thanks,
Jan


Jan Bartel wrote:

> Matt,
>
> While I look into this, it would be helpful if you could provide the error
> stack trace, the generated java from the jsp and indicate whether the error
> occurs when #{ appears in template text or as an attribute value or both.
>
> thanks
> Jan
>
> mraible wrote:
>> I haven't tried deferred-syntax-allowed-as-literal in GlassFish, but I have
>> in Tomcat.
>>
>> The following article seems to explain things pretty well:
>>
>> http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/
>>
>> Search for "backward compatibility". Basically, this directive (or web.xml
>> entry) allows you to turn off processing of #{}.
>>
>> Matt
>>
>>
>> Jan Bartel-2 wrote:
>>> Matt,
>>>
>>> In your struts-dev posting you mentioned using the el-ignored directive
>>> in a container like glassfish. Did you perhaps also try the
>>> deferred-syntax-allowed-as-literal in glassfish? I ask because Jetty's
>>> jsp engine is the same as glassfish, so it would be helpful to know if
>>> it is working there.
>>>
>>> Also, I have to admit I'm not entirely clear on the meaning of the
>>> deferred-syntax-allowed-as-literal as compared to the el-ignored. I've
>>> read the spec, but obviously I need to keep reading it until it makes
>>> sense.
>>>
>>> :-(
>>>
>>> regards
>>> Jan
>>>
>>> mraible wrote:
>>>> I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can use
>>>> Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).
>>>>
>>>> Today, I discovered that I can turn off parsing of #{} by adding
>>>> deferredSyntaxAllowedAsLiteral="true" to my page directive, or by adding
>>>> the
>>>> following to my Servlet 2.5 web.xml:
>>>>
>>>>     <jsp-config>
>>>>       <jsp-property-group>
>>>>         <url-pattern>*.jsp</url-pattern>
>>>>        
>>>> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>>>>       </jsp-property-group>
>>>>     </jsp-config>
>>>>
>>>> This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This looks
>>>> like a bug in Jetty 6.1. Is it?
>>>>
>>>> Thanks,
>>>>
>>>> Matt
>>> --
>>> Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems?  Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>>> _______________________________________________
>>> Jetty-support mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/jetty-support
>>>
>>>
>
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

         
2. Adding this to the test webapp's web.xml file:

      <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
       </jsp-property-group>


With the deferred-syntax-allowed-as-literal enabled, I get this on output:

test of hash in 2.1   #{ some stuff }

Without it enabled I get:

/jsp/expr.jsp(24,10) PWC6228: #{...} not allowed in a template text body.


thanks,
Jan


Jan Bartel wrote:
> Matt,
>
> While I look into this, it would be helpful if you could provide the error
> stack trace, the generated java from the jsp and indicate whether the error
> occurs when #{ appears in template text or as an attribute value or both.
>
> thanks
> Jan
>
> mraible wrote:
>> I haven't tried deferred-syntax-allowed-as-literal in GlassFish, but I have
>> in Tomcat.
>>
>> The following article seems to explain things pretty well:
>>
>> http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/
>>
>> Search for "backward compatibility". Basically, this directive (or web.xml
>> entry) allows you to turn off processing of #{}.
>>
>> Matt
>>
>>
>> Jan Bartel-2 wrote:
>>> Matt,
>>>
>>> In your struts-dev posting you mentioned using the el-ignored directive
>>> in a container like glassfish. Did you perhaps also try the
>>> deferred-syntax-allowed-as-literal in glassfish? I ask because Jetty's
>>> jsp engine is the same as glassfish, so it would be helpful to know if
>>> it is working there.
>>>
>>> Also, I have to admit I'm not entirely clear on the meaning of the
>>> deferred-syntax-allowed-as-literal as compared to the el-ignored. I've
>>> read the spec, but obviously I need to keep reading it until it makes
>>> sense.
>>>
>>> :-(
>>>
>>> regards
>>> Jan
>>>
>>> mraible wrote:
>>>> I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can use
>>>> Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).
>>>>
>>>> Today, I discovered that I can turn off parsing of #{} by adding
>>>> deferredSyntaxAllowedAsLiteral="true" to my page directive, or by adding
>>>> the
>>>> following to my Servlet 2.5 web.xml:
>>>>
>>>>     <jsp-config>
>>>>       <jsp-property-group>
>>>>         <url-pattern>*.jsp</url-pattern>
>>>>        
>>>> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>>>>       </jsp-property-group>
>>>>     </jsp-config>
>>>>
>>>> This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This looks
>>>> like a bug in Jetty 6.1. Is it?
>>>>
>>>> Thanks,
>>>>
>>>> Matt
>>> --
>>> Jan Bartel, Webtide LLC | janb@webtide.com | http://www.webtide.com
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems?  Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>>> _______________________________________________
>>> Jetty-support mailing list
>>> Jetty-support@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jetty-support
>>>
>>>
>
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
Jetty-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support
mraible
Are you saying that you're unable to reproduce this issue? If so, what version of Jetty are you using? I can try to reproduce it on my end and post a zip for downloading if you like.

Matt

Jan Bartel wrote
Replying to my own mail ...


Matt,

I've successfully tested this in jetty by:

1. adding the following lines to the test webapp's expr.jsp to contain this:
 
test of hash in 2.1#{ some stuff }
Reply | Threaded
Open this post in threaded view
|

Re: deferredSyntaxAllowedAsLiteral doesn't seem to work in Jetty 6.1.5

Jan Bartel
Matt,

I mean I have been unable to reproduce this problem. I'm using jetty 6.1.5
and jdk1.5-09 on ubuntu linux.

regards
Jan.

mraible wrote:

> Are you saying that you're unable to reproduce this issue? If so, what
> version of Jetty are you using? I can try to reproduce it on my end and post
> a zip for downloading if you like.
>
> Matt
>
>
> Jan Bartel wrote:
>> Replying to my own mail ...
>>
>>
>> Matt,
>>
>> I've successfully tested this in jetty by:
>>
>> 1. adding the following lines to the test webapp's expr.jsp to contain
>> this:
>>   <tr>
>>     <td>test of hash in 2.1</td>
>>     <td>#{ some stuff }</td>
>>   </tr>
>>
>> 2. Adding this to the test webapp's web.xml file:
>>
>>       <jsp-property-group>
>>         <url-pattern>*.jsp</url-pattern>
>>        
>> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>>        </jsp-property-group>
>>
>>
>> With the deferred-syntax-allowed-as-literal enabled, I get this on output:
>>
>> test of hash in 2.1   #{ some stuff }
>>
>> Without it enabled I get:
>>
>> /jsp/expr.jsp(24,10) PWC6228: #{...} not allowed in a template text body.
>>
>>
>> thanks,
>> Jan
>>
>>
>> Jan Bartel wrote:
>>> Matt,
>>>
>>> While I look into this, it would be helpful if you could provide the
>>> error
>>> stack trace, the generated java from the jsp and indicate whether the
>>> error
>>> occurs when #{ appears in template text or as an attribute value or both.
>>>
>>> thanks
>>> Jan
>>>
>>> mraible wrote:
>>>> I haven't tried deferred-syntax-allowed-as-literal in GlassFish, but I
>>>> have
>>>> in Tomcat.
>>>>
>>>> The following article seems to explain things pretty well:
>>>>
>>>> http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/
>>>>
>>>> Search for "backward compatibility". Basically, this directive (or
>>>> web.xml
>>>> entry) allows you to turn off processing of #{}.
>>>>
>>>> Matt
>>>>
>>>>
>>>> Jan Bartel-2 wrote:
>>>>> Matt,
>>>>>
>>>>> In your struts-dev posting you mentioned using the el-ignored directive
>>>>> in a container like glassfish. Did you perhaps also try the
>>>>> deferred-syntax-allowed-as-literal in glassfish? I ask because Jetty's
>>>>> jsp engine is the same as glassfish, so it would be helpful to know if
>>>>> it is working there.
>>>>>
>>>>> Also, I have to admit I'm not entirely clear on the meaning of the
>>>>> deferred-syntax-allowed-as-literal as compared to the el-ignored. I've
>>>>> read the spec, but obviously I need to keep reading it until it makes
>>>>> sense.
>>>>>
>>>>> :-(
>>>>>
>>>>> regards
>>>>> Jan
>>>>>
>>>>> mraible wrote:
>>>>>> I'm trying to turn off parsing of #{} in Jetty 6 / JSP 2.1 so I can
>>>>>> use
>>>>>> Struts 2 and its OGNL expressions (http://tinyurl.com/ynunts).
>>>>>>
>>>>>> Today, I discovered that I can turn off parsing of #{} by adding
>>>>>> deferredSyntaxAllowedAsLiteral="true" to my page directive, or by
>>>>>> adding
>>>>>> the
>>>>>> following to my Servlet 2.5 web.xml:
>>>>>>
>>>>>>     <jsp-config>
>>>>>>       <jsp-property-group>
>>>>>>         <url-pattern>*.jsp</url-pattern>
>>>>>>        
>>>>>> <deferred-syntax-allowed-as-literal>true</deferred-syntax-allowed-as-literal>
>>>>>>       </jsp-property-group>
>>>>>>     </jsp-config>
>>>>>>
>>>>>> This works on Tomcat 6.0.13, but doesn't work on Jetty 6.1.5. This
>>>>>> looks
>>>>>> like a bug in Jetty 6.1. Is it?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Matt
>>>>> --
>>>>> Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> This SF.net email is sponsored by: Splunk Inc.
>>>>> Still grepping through log files to find problems?  Stop.
>>>>> Now Search log events and configuration files using AJAX and a browser.
>>>>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>>>>> _______________________________________________
>>>>> Jetty-support mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/jetty-support
>>>>>
>>>>>
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>> _______________________________________________
>> Jetty-support mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jetty-support
>>
>>
>


--
Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support