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

2019-09-17 Thread Neil Griffin (Jira)


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

Neil Griffin edited comment on PLUTO-781 at 9/17/19 9:07 PM:
-

[~riverbed2]: OK, it looks like PortletMVC4Spring is masking a bug in Pluto.

Since I currently don't have bandwidth to fix the issue, you are welcome to try 
and fix Pluto and send a pull request.

But let's first see if I can understand your necessity/requirement for calling 
{{forward}} rather than {{include}}. As I understand it, the main reason for 
calling {{forward}} rather than {{include}} is because {{forward}} will discard 
everything that has been written to the response before dispatching to the JSP. 
Is your servlet doing that? Is it writing something to the response that needs 
to be discarded?



was (Author: ngriffin7a):
[~riverbed2]: OK, it looks like PortletMVC4Spring is masking a bug in Pluto.

Since I currently don't have bandwidth to fix the issue, you are welcome to try 
and fix Pluto and send a pull request.

But let's first see if I can understand your necessity/requirement for calling 
`forward` rather than `include`. As I understand it, the main reason for 
calling `forward` rather than `include` is because `forward` will discard 
everything that has been written to the response before dispatching to the JSP. 
Is your servlet doing that? Is it writing something to the response that needs 
to be discarded?

> 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

2019-09-17 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: OK, it looks like PortletMVC4Spring is masking a bug in Pluto.

Since I currently don't have bandwidth to fix the issue, you are welcome to try 
and fix Pluto and send a pull request.

But let's first see if I can understand your necessity/requirement for calling 
`forward` rather than `include`. As I understand it, the main reason for 
calling `forward` rather than `include` is because `forward` will discard 
everything that has been written to the response before dispatching to the JSP. 
Is your servlet doing that? Is it writing something to the response that needs 
to be discarded?

> 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

2019-09-17 Thread Steve Potter (Jira)


[ 
https://issues.apache.org/jira/browse/PLUTO-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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

2019-09-17 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: In the future I recommend that you develop PortletMVC4Spring 
applications using the 
[archetypes|https://github.com/liferay/portletmvc4spring#archetypes], which 
have all this configuration correctly in place for you from the start. Kind 
Regards, Neil.

> 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

2019-09-17 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


Hi [~riverbed2],

I tried your test portlet in Pluto 3.1.0 and found that the initial main.jsp 
view wouldn't render at all.

As I looked more closely, I noticed the following in 
src/main/webapp/WEB-INF/test-portlet.xml:

{code:title=test-portlet.xml}






{code}

The problem is with the value of the {{viewClass}} attribute -- specifically, 
PortletMVC4Spring has it's own {{PortletJstlView}} class that helps with Pluto 
compatibility. When I tried the following, the portlet worked without any 
problems:

{code:title=test-portlet.xml}






{code}

For more info, [see the Javdoc comments in the source of 
PortletJstlView.java|https://github.com/liferay/portletmvc4spring/blob/master/framework/src/main/java/com/liferay/portletmvc4spring/PortletJstlView.java#L30-L36]

Kind Regards,

Neil


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