[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930794#comment-16930794 ]
Steve Potter commented on PLUTO-781: ------------------------------------ I have added a simple test portlet based on PortletMVC4Spring that exhibits the same unexpected behaviour. The following is an extract of the log from navigating to 'main.jsp' followed by a resource request that dispatches to 'resource2.jsp': 16-Sep-2019 20:00:54.417 FINE [http-nio-8080-exec-8] org.springframework.web.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.servlet.JspServlet.service JspEngine --> /WEB-INF/jsp/main.jsp 16-Sep-2019 20:00:54.432 FINE [http-nio-8080-exec-8] org.apache.jasper.servlet.JspServlet.service ServletPath: /WEB-INF/servlet/view 16-Sep-2019 20:00:54.434 FINE [http-nio-8080-exec-8] org.apache.jasper.servlet.JspServlet.service PathInfo: null 16-Sep-2019 20:00:54.439 FINE [http-nio-8080-exec-8] org.apache.jasper.servlet.JspServlet.service RealPath: C:\pluto-3.0.1\webapps\test-portlet-1.0-SNAPSHOT\WEB-INF\jsp\main.jsp 16-Sep-2019 20:00:54.440 FINE [http-nio-8080-exec-8] org.apache.jasper.servlet.JspServlet.service RequestURI: /test-portlet-1.0-SNAPSHOT/WEB-INF/servlet/view 16-Sep-2019 20:00:54.446 FINE [http-nio-8080-exec-8] org.apache.jasper.servlet.JspServlet.service QueryString: null 16-Sep-2019 20:00:54.468 FINE [http-nio-8080-exec-8] com.liferay.portletmvc4spring.FrameworkPortlet.processRequest Successfully completed request 16-Sep-2019 20:00:57.945 FINE [http-nio-8080-exec-1] com.liferay.portletmvc4spring.DispatcherPortlet.doResourceService DispatcherPortlet with name 'test' received resource request 16-Sep-2019 20:00:57.945 FINE [http-nio-8080-exec-1] com.liferay.portletmvc4spring.DispatcherPortlet.getHandler Testing handler map [com.liferay.portletmvc4spring.mvc.annotation.DefaultAnnotationHandlerMapping@49a3b591] in DispatcherPortlet with name 'test' 16-Sep-2019 20:00:57.947 FINE [http-nio-8080-exec-1] com.liferay.portletmvc4spring.handler.AbstractMapBasedHandlerMapping.getHandlerInternal Key [view] -> handler [\{com.liferay.portletmvc4spring.mvc.annotation.DefaultAnnotationHandlerMapping$ResourceMappingPredicate@2e5ff549=com.unisys.test.portlet.mvc.PortletController@67c9d7b3, com.liferay.portletmvc4spring.mvc.annotation.DefaultAnnotationHandlerMapping$RenderMappingPredicate@6229077e=com.unisys.test.portlet.mvc.PortletController@67c9d7b3}] 16-Sep-2019 20:00:57.947 FINE [http-nio-8080-exec-1] com.liferay.portletmvc4spring.DispatcherPortlet.getHandlerAdapter Testing handler adapter [com.liferay.portletmvc4spring.mvc.method.annotation.PortletRequestMappingHandlerAdapter@b53d9f0] 16-Sep-2019 20:00:57.949 INFO [http-nio-8080-exec-1] com.unisys.test.portlet.mvc.PortletController.serverResource1Jsp dispatching indirectly to resource2.jsp 16-Sep-2019 20:00:57.950 FINE [http-nio-8080-exec-1] com.liferay.portletmvc4spring.DispatcherPortlet.render Setting portlet response content type to view-determined type [text/html;charset=ISO-8859-1] 16-Sep-2019 20:00:57.952 FINE [http-nio-8080-exec-1] org.springframework.web.servlet.view.AbstractView.render View name 'resource2', model {} 16-Sep-2019 20:00:57.952 FINE [http-nio-8080-exec-1] org.springframework.web.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.servlet.JspServlet.service JspEngine --> /WEB-INF/servlet/view 16-Sep-2019 20:00:57.954 FINE [http-nio-8080-exec-1] org.apache.jasper.servlet.JspServlet.service ServletPath: /WEB-INF/servlet/view 16-Sep-2019 20:00:57.955 FINE [http-nio-8080-exec-1] org.apache.jasper.servlet.JspServlet.service PathInfo: null 16-Sep-2019 20:00:57.959 FINE [http-nio-8080-exec-1] org.apache.jasper.servlet.JspServlet.service RealPath: C:\pluto-3.0.1\webapps\test-portlet-1.0-SNAPSHOT\WEB-INF\servlet\view 16-Sep-2019 20:00:57.960 FINE [http-nio-8080-exec-1] org.apache.jasper.servlet.JspServlet.service RequestURI: /test-portlet-1.0-SNAPSHOT/WEB-INF/servlet/view 16-Sep-2019 20:00:57.961 FINE [http-nio-8080-exec-1] org.apache.jasper.servlet.JspServlet.service QueryString: null 16-Sep-2019 20:00:57.966 FINE [http-nio-8080-exec-1] com.liferay.portletmvc4spring.FrameworkPortlet.processRequest Successfully completed request > 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 HttpServletPortletRequestWrapper provides the path from the 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' > resulting in the failure of all our portlets when trying to serve JSP's in > response 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)