tomcat-7 and reserved words in jsp's

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

tomcat-7 and reserved words in jsp's

joe carlson
Hello,

We're starting to move to tomcat-7 for our web service and ran into
something unexpected.

historyBagView.jsp was throwing JasperExceptions:

org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: ServletException in
'historyBagView.jsp': /historyBagView.jsp (line: 146, column: 18)
"${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}" contains
invalid expression(s): javax.el.ELException: Failed to parse the
expression [${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}]
Caused by: org.apache.jasper.JasperException: /historyBagView.jsp (line:
146, column: 18) "${fn:endsWith(savedBag.value.class.name,
'InterMineIdBag')}" contains invalid expression(s):
javax.el.ELException: Failed to parse the expression
[${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}]

Professor Google led me to this:

http://stackoverflow.com/questions/19116659/failed-to-parse-the-expression-mycartcontroller-cartview-retail-price-gro

and it seems that the problem is using the reserved word 'class' in the
variable savedBag.value.class.name. Changing it to
savedBag.value['class'].name fixed the problem.

What I was wondering is why has this not come up before? intermine 1.4.2
on github still has the savedBag.value.class.name syntax. Is there a
tomcat-7 setting that will be a little more permissive with reserved
words? I'm asking since I see there are other cases of jsp's with .class
fields and I'm about to change all of those - but would prefer an easier
technique if that existed.

Joe Carlson

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: tomcat-7 and reserved words in jsp's

dmgood11
see here:


Relevant section:

JAVA_OPTS="$JAVA_OPTS -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true"
export JAVA_OPTS

Tomcat 7.0 has improved the enforcement of the Expression Language rules and doesn’t allow to use java key words. The flag makes Tomcat 7 more permissive.


On Thu, Feb 5, 2015 at 5:35 PM, Joe Carlson <[hidden email]> wrote:
Hello,

We're starting to move to tomcat-7 for our web service and ran into something unexpected.

historyBagView.jsp was throwing JasperExceptions:

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in 'historyBagView.jsp': /historyBagView.jsp (line: 146, column: 18) "${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}]
Caused by: org.apache.jasper.JasperException: /historyBagView.jsp (line: 146, column: 18) "${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${fn:endsWith(savedBag.value.class.name, 'InterMineIdBag')}]

Professor Google led me to this:

http://stackoverflow.com/questions/19116659/failed-to-parse-the-expression-mycartcontroller-cartview-retail-price-gro

and it seems that the problem is using the reserved word 'class' in the variable savedBag.value.class.name. Changing it to savedBag.value['class'].name fixed the problem.

What I was wondering is why has this not come up before? intermine 1.4.2 on github still has the savedBag.value.class.name syntax. Is there a tomcat-7 setting that will be a little more permissive with reserved words? I'm asking since I see there are other cases of jsp's with .class fields and I'm about to change all of those - but would prefer an easier technique if that existed.

Joe Carlson

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev



--
David M. Goodstein, Ph.D.
Phytozome Group Lead
Eukaryotic Data Systems
Joint Genome Institute - U.S. Dept. of Energy



_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: tomcat-7 and reserved words in jsp's

joe carlson
Hello everone (else) on the dev-list.

I'm glad one of us here reads the documentation.

Joe

On 02/05/2015 05:45 PM, David Goodstein wrote:

> see here:
>
> http://intermine.readthedocs.org/en/1.1/system-requirements/software/tomcat/
>   .
>
> Relevant section:
>
> JAVA_OPTS="$JAVA_OPTS
> -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true"export JAVA_OPTS
>
>   Tomcat 7.0 has improved the enforcement of the Expression Language rules
> and doesn't allow to use java key words. The flag makes Tomcat 7 more
> permissive.
>
> On Thu, Feb 5, 2015 at 5:35 PM, Joe Carlson <[hidden email]> wrote:
>
>> Hello,
>>
>> We're starting to move to tomcat-7 for our web service and ran into
>> something unexpected.
>>
>> historyBagView.jsp was throwing JasperExceptions:
>>
>> org.apache.jasper.JasperException: javax.servlet.ServletException:
>> javax.servlet.jsp.JspException: ServletException in 'historyBagView.jsp':
>> /historyBagView.jsp (line: 146, column: 18) "${fn:endsWith(savedBag.value.
>> class.name, 'InterMineIdBag')}" contains invalid expression(s):
>> javax.el.ELException: Failed to parse the expression [${fn:endsWith(
>> savedBag.value.class.name, 'InterMineIdBag')}]
>> Caused by: org.apache.jasper.JasperException: /historyBagView.jsp (line:
>> 146, column: 18) "${fn:endsWith(savedBag.value.class.name,
>> 'InterMineIdBag')}" contains invalid expression(s): javax.el.ELException:
>> Failed to parse the expression [${fn:endsWith(savedBag.value.class.name,
>> 'InterMineIdBag')}]
>>
>> Professor Google led me to this:
>>
>> http://stackoverflow.com/questions/19116659/failed-to-
>> parse-the-expression-mycartcontroller-cartview-retail-price-gro
>>
>> and it seems that the problem is using the reserved word 'class' in the
>> variable savedBag.value.class.name. Changing it to
>> savedBag.value['class'].name fixed the problem.
>>
>> What I was wondering is why has this not come up before? intermine 1.4.2
>> on github still has the savedBag.value.class.name syntax. Is there a
>> tomcat-7 setting that will be a little more permissive with reserved words?
>> I'm asking since I see there are other cases of jsp's with .class fields
>> and I'm about to change all of those - but would prefer an easier technique
>> if that existed.
>>
>> Joe Carlson
>>
>> _______________________________________________
>> dev mailing list
>> [hidden email]
>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>>
>
>


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev