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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller
  • 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
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    Bookmark Topic Watch Topic
  • New Topic