[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17460884#comment-17460884 ] Steve Potter commented on PLUTO-781: [~ngriffin7a] - many thanks. Just what I was hoping for! > 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 > Fix For: 3.1.1 > > Attachments: pluto-debug.txt, test-portlet-mvc.zip, test-portlet.zip > > Time Spent: 10m > Remaining Estimate: 0h > > 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.20.1#820001)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17460781#comment-17460781 ] Steve Potter commented on PLUTO-781: [~ngriffin7a] , Thanks for looking at the issue. However I think the issue is at the portal level and not at the portlet level and therefore the option should be at the portal level rather than on the individual portlet. For us it means setting the same parameter on 74 portlet definitions. Steve > 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 > Fix For: 3.1.2 > > Attachments: pluto-debug.txt, test-portlet-mvc.zip, test-portlet.zip > > Time Spent: 10m > Remaining Estimate: 0h > > 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.20.1#820001)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16935839#comment-16935839 ] Steve Potter commented on PLUTO-781: Digging into the code, this looks like a known issue. In HttpServletPortletRequestWrapper method there is a brief comment '//!isForwardingPossible(); (logical, but not to spec)'. If this commented out code is actually used, the 'forward' issue is resolved. My suggestion is that an option is introduced that allows this useful behaviour to be enabled. I have proposed a PortalContext option but I do not know if this is an acceptable approach. > 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 > > Time Spent: 10m > Remaining Estimate: 0h > > 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.4#803005)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16932671#comment-16932671 ] Steve Potter commented on PLUTO-781: We are using resource requests to retrieve json documents. The json documents are actually output by a custom Spring view that is selected by the resource handler method. The json documents need to have the response content type set correctly e.g. to 'application/json' which can only be done on a 'forward', not on an 'include'. I will take a look at the Pluto source and see if I can propose a patch to address the issue. > 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.4#803005)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16931747#comment-16931747 ] Steve Potter commented on PLUTO-781: Thanks for spotting the fault in my test application. Stepping through the updated code, I can see that PortletMVC4Spring is forcing the dispatch to be an 'include' rather than a 'forward' in PortletJstlView.useInclude when the requester is Pluto, avoiding the unexpected forward behaviour. Unfortunately this is not useful for us, and we are back to the original problem of Pluto not supporting a 'forward' to a resource. > 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)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 >
[jira] [Updated] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Potter updated PLUTO-781: --- Attachment: test-portlet-mvc.zip > 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)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16927879#comment-16927879 ] Steve Potter commented on PLUTO-781: We have not tried to run our Spring Portlet MVC based portlets in Pluto before. They have however worked in Liferay in the past. In Pluto the portlets deploy fine, they just don't render the expected JSP's in response to resource requests. As we are using Spring Portlet MVC, I don't think we have any real control over the method used to dispatch to the request handler and subsequently to the view. The reason we are interested in forward is that we want the ability to control response header fields. I am struggling to interpret clearly Chapter 25 of the Portlet 3 spec. However, bits that I think are relevant are: - 25.5 para 5 - 'When using a RequestDispatcher in a servlet that was target of a forward from a portlet,..'. This seems to imply that the approach is generally supported. - The table in 25.9.2 has N/A has for the invocation of HttpServletRequest.getRequestDispatcher and according to footnote 28 'N/A indicates that such a method is not available in the portlet interface and the functionality defined by the Servlet Specification must be provided for this method.' My opinion is that the current behaviour in Pluto is not consistent with this. On a practical level it seems wrong to me that a RequestDispatcher should silently refuse to forward to a requested path and instead forward to a different path. If forward is really not valid in this flow it would be better to throw an exception. > 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.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)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16925964#comment-16925964 ] Steve Potter commented on PLUTO-781: I have attached test-portlet.zip containing the test project. I had not tried it in Pluto 2.x. However I have an old version of Pluto available (pluto-2.1.0-M3) and managed to get the test portlet deployed with some minor modifications. It exhibits the same behaviour as Pluto 3 - the tomcat log shows that the forward from the servlet is routed to the 'view' servlet instead of the expected 'resource2.jsp'. > 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.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)
[jira] [Updated] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Potter updated PLUTO-781: --- Attachment: test-portlet.zip > 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.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)
[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
[ https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16923185#comment-16923185 ] Steve Potter commented on PLUTO-781: Neil, Thanks for the rapid reply. I will try upgrading to a later version of Spring. However the log submitted is from a test configuration that does not use Spring but attempts to reproduce the flow used by Spring with a minimal resource request that forwards to a servlet which then forwards to a JSP. Is it your view that this is not a supported flow for portlet request processing? I am happy to supply the test portlet and servlet if that would help. > 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 > > > 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)
[jira] [Created] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
Steve Potter created PLUTO-781: -- Summary: 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 Attachments: pluto-debug.txt 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)