JavaServer Faces

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
m (Jsf moved to JSF)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Third Party]]
 
[[Category:Third Party]]
 +
[[Category: Foo]]
 +
{{Cleanup}}
  
= Sun Reference Implementation =
+
== 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.
 
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 JSF Reference Implementation in Resin, configure the listener explicitly in [[web.xml]] or [[resin-web.xml]]:
+
To use the reference implementation in Resin, configure the listener explicitly in WEB-INF/[[resin-web.xml]]:
  
  <listener>  
+
  <web-app xmlns="http://caucho.com/ns/resin"
   <listener-class>com.sun.faces.config.ConfigureListener</listener-class>   
+
        xmlns:resin="http://caucho.com/ns/resin/core">
</listener>
+
 
 +
   <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.
 
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 =
 
= MyFaces Implementation =
  
To use the MyFaces Implementation in Resin, configure the following listener in [[web.xml]] or [[resin-web.xml]]:
+
To use the MyFaces Implementation in Resin, configure the following listener in WEB-INF/[[resin-web.xml]]:
 +
 
 +
=== Add listener configuration to resin-web.xml ===
  
  <listener>
+
  <web-app xmlns="http://caucho.com/ns/resin"
   <listener-class>net.sourceforge.myfaces.webapp.StartupServletContextListener</listener-class>
+
        xmlns:resin="http://caucho.com/ns/resin/core">
</listener>
+
   
 +
   <listener>
 +
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
 +
  </listener>
 +
 
 +
  </web-app>

Latest revision as of 22:06, 13 December 2011

40px-Edit-clear.png 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>
Personal tools