Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
 
friki data migration
Ranch Hand
Posts: 772
  • Mark post as helpful
  • send pies
  • 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
 
    Bookmark Topic Watch Topic
  • New Topic