Hi,

I got expirences with SiteMesh and Myfaces – it can be integrated. But you need to be careful when setting SiteMesh up!

It is important that the SiteMesh filter is first in the web.xml

And then the Extension filter for myfaces can be registered. This is because of the filter chain (you know the cycle?)!

 

See the example below…

 

 

                      <filter>

                          <filter-name>sitemesh</filter-name>

                          <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>

                      </filter>

                     

                      <filter-mapping>

                          <filter-name>sitemesh</filter-name>

                          <url-pattern>/*</url-pattern>

                      </filter-mapping>

                     

                      <error-page>

                                            <exception-type>java.lang.Throwable</exception-type>

                                            <location>/errors/index.jsp</location>

                      </error-page>

                     

                      <context-param>

                                            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                                            <param-value>client</param-value>

                      </context-param>

                      <context-param>

                                            <param-name>javax.faces.application.CONFIG_FILES</param-name>

                                            <param-value>/WEB-INF/faces-config.xml</param-value>

                      </context-param>

                      <!--  Faces Servlet -->

                      <servlet>

                                            <servlet-name>Faces Servlet</servlet-name>

                                            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

                                            <load-on-startup>1</load-on-startup>

                      </servlet>

                      <!--  Faces Servlet Mapping -->

                      <servlet-mapping>

                                            <servlet-name>Faces Servlet</servlet-name>

                                            <url-pattern>*.faces</url-pattern>

                      </servlet-mapping>

                      <servlet-mapping>

                                            <servlet-name>Faces Servlet</servlet-name>

                                            <url-pattern>/faces/*</url-pattern>

                      </servlet-mapping>

                      <!-- Listener, that does all the startup work (configuration, init). -->

                      <listener>

                                            <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>

                      </listener>

                     

                      <filter>

                      <filter-name>ExtensionsFilter</filter-name>

                                            <filter-class>

                                                                 org.apache.myfaces.component.html.util.ExtensionsFilter

                                            </filter-class>

                                            <init-param>

                                                                 <param-name>uploadMaxFileSize</param-name>

                                                                 <param-value>10m</param-value>

                                            </init-param>

                                            <init-param>

                                                                  <param-name>uploadThresholdSize</param-name>

                                                                 <param-value>100k</param-value>

                                            </init-param>

                      </filter>

                      <filter-mapping>

                                            <filter-name>ExtensionsFilter</filter-name>

                                            <servlet-name>Faces Servlet</servlet-name>

                      </filter-mapping>

 

 

 

 


Fra: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sendt: 18. november 2005 17:56
Til: MyFaces Discussion
Emne: Re: LayoutManager for JSF / Myfaces

 

Hello,

    well, i am trying to move away from declaring tld files.. and althought it's not a problem, i want

to avoid to include the struts.jar just to use tiles

i tried to use only tiles.jar, but i was not able to find any tiles.jar that contains TilesServlet......

 

thanx for comments

regards

 marco



 

On 11/18/05, Julián García <[EMAIL PROTECTED]> wrote:

I am also using tiles. Why do you want to move?
Although I do not use it, I think SiteMesh would be worth a try....do
not know how to integrate that with MyFaces...
http://www.opensymphony.com/sitemesh/

Marco Mistroni wrote:
> hello all,
>  i was wondering if any of you guys are using any particular LayoutManager
> toggether with JSF..
>  i am using Tiles, but i wanted to move away and try to use something
> else...
>  what layoutmanager / template mechanism are you using? any particular
> suggestions?
>  thanks in advance and regards
> marco
>

 

Reply via email to