Matthias, your web.xml is quite similar to mine (actual
working case).
What I did first - was simply to cut & paste from the wiki page all
Trinidad stuff, appending it to the end of web.xml.
This appeared to be a logical choice. It didn't work.
Then from an old post I discovered that I had to comment out the
<view-handler> line from faces-config.xml (it was there from
Facelets installation). I didn't work either.
Then by accident I moved pasted stuff at the beginning of web.xml. It
worked (well, it started, there are a number of pending failures to be
discovered yet).
Just to avoid someone else to waste time through the same sequence,
although I did not understand why.
Thanks -- Renzo
Matthias Wessendorf wrote:
On 12/19/06, Renzo Tomaselli
<[EMAIL PROTECTED]> wrote:
Hi, for the purpose of softly switching to Trinidad, I just
reconfigured an
existing application - Tomahawk & Facelets based - to be
Trinidad-ready. I
did this by adding proper entries to web.xml and faces-config.xml, then
adding the latest jar pairs for Trinidad. No source modifications.
I was fairly surprised to notice that result depends on element
ordering
within web.xml.
Specifically, if appending all new Trinidad stuff at the end, then I
get an
error at application startup: no Trinidad filter was found, and no
rendering
context as well.
I am not really sure, but I think there is something in the servlet
spec
whichs says that some elements have to be in a proper order...
(at least I saw a "warning" in eclipse's wtp web.xml editor)
After moving all to the beginning,
application starts, although several
things do not work as before: I still have to investigate further, but
first
I'd like to collect a few comments about the ordering topic, since I
neve
saw it on any document - either Trinidad or Facelets based.
Thanks -- Renzo
here is my trinidad, tomahawk and facelets web.xml:
<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<context-param>
<param-name>org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<!-- Use Documents Saved as *.xhtml -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<!--context-param>
<param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
<param-value>all</param-value>
</context-param-->
<context-param>
<param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
<param-value>session</param-value>
</context-param>
<filter>
<filter-name>trinidad</filter-name>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
</filter>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>trinidad</filter-name>
<servlet-name>faces</servlet-name>
</filter-mapping>
<!-- extension mapping for adding <script/>, <link/>,
and other
resource tags to JSF-pages -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry -->
<servlet-name>faces</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources
(_javascript_, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<!-- Listener, to allow Jetty serving MyFaces apps -->
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<!-- resource loader servlet -->
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
</servlet>
<!-- Faces Servlet Mappings -->
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>
<!-- Welcome Files -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
|