[jira] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path
"Steve Potter (Jira)" <[email protected]> Wed, 11 Sep 2019 18:13: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=3D16927=
879#comment-16927879 ]=20
Steve Potter commented on PLUTO-781:
------------------------------------
We have not tried to run our Spring Portlet MVC based portlets in Pluto bef=
ore. 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 reso=
urce 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 abil=
ity to control response header fields.
I am struggling to interpret clearly Chapter 25 of the Portlet 3 spec. Howe=
ver, bits that I think are relevant are:
- 25.5 para 5 - 'When using a RequestDispatcher in a servlet that was targe=
t 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 de=
fined by the Servlet Specification must be provided for this method.'
My opinion is that the current behaviour in Pluto is not consistent with th=
is. On a practical level it seems wrong to me that a RequestDispatcher shou=
ld 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 bet=
ter 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=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)