StrutsNavigationHandler act as active navigation handler even for a pure jsf
requests targetted at myfaces Navigation Handler
-----------------------------------------------------------------------------------------------------------------------------
Key: WW-2572
URL: https://issues.apache.org/struts/browse/WW-2572
Project: Struts 2
Issue Type: Bug
Components: Integration, Other
Affects Versions: 2.0.11.1
Environment: windows 2000 desktop, jdk1.5.0_10 and wintel86
Reporter: sarav
Priority: Critical
What is being attempted in the same web application (.war file)
1. set of jsf (jsp)pages processed through the struts2 and jsf (myfaces)
lifecycle as in the showcase example
2. another set of jsf (jsp) pages processed only through the pure jsf
lifecycle (myfaces impl)
configured the request pattern in the web.xml to handle pure jsf requests (with
pattern like *.jsfaces)
when requesting a page like example.jsfaces the myfaces handles upto the point
of render phase then the flow is handed over to the StrutsNavigationHandler
there by resulting in a null pointer exception for some reason, although the
faces-config.xml has the appropriate navigation rule for requests coming in
from example.jsfaces
from the log file:
2008-04-02 20:45:56,520 DEBUG
(org.apache.myfaces.application.ApplicationImpl:179) - set NavigationHandler =
org.apache.myfaces.application.NavigationHandlerImpl
2008-04-02 20:46:00,739 DEBUG
(org.apache.myfaces.application.ApplicationImpl:179) - set NavigationHandler =
org.apache.struts2.jsf.StrutsNavigationHandler
here is the stack trace:
SEVERE: Servlet.service() for servlet faces threw exception
java.lang.NullPointerException
at
org.apache.struts2.jsf.StrutsNavigationHandler.handleNavigation(StrutsNavigationHandler.java:62)
at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
at
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:330)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:84)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
looks like the above use case can not handled when there is a requirement for
pure jsf lifecycle and struts2-jsf integrated processing. is there a workaround
/configuration where both the type of requests could be processed
struts2-jsf-plugin-2.0.11.1.jar and myfaces-impl-1.1.2.jar are in the classpath
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.