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

2019-09-23 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: Thanks for investigating and reporting back. No need for a 
PortalContext option just yet. Locally, I will simply change this line:
{code:java|title=HttpServletPortletRequestWrapper.java}
isMethSpecialHandling = true;   //!isForwardingPossible(); (logical, but 
not to spec)
{code}
To this:
{code:java|title=HttpServletPortletRequestWrapper.java}
isMethSpecialHandling =!isForwardingPossible();
{code}
And then I will rebuild and run the Portlet 3.0 TCK. If all passes 100%, then 
we can simply consider this to be a bug fix.

I'll report back when I have time to try the TCK. Hopefully this week. But for 
now, it seems like you have a way to deal with this issue in your development 
environment.

Thanks again, 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
>
>  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

2019-09-23 Thread Steve Potter (Jira)


[ 
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

2019-09-18 Thread Steve Potter (Jira)


[ 
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

2019-09-17 Thread Neil Griffin (Jira)


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


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

2019-09-16 Thread Steve Potter (Jira)


[ 
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] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path

2019-09-11 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: Thanks for pointing out the parts of the Portlet 3.0 
Specification that pertain to this issue. I'll be happy to review that more 
closely after knowing the results of testing the 
com.liferay.portletmvc4spring.demo.applicant.jsp.portlet-5.1.0.war artifact in 
your Pluto environment. We tested the PortletMVC4Spring release in both Liferay 
7.x and Pluto 3.1.0.

> 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

2019-09-11 Thread Steve Potter (Jira)


[ 
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

2019-09-10 Thread Neil Griffin (Jira)


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


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

2019-09-09 Thread Steve Potter (Jira)


[ 
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] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path

2019-09-09 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: Yes, please provide a maven-based project that I could build from 
source. I'll take a look at the use-case and let you know if that is something 
that the portlet spec intends to support.

Was this a problem with Pluto 2.x? Did this only become a problem when you 
moved to Pluto 3.x? Thanks.

> 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] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path

2019-09-05 Thread Steve Potter (Jira)


[ 
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] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path

2019-09-04 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: Another reason to upgrade to PortletMVC4Spring is because the 
Spring Framework version 4.x will be unsupported by Pivotal in the near future. 
The version you specified in the "Environment" field of this issue 
(4.0.9.RELEASE) is already unsupported by Pivotal. Upgrading to Spring 5.1 
would be the recommended path. Since Spring Portlet MVC was pruned in Spring 
5.x (it no longer exists) you would need to upgrade to PortletMVC4Spring.

> 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] [Commented] (PLUTO-781) PortletRequestDispatcherImpl forwards to incorrect path

2019-09-04 Thread Neil Griffin (Jira)


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

Neil Griffin commented on PLUTO-781:


[~riverbed2]: Thanks for creating this issue. Would it be possible for you to 
upgrade one of your Spring Portlet MVC projects to 
[PortletMVC4Spring|https://github.com/liferay/portletmvc4spring]?

The PortletMVC4Spring project has been tested with Apache Pluto and is 
compatible with Portlet 3.0 (the version of the Portlet API that is implemented 
by Pluto 3.x). The project also includes a demo that uses the RESOURCE_PAHSE 
(resource requests) to navigate between JSP views, which sounds like the 
use-case you are describing. For more info, see [TermsController.java| 
https://github.com/liferay/portletmvc4spring/blob/master/demo/applicant-jsp-portlet/src/main/java/com/liferay/portletmvc4spring/demo/applicant/jsp/controller/TermsController.java]
 in the applicant-jsp-portlet demo.

In fact, I recommend that you download the 
[com.liferay.portletmvc4spring.demo.applicant.jsp.portlet-5.1.0.war| 
https://search.maven.org/search?q=applicant-jsp-portlet] artifact and copy it 
to $PLUTO_HOME/tomcat/webapps and see if you can get it working in your 
environment.

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