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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic