Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • paul wheaton
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • Himai Minh
Bartenders:
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
EL or JSTL Not Working As Expected

One of the most common causes of problems with the EL and JSTL is a configuration mismatch between the version of JSP that you are using, the version of the JSTL that you employ, and how you have declared your web application in the deployment descriptor (web.xml).

For a JSP 2.1 container (such as Tomcat 6), you should be using JSTL 1.2, and you should have your web application declared as a Servlets 2.5 web app by using the Servlets 2.5 XML Schema.

For a JSP 2.0 container (such as Tomcat 5), you should be using JSTL 1.1, and you should have your web application declared as a Servlets 2.4 web app by using the Servlets 2.4 XML Schema.

For a JSP 1.x container (such as Tomcat 4), you should be using JSTL 1.0, and you should have your web application declared as a Servlets 2.3 web app by using the Servlets 2.3 DOCTYPE.

See ServletsWebXml for information on declaring the deployment descriptor properly. Note: even though you can use the Servlets 2.3 DOCTYPE with a JSP 2.0 container, this will put the container into "compatibility mode" and the the EL will be disabled on the JSP pages.

See JstlTagLibDefinitions and SetupJstlForJsp2 for information on obtaining and declaring the correct JSTL version.


JspFaq
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
    Bookmark Topic Watch Topic
  • New Topic