we have a web application which now needs to call methods from jsp files. We previously used Tomcat6, so we took the following steps
- migrate to Tomcat 7
- declare Servlet version 3 in web.xml
- expose the bean in our servlet.xml
Now, accessing objects with getters and setters via {$bean.object}
works fine, but method invocation via {$bean.method}
throws the following error
org.apache.jasper.JasperException: /WEB-INF/jsp/home.jspx (line: 15, column: 52) "${bean.method()}" contains invalid expression(s): de.odysseus.el.tree.TreeBuilderException: Error parsing '${bean.method()}': syntax error at position 29, encountered '(', expected '}'
I read about other people having similiar issues (for example here).
While the project depends on a multitude of external libraries, none of the metnioned servletcontainer-specific ones is in the /WEB-INF/lib
folder.
My questions are:
- How can I determine if a library is specific to an older version of Tomcat?
- Is there any other possible source for this error?