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

"Neil Griffin (Jira)" <[email protected]> Tue, 10 Sep 2019 15:18: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=3D16926=
723#comment-16926723 ]=20

Neil Griffin commented on PLUTO-781:
------------------------------------

[~riverbed2]: Thanks for the test portlet. I tried it out and was able to r=
eproduce the problem.

I could be wrong, but I don't think Pluto is doing anything wrong (isn't im=
plementing the portlet spec correctly).

One way I was able to fix the issue was to modify the TestServlet.java clas=
s to call {{include}} instead of {{forward}}:

{code:java}
    @Override
    public void service(ServletRequest request, ServletResponse response) t=
hrows ServletException, IOException {
        log.info("Servlet forwarding to /WEB-INF/jsp/resource2.jsp");
        request.getRequestDispatcher("/WEB-INF/jsp/resource2.jsp").include(=
request, response);
    }
{code}

Regarding your Spring Portlet MVC portlets, you wrote the following in the =
description field of this issue:
{quote}
This is the process used by Spring Portlet MVC to locate JSP 'views' result=
ing in the failure of all our portlets when trying to serve JSP's in respon=
se to resource requests.
{quote}

Does that mean that your Spring Portlet MVC portlets worked in Pluto at som=
e point, and then stopped working? Or does that mean that you have not been=
 able to successfully deploy a Spring Portlet MVC portlet in Pluto yet?

Regardless, I'm surprised that this is a problem with Spring Portlet MVC be=
cause we didn't run into it with any of the testing for PortletMVC4Spring. =
That might indicate a problem with your web.xml configuration or something =
like that.

When you get an opportunity, please let me know if the  com.liferay.portlet=
mvc4spring.demo.applicant.jsp.portlet-5.1.0.war artifact worked correctly i=
n your environment. When you click on the "Terms of Use" link in the lower =
right hand corner it should start dispatching to the [ViewRendererServlet|h=
ttps://github.com/liferay/portletmvc4spring/blob/master/demo/applicant-jsp-=
portlet/src/main/webapp/WEB-INF/web.xml#L8-L12] via ResourceRequest.


> 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)