Apologies in advance, this will be quite lengthy to try and cover
everything I've done and what is going wrong.
I have just upgraded to Stripes 1.5, and am trying to implement the
clean URLs. When I try go from one action bean to another (via a
redirect or forward), I am getting a stack overflow out of tomcat.
Here are the appropriate parts of my web.xml :
<filter>
<display-name>Stripes Filter</display-name>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>
<param-name>Extension.Packages</param-name>
<param-value>my.extension.package.name</param-value>
</init-param>
<init-param>
<param-name>PopulationStrategy.Class</param-name>
<param-value>net.sourceforge.stripes.tag.BeanFirstPopulationStrategy</param-value>
</init-param>
<init-param>
<param-name>ActionResolver.Packages</param-name>
<param-value>my.action.package.name</param-value>
</init-param>
</filter>
<filter>
<description>Dynamically maps URLs to ActionBeans.</description>
<display-name>Stripes Dynamic Mapping Filter</display-name>
<filter-name>DynamicMappingFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.DynamicMappingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Charset Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>StripesFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>DynamicMappingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
What I am trying to do is have the loadSubject action go directly to
the viewSubject action. The loadSubject action's job is to load all
the required info from the database and store it in the session. The
viewSubject action's job is to find that info in the session and make
it available to a JSP.
@UrlBinding("/loadSubject/{sid}")
public class LoadSubject
extends LBAction {
protected long sid;
// getter and setter for sid
@DefaultHandler
public Resolution load() {
// load everything from the database
return new
RedirectResolution(ViewSubject.class).addParameter("sid", this.sid);
}
}
@UrlBinding("/viewSubject/{sid}")
public class ViewSubject
extends LBAction {
protected long sid;
// getter and setter for sid
@DefaultHandler
public Resolution view() {
// find the subject in the session
return new ForwardResolution("WEB-INF/jsp/viewSubject.jsp");
}
}
If I take the {sid} parameter out of the URL binding for viewSubject,
it works properly. The subject is loaded, the view page comes up.
However when I have it in, Tomcat (6.0.18) craps out and presents this
exception, with everything between the *** repeated about 3 dozen
times :
Dec 17, 2008 2:31:18 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.StackOverflowError
at
org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
(repeated a massive number of times)
at
org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at
javax.servlet.ServletRequestWrapper.getAttribute(ServletRequestWrapper.java:82)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:214)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:345)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at
net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110)
at
net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
at
net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
at
net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477)
at
net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:293)
at
net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:177)
at
net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
***
at
net.sourceforge.stripes.controller.DynamicMappingFilter$2.doFilter(DynamicMappingFilter.java:363)
at
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246)
at
net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:350)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at
net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110)
at
net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
at
net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
at
net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477)
at
net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:293)
at
net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:177)
at
net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:67)
***
Have I misconfigured something? Have I done the URL bindings wrong?
This was a working app on Stripes 1.5 until I starting playing with
the clean URLs.
Chris
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users