[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path

"Steve Potter (Jira)" <[email protected]> Mon, 16 Sep 2019 19:17:00 +0000 (UTC)
Newsgroups gmane.comp.jakarta.pluto.devel
Message-ID <[email protected]>
    [ https://issues.apache.org/jira/browse/PLUTO-781?page=3Dcom.atlassian.=
jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16930=
794#comment-16930794 ]=20

Steve Potter commented on PLUTO-781:
------------------------------------

I have added a simple test portlet based on PortletMVC4Spring that exhibits=
 the same unexpected behaviour.=C2=A0 The following is=C2=A0 an extract of =
the log from navigating to 'main.jsp' followed by a resource request that d=
ispatches to 'resource2.jsp':

16-Sep-2019 20:00:54.417 FINE [http-nio-8080-exec-8] org.springframework.we=
b.servlet.view.InternalResourceView.renderMergedOutputModel Including [/WEB=
-INF/jsp/main.jsp]
16-Sep-2019 20:00:54.430 FINE [http-nio-8080-exec-8] org.apache.jasper.serv=
let.JspServlet.service JspEngine --> /WEB-INF/jsp/main.jsp
16-Sep-2019 20:00:54.432 FINE [http-nio-8080-exec-8] org.apache.jasper.serv=
let.JspServlet.service ServletPath: /WEB-INF/servlet/view
16-Sep-2019 20:00:54.434 FINE [http-nio-8080-exec-8] org.apache.jasper.serv=
let.JspServlet.service PathInfo: null
16-Sep-2019 20:00:54.439 FINE [http-nio-8080-exec-8] org.apache.jasper.serv=
let.JspServlet.service RealPath: C:\pluto-3.0.1\webapps\test-portlet-1.0-SN=
APSHOT\WEB-INF\jsp\main.jsp
16-Sep-2019 20:00:54.440 FINE [http-nio-8080-exec-8] org.apache.jasper.serv=
let.JspServlet.service RequestURI: /test-portlet-1.0-SNAPSHOT/WEB-INF/servl=
et/view
16-Sep-2019 20:00:54.446 FINE [http-nio-8080-exec-8] org.apache.jasper.serv=
let.JspServlet.service QueryString: null
16-Sep-2019 20:00:54.468 FINE [http-nio-8080-exec-8] com.liferay.portletmvc=
4spring.FrameworkPortlet.processRequest Successfully completed request
16-Sep-2019 20:00:57.945 FINE [http-nio-8080-exec-1] com.liferay.portletmvc=
4spring.DispatcherPortlet.doResourceService DispatcherPortlet with name 'te=
st' received resource request
16-Sep-2019 20:00:57.945 FINE [http-nio-8080-exec-1] com.liferay.portletmvc=
4spring.DispatcherPortlet.getHandler Testing handler map [com.liferay.portl=
etmvc4spring.mvc.annotation.DefaultAnnotationHandlerMapping@49a3b591] in Di=
spatcherPortlet with name 'test'
16-Sep-2019 20:00:57.947 FINE [http-nio-8080-exec-1] com.liferay.portletmvc=
4spring.handler.AbstractMapBasedHandlerMapping.getHandlerInternal Key [view=
] -> handler [\{com.liferay.portletmvc4spring.mvc.annotation.DefaultAnnotat=
ionHandlerMapping$ResourceMappingPredicate@2e5ff549=3Dcom.unisys.test.portl=
et.mvc.PortletController@67c9d7b3, com.liferay.portletmvc4spring.mvc.annota=
tion.DefaultAnnotationHandlerMapping$RenderMappingPredicate@6229077e=3Dcom.=
unisys.test.portlet.mvc.PortletController@67c9d7b3}]
16-Sep-2019 20:00:57.947 FINE [http-nio-8080-exec-1] com.liferay.portletmvc=
4spring.DispatcherPortlet.getHandlerAdapter Testing handler adapter [com.li=
feray.portletmvc4spring.mvc.method.annotation.PortletRequestMappingHandlerA=
dapter@b53d9f0]
16-Sep-2019 20:00:57.949 INFO [http-nio-8080-exec-1] com.unisys.test.portle=
t.mvc.PortletController.serverResource1Jsp dispatching indirectly to resour=
ce2.jsp
16-Sep-2019 20:00:57.950 FINE [http-nio-8080-exec-1] com.liferay.portletmvc=
4spring.DispatcherPortlet.render Setting portlet response content type to v=
iew-determined type [text/html;charset=3DISO-8859-1]
16-Sep-2019 20:00:57.952 FINE [http-nio-8080-exec-1] org.springframework.we=
b.servlet.view.AbstractView.render View name 'resource2', model {}
16-Sep-2019 20:00:57.952 FINE [http-nio-8080-exec-1] org.springframework.we=
b.servlet.view.InternalResourceView.renderMergedOutputModel Forwarding to [=
/WEB-INF/jsp/resource2.jsp]
16-Sep-2019 20:00:57.953 FINE [http-nio-8080-exec-1] org.apache.jasper.serv=
let.JspServlet.service JspEngine --> /WEB-INF/servlet/view
16-Sep-2019 20:00:57.954 FINE [http-nio-8080-exec-1] org.apache.jasper.serv=
let.JspServlet.service ServletPath: /WEB-INF/servlet/view
16-Sep-2019 20:00:57.955 FINE [http-nio-8080-exec-1] org.apache.jasper.serv=
let.JspServlet.service PathInfo: null
16-Sep-2019 20:00:57.959 FINE [http-nio-8080-exec-1] org.apache.jasper.serv=
let.JspServlet.service RealPath: C:\pluto-3.0.1\webapps\test-portlet-1.0-SN=
APSHOT\WEB-INF\servlet\view
16-Sep-2019 20:00:57.960 FINE [http-nio-8080-exec-1] org.apache.jasper.serv=
let.JspServlet.service RequestURI: /test-portlet-1.0-SNAPSHOT/WEB-INF/servl=
et/view
16-Sep-2019 20:00:57.961 FINE [http-nio-8080-exec-1] org.apache.jasper.serv=
let.JspServlet.service QueryString: null
16-Sep-2019 20:00:57.966 FINE [http-nio-8080-exec-1] com.liferay.portletmvc=
4spring.FrameworkPortlet.processRequest Successfully completed request

=C2=A0

> PortletRequestDispatcherImpl forwards to incorrect path
> -------------------------------------------------------
>
>                 Key: PLUTO-781
>                 URL: https://issues.apache.org/jira/browse/PLUTO-781
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 3.0.1
>         Environment: Pluto Container 3.0.1, Spring 4.0.9.RELEASE, Wildfly=
 14.0.1
>            Reporter: Steve Potter
>            Assignee: Neil Griffin
>            Priority: Major
>         Attachments: pluto-debug.txt, test-portlet-mvc.zip, test-portlet.=
zip
>
>
> When a serveResource method forwards to a servlet which then forwards to =
a jsp, the=C2=A0 HttpServletPortletRequestWrapper provides the path from th=
e first forward rather than the second forward and the jsp is not rendered.
> This is the process used by Spring Portlet MVC to locate JSP 'views' resu=
lting in the failure of all our portlets when trying to serve JSP's in resp=
onse to resource requests.
> The attached file contains a DEBUG log of the processing flow attempting =
to serve '/WEB-INF/jsp/resource2.jsp' in response to a resource request.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)