Infinite invocation when a view page of a portlet tries to include some result
from other servlet path.
-------------------------------------------------------------------------------------------------------
Key: PLUTO-554
URL: https://issues.apache.org/jira/browse/PLUTO-554
Project: Pluto
Issue Type: Bug
Affects Versions: 2.0.0
Reporter: Woonsan Ko
Assignee: Woonsan Ko
Fix For: 2.0.0
If a dispatched page from a portlet to render itself tries to include other
page, then the original page is being invoked infinitely.
Here's the steps to reproduce this problem in my local environment:
(1) Build and deploy pluto-2.0.0-SNAPSHOT into Tomcat.
(2) Start Tomcat, log on to the pluto portal and move to the Test Page.
(3) Edit /testsuite/jsp/introduction.jsp to include the following somewhere:
<c:import url="/jsp/help.jsp">
</c:import>
(4) Try to view the Test Page again.
In the $CATALINA_HOME/logs/testsuite.yyyy-MM-dd.log file, I can find huge error
logs like the following:
Apr 22, 2009 2:20:18 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.StackOverflowError
at
org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:210)
at
org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at
org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
<SNIP>
at
org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at
org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute(HttpServletPortletRequestWrapper.java:516)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:212)
<SNIP>
at
org.apache.jsp.jsp.introduction_jsp._jspx_meth_c_005fimport_005f0(introduction_jsp.java:351)
at
org.apache.jsp.jsp.introduction_jsp._jspService(introduction_jsp.java:136)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
<SNIP>
at
org.apache.jsp.jsp.introduction_jsp._jspx_meth_c_005fimport_005f0(introduction_jsp.java:351)
at
org.apache.jsp.jsp.introduction_jsp._jspService(introduction_jsp.java:136)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
<SNIP>
at
org.apache.jsp.jsp.introduction_jsp._jspx_meth_c_005fimport_005f0(introduction_jsp.java:351)
at
org.apache.jsp.jsp.introduction_jsp._jspService(introduction_jsp.java:136)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
<SNIP>
I tried to find the cause of this problem.
Currently I found a suspicious line in
org.apache.pluto.container.impl.HttpServletPortletRequestWrapper#getAttribute(String).
The method will return a pre-stored attribute value for
"javax.servlet.include.servlet_path" attribute name.
Therefore, if the container tries to look up the included servlet path, then
this wrapper request returns the same jsp page.
That's why this problem happen, I think.
I'd like to look into this more and find a solution to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.