|
|
|
Hi,
I'm using Tomcat 5.0.28 with all MyFaces version from 1.1.1. Make sure that you have the filter set up properly in your web.xml: <filter> <filter-name>sitemesh</filter-name> <filter-class>net.climbingrose.sitemesh.filter.SMInitFilter</filter-class> </filter> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Hi,
thanks, problem solved. Have you got this working with subviews? This is the main problem we have with sitemesh + jsf, you can only decorate one view, or several views if only one of them contains any form-encapsulated tags. Example decorator: <div id="pageHeader"> <decorator:getProperty property="page.header"/> <page:applyDecorator page="/header.jsp" name="panel" title="header"> </div> <div id="pageBody"> <decorator:body /> </div> If I have some commandLinks or other JSF components that needs to be encapsulated in a :form in header.jsp, these will be decorated, but they will not submit correctly, and just refresh the current view. It seems like noone have managed to solve this problem, yet. hi
does any one come to a complete solution for Sitemesh and JSF ? i am really stucked with sitemesh and JSF , i remember that Struts and SiteMEsh was charming and now i am dead with making it work with jsf. one big problem is that i can not compile the code that user provided here , it sayd that i can not find Factory class , by the way do you get it fully working at Jomar ? It doesn't look this one works with Facelets since Facelets has it's own ViewHandler. Any idea how hard it would be to make it Facelets-friendly?
Thanks, Matt I was able to get this working with MyFaces 1.1.5, Tomcat 5.5.9, and the Sitemesh 2.3 jar.
I followed the instructions and it worked first time. Should add this to the Sitemesh 2.3 jar and add it to the documentation. It took me forever to find this and Sitmesh 2.3 jar wasn't even on the OpenSymphony website yet. Shawn | ||||||||||||||||||||||||||||||||||||||
I get this nullpointerexception trying out this on tomcat 5.5:
2006-03-07 23:09:54,453 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/test].[Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at net.climbingrose.sitemesh.jsf.SMViewHandlerImp.renderView(SMViewHandlerImp.java:110)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:79)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:143)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
it seems like the initSMFactory dont inialize the factory.