JavaServer Faces
From Resin 3.0
Line 1: | Line 1: | ||
[[Category:Third Party]] | [[Category:Third Party]] | ||
[[Category: Foo]] | [[Category: Foo]] | ||
+ | {{Cleanup}} | ||
== Sun reference implementation == | == Sun reference implementation == |
Latest revision as of 22:06, 13 December 2011
This article requires cleanup and may refer to a legacy version of Resin.
Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation. |
Contents |
Sun reference implementation
Add listener configuration to resin-web.xml
The Sun reference implementation of Java Server Faces uses a listener in a .tld file for initialization. Resin in it's default configuration does not search for tld files because of the negative impact the search has on startup times.
To use the reference implementation in Resin, configure the listener explicitly in WEB-INF/resin-web.xml:
<web-app xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core"> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> </web-app>
An alternative is to configure the JspServlet to search for .tld files at startup.
Delete WEB-INF/standard.jar
Some release of the JSF reference implementation have a standard.jar that contains invalid taglib descriptors. Resin users can delete standard.jar because Resin has it's own implementation of those tags.
Problem standard.jar files will cause Resin errors like:
com.caucho.xml.XmlParseException: jar:file:.../WEB-INF/lib/standard.jar!/META-INF/permittedTaglibs.tld:12: <jsp-version> is an unexpected tag (parent <taglib> starts at 7).
and
com.caucho.xml.XmlParseException: jar:file:.../WEB-INF/lib/standard.jar!/META-INF/scriptfree.tld:12: <jsp-version> is an unexpected tag (parent <taglib> starts at 7)
MyFaces Implementation
To use the MyFaces Implementation in Resin, configure the following listener in WEB-INF/resin-web.xml:
Add listener configuration to resin-web.xml
<web-app xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core"> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> </web-app>