incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renzo Tomaselli <renzo.tomase...@tecnotp.it>
Subject Re: [trinidad] configuration: web.xml ordering
Date Wed, 20 Dec 2006 09:40:22 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1">Matthias, your web.xml is quite similar to mine (actual
working case).<br>
What I did first - was simply to cut &amp; paste from the wiki page all
Trinidad stuff, appending it to the end of web.xml.<br>
This appeared to be a logical choice. It didn't work.<br>
Then from an old post&nbsp; I discovered that I had to comment out the
&lt;view-handler&gt; line from faces-config.xml (it was there from
Facelets installation). I didn't work either.<br>
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).<br>
Just to avoid someone else to waste time through the same sequence,
although I did not understand why.<br>
<br>
Thanks -- Renzo<br>
<br>
</font><br>
Matthias Wessendorf wrote:
<blockquote
 cite="mid71235db40612190906v2622e6fqa711156feb50b711@mail.gmail.com"
 type="cite">On 12/19/06, Renzo Tomaselli
<a class="moz-txt-link-rfc2396E" href="mailto:renzo.tomaselli@tecnotp.it">&lt;renzo.tomaselli@tecnotp.it&gt;</a>
wrote:
  <br>
  <blockquote type="cite"><br>
&nbsp;Hi, for the purpose of softly switching to Trinidad, I just
reconfigured an
    <br>
existing application - Tomahawk &amp; Facelets based - to be
Trinidad-ready. I
    <br>
did this by adding proper entries to web.xml and faces-config.xml, then
    <br>
adding the latest jar pairs for Trinidad. No source modifications.
    <br>
&nbsp;I was fairly surprised to notice that result depends on element
ordering
    <br>
within web.xml.
    <br>
&nbsp;Specifically, if appending all new Trinidad stuff at the end, then I
get an
    <br>
error at application startup: no Trinidad filter was found, and no
rendering
    <br>
context as well.
    <br>
  </blockquote>
  <br>
I am not really sure, but I think there is something in the servlet
spec
  <br>
whichs says that some elements have to be in a proper order...
  <br>
(at least I saw a "warning" in eclipse's wtp web.xml editor)
  <br>
  <br>
  <blockquote type="cite">&nbsp;After moving all to the beginning,
application starts, although several
    <br>
things do not work as before: I still have to investigate further, but
first
    <br>
I'd like to collect a few comments about the ordering topic, since I
neve
    <br>
saw it on any document - either Trinidad or Facelets based.
    <br>
&nbsp;Thanks -- Renzo
    <br>
  </blockquote>
  <br>
here is my trinidad, tomahawk and facelets web.xml:
  <br>
  <br>
&lt;?xml version = '1.0' encoding = 'ISO-8859-1'?&gt;
  <br>
&lt;web-app xmlns=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/xml/ns/j2ee">"http://java.sun.com/xml/ns/j2ee"</a>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:xsi=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xsi:schemaLocation="<a
class="moz-txt-link-freetext" href="http://java.sun.com/xml/ns/j2ee">http://java.sun.com/xml/ns/j2ee</a>
  <br>
<a class="moz-txt-link-freetext" href="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd</a>"
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version="2.4"&gt;
  <br>
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&nbsp;&lt;param-name&gt;org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION&lt;/param-name&gt;
  <br>
&nbsp;&lt;param-value&gt;true&lt;/param-value&gt;
  <br>
&lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&nbsp;&nbsp;
&lt;param-name&gt;org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER&lt;/param-name&gt;
  <br>
&nbsp;&nbsp;
&lt;param-value&gt;com.sun.facelets.FaceletViewHandler&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;!-- Use Documents Saved as *.xhtml --&gt;
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&nbsp;&nbsp; &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;
  <br>
&nbsp;&nbsp; &lt;param-value&gt;.xhtml&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param&gt;
  <br>
  <br>
&nbsp; &lt;context-param&gt;
  <br>
&nbsp; &lt;param-name&gt;facelets.LIBRARIES&lt;/param-name&gt;
  <br>
&nbsp; &lt;param-value&gt;/WEB-INF/tomahawk.taglib.xml&lt;/param-value&gt;
  <br>
&nbsp;&nbsp; &lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&nbsp;&nbsp; &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
  <br>
&nbsp;&nbsp; &lt;param-value&gt;client&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;!--context-param&gt;
  <br>
&nbsp;&nbsp;
&lt;param-name&gt;org.apache.myfaces.trinidad.CLIENT_STATE_METHOD&lt;/param-name&gt;
  <br>
&nbsp;&nbsp; &lt;param-value&gt;all&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param--&gt;
  <br>
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&lt;param-name&gt;org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE&lt;/param-name&gt;
  <br>
&nbsp;&nbsp; &lt;param-value&gt;false&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&nbsp;&nbsp;
&lt;param-name&gt;org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION&lt;/param-name&gt;
  <br>
&nbsp;&nbsp; &lt;param-value&gt;true&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;context-param&gt;
  <br>
&nbsp;&nbsp;
&lt;param-name&gt;org.apache.myfaces.trinidad.CHANGE_PERSISTENCE&lt;/param-name&gt;
  <br>
&nbsp;&nbsp; &lt;param-value&gt;session&lt;/param-value&gt;
  <br>
&nbsp;&lt;/context-param&gt;
  <br>
  <br>
&nbsp;&lt;filter&gt;
  <br>
&nbsp;&nbsp; &lt;filter-name&gt;trinidad&lt;/filter-name&gt;
  <br>
&nbsp;&nbsp;
&lt;filter-class&gt;org.apache.myfaces.trinidad.webapp.TrinidadFilter&lt;/filter-class&gt;
  <br>
&nbsp;&lt;/filter&gt;
  <br>
  <br>
&nbsp;&lt;filter&gt;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;maxFileSize&lt;/param-name&gt;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;20m&lt;/param-value&gt;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;
  <br>
&nbsp;&lt;/filter&gt;
  <br>
  <br>
&nbsp;&lt;filter-mapping&gt;
  <br>
&nbsp;&nbsp; &lt;filter-name&gt;trinidad&lt;/filter-name&gt;
  <br>
&nbsp;&nbsp; &lt;servlet-name&gt;faces&lt;/servlet-name&gt;
  <br>
&nbsp;&lt;/filter-mapping&gt;
  <br>
  <br>
&lt;!-- extension mapping for adding &lt;script/&gt;, &lt;link/&gt;,
and other
  <br>
resource tags to JSF-pages&nbsp; --&gt;
  <br>
&nbsp;&lt;filter-mapping&gt;
  <br>
&nbsp;&nbsp; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;
  <br>
&nbsp;&nbsp; &lt;!-- servlet-name must match the name of your
  <br>
javax.faces.webapp.FacesServlet entry --&gt;
  <br>
&nbsp;&nbsp; &lt;servlet-name&gt;faces&lt;/servlet-name&gt;
  <br>
&nbsp;&lt;/filter-mapping&gt;
  <br>
  <br>
&nbsp;&lt;!-- extension mapping for serving page-independent resources
  <br>
(javascript, stylesheets, images, etc.)&nbsp; --&gt;
  <br>
&nbsp;&lt;filter-mapping&gt;
  <br>
&nbsp;&nbsp; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;
  <br>
&nbsp;&nbsp;
&lt;url-pattern&gt;/faces/myFacesExtensionResource/*&lt;/url-pattern&gt;
  <br>
&nbsp;&lt;/filter-mapping&gt;
  <br>
  <br>
&nbsp;&lt;!-- Listener, to allow Jetty serving MyFaces apps --&gt;
  <br>
&nbsp;&lt;listener&gt;
  <br>
&nbsp;&nbsp;
&lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt;
  <br>
&nbsp;&lt;/listener&gt;
  <br>
  <br>
&nbsp;&lt;!-- Faces Servlet --&gt;
  <br>
&nbsp;&lt;servlet&gt;
  <br>
&nbsp;&nbsp; &lt;servlet-name&gt;faces&lt;/servlet-name&gt;
  <br>
&nbsp;&nbsp;
&lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
  <br>
&nbsp;&lt;/servlet&gt;
  <br>
  <br>
&nbsp;&lt;!-- resource loader servlet --&gt;
  <br>
&nbsp;&lt;servlet&gt;
  <br>
&nbsp;&nbsp; &lt;servlet-name&gt;resources&lt;/servlet-name&gt;
  <br>
&nbsp;&nbsp;
&lt;servlet-class&gt;org.apache.myfaces.trinidad.webapp.ResourceServlet&lt;/servlet-class&gt;
  <br>
&nbsp;&lt;/servlet&gt;
  <br>
  <br>
&nbsp;&lt;!-- Faces Servlet Mappings --&gt;
  <br>
&nbsp;&lt;servlet-mapping&gt;
  <br>
&nbsp;&nbsp; &lt;servlet-name&gt;faces&lt;/servlet-name&gt;
  <br>
&nbsp;&nbsp; &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
  <br>
&nbsp;&lt;/servlet-mapping&gt;
  <br>
  <br>
&nbsp;&lt;servlet-mapping&gt;
  <br>
&nbsp;&nbsp; &lt;servlet-name&gt;resources&lt;/servlet-name&gt;
  <br>
&nbsp;&nbsp; &lt;url-pattern&gt;/adf/*&lt;/url-pattern&gt;
  <br>
&nbsp;&lt;/servlet-mapping&gt;
  <br>
  <br>
  <br>
&nbsp;&lt;!-- Welcome Files --&gt;
  <br>
&nbsp;&lt;welcome-file-list&gt;
  <br>
&nbsp;&nbsp; &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
  <br>
&nbsp;&lt;/welcome-file-list&gt;
  <br>
  <br>
&lt;/web-app&gt;
  <br>
  <br>
  <br>
  <br>
  <br>
  <blockquote type="cite"><br>
    <br>
  </blockquote>
  <br>
  <br>
</blockquote>
</body>
</html>

Mime
View raw message