JSTL 1.1 Configuration

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(New page: Resin 3.1.0 does NOT work out of the box with JSTL 1.1 tags and EL. Many users have reported various problems with this configuration. Here I just outline a simple set of solution steps ...)
 
m
Line 3: Line 3:
 
* Turn off fast jstl.  fast jstl processing is a Caucho feature that many users like, but that does not seem to permit JSTL 1.1 processing out of the box.  To disable it, inside your WEB-INF/web.xml file, inside the <web-app> tag, add:
 
* Turn off fast jstl.  fast jstl processing is a Caucho feature that many users like, but that does not seem to permit JSTL 1.1 processing out of the box.  To disable it, inside your WEB-INF/web.xml file, inside the <web-app> tag, add:
  
<verbatim>
+
<jsp el-ignored="false" fast-jstl="false"/>
<jsp el-ignored="false" fast-jstl="false" ignore-el-exception="false"/>
+
 
</verbatim>
+
  
 
* Put the correct JSTL libraries into your application.  You can download the JSTL 1.1 tag libraries from Jakarta.  The libraries you need are jstl.jar and standard.jar.  Put the libraries into your WEB-INF/lib directory, so they will overload the jstl-11.jar Resin 3.1 comes with.
 
* Put the correct JSTL libraries into your application.  You can download the JSTL 1.1 tag libraries from Jakarta.  The libraries you need are jstl.jar and standard.jar.  Put the libraries into your WEB-INF/lib directory, so they will overload the jstl-11.jar Resin 3.1 comes with.
Line 11: Line 10:
 
* Use the correct header to turn on JSTL.  There are two candidate headers discussed on the Internet.  The one that works with Resin is (note the "jsp"):
 
* Use the correct header to turn on JSTL.  There are two candidate headers discussed on the Internet.  The one that works with Resin is (note the "jsp"):
  
<verbatim>
 
 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</verbatim>
 
  
 
Now your application should work!
 
Now your application should work!
  
 
Note that the standard-examples that come with the jakarta taglib do not work with resin.  The problem is that resin expects a different format for the <web-app>: it does not expect the <description> tag where jakarta puts it.  I don't know whose fault this is, but Resin should probably be fixed so it works with jakarta, or lots of people will assume it's Resin's fault.
 
Note that the standard-examples that come with the jakarta taglib do not work with resin.  The problem is that resin expects a different format for the <web-app>: it does not expect the <description> tag where jakarta puts it.  I don't know whose fault this is, but Resin should probably be fixed so it works with jakarta, or lots of people will assume it's Resin's fault.

Revision as of 20:07, 22 April 2007

Resin 3.1.0 does NOT work out of the box with JSTL 1.1 tags and EL. Many users have reported various problems with this configuration. Here I just outline a simple set of solution steps that fixed the problem for me.

  • Turn off fast jstl. fast jstl processing is a Caucho feature that many users like, but that does not seem to permit JSTL 1.1 processing out of the box. To disable it, inside your WEB-INF/web.xml file, inside the <web-app> tag, add:

<jsp el-ignored="false" fast-jstl="false"/>


  • Put the correct JSTL libraries into your application. You can download the JSTL 1.1 tag libraries from Jakarta. The libraries you need are jstl.jar and standard.jar. Put the libraries into your WEB-INF/lib directory, so they will overload the jstl-11.jar Resin 3.1 comes with.
  • Use the correct header to turn on JSTL. There are two candidate headers discussed on the Internet. The one that works with Resin is (note the "jsp"):

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Now your application should work!

Note that the standard-examples that come with the jakarta taglib do not work with resin. The problem is that resin expects a different format for the <web-app>: it does not expect the <description> tag where jakarta puts it. I don't know whose fault this is, but Resin should probably be fixed so it works with jakarta, or lots of people will assume it's Resin's fault.

Personal tools