incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: [trinidad] configuration: web.xml ordering
Date Tue, 19 Dec 2006 17:06:48 GMT
On 12/19/06, Renzo Tomaselli <renzo.tomaselli@tecnotp.it> 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>




>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Mime
View raw message