[
http://jira.jboss.com/jira/browse/JBPORTAL-727?page=all ]
Julien Viet resolved JBPORTAL-727.
----------------------------------
Resolution: Done
We rewrote the request dispatching in 2.6 and we use a more compliant way to do it.
ClassCastException from JBoss AS Tomcat ApplicationDispatcher when
forwarding with portal provided DispatchedHttpServletRequest
-------------------------------------------------------------------------------------------------------------------------------
Key: JBPORTAL-727
URL:
http://jira.jboss.com/jira/browse/JBPORTAL-727
Project: JBoss Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Portal Core
Affects Versions: 2.2 Final
Environment: JBoss Portal 4.0.3SP1
MyFaces
Reporter: Tuomas Kiviaho
The portal.xml for reproducing the problem
<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/myservlet</value>
</init-param>
MyServlet service method
req.getRequestDispatcher("/myjsp.jsp").forward(req, resp);
The request seen below that is given to the servlet causes following exception.
java.lang.ClassCastException: org.jboss.portal.portlet.impl.DispatchedHttpServletRequest
at
org.apache.catalina.core.ApplicationDispatcher.unwrapRequest(ApplicationDispatcher.java:814)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:401)
The problem most propably relies either in Tomcat ApplicationDispatcher forwarding
mechanism since inclusion works ok, but both request and servletcontext based dispachings
using forward fail.
Couple of notes from Tomcat ApplicationDispatcher
- doubled request unwrapping when forwarding maybe due to tomcat bug fix number 30949
- wrapped request not discarded after unwrapping
These may be the real causes but this class mentions to function properly as long as
request extends the standard wrapper. This is not the case with
DispatchedHttpServletRequest.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira