[ 
https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16926723#comment-16926723
 ] 

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

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

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

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

{code:java}
    @Override
    public void service(ServletRequest request, ServletResponse response) 
throws 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' resulting 
in the failure of all our portlets when trying to serve JSP's in response to 
resource requests.
{quote}

Does that mean that your Spring Portlet MVC portlets worked in Pluto at some 
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 
because 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.portletmvc4spring.demo.applicant.jsp.portlet-5.1.0.war artifact 
worked correctly in your environment. When you click on the "Terms of Use" link 
in the lower right hand corner it should start dispatching to the 
[ViewRendererServlet|https://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Ā  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)

Reply via email to