Hi, I'm getting occasional SourcePageNotFoundException in logs and cannot figure out how to deal with them.
2013-01-05 15:18:38,143 +0000 [http-bio-8080-exec-63] ERROR ValidationErrorReportResolution:82 - net.sourceforge.stripes.exception.SourcePageNotFoundException: Here's how it is. Someone (quite possibly the Stripes Dispatcher) needed to get the source page resolution. But no source page was supplied in the request, and unless you override ActionBeanContext.getSourcePageResolution() you're going to need that value. When you use a <stripes:form> tag a hidden field called '_sourcePage' is included. If you write your own forms or links that could generate validation errors, you must include a value for this parameter. This can be done by calling request.getServletPath(). at net.sourceforge.stripes.action.ValidationErrorReportResolution.execute(ValidationErrorReportResolution.java:56) at net.sourceforge.stripes.exception.DefaultExceptionHandler.handle(DefaultExceptionHandler.java:165) at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:263) I only have one form, and it is: <stripes:form beanclass="com.something.SomeActionBean" method="post" focus="name"> <stripes:text name="value1" /> <stripes:submit name="submitName"/> <!-- snip --> </stripes:form> So it is a proper Stripes form, not a homegrown one. The HTML for it includes <input type="hidden" name="_sourcePage" value="GlW_ykMrb6SKXvymq6Cw3g==" /><input type="hidden" name="__fp" value="squzNcabnHgp-8i4HC5Ugg==" /></div> The handler for that form then performs some manipulations, and redirects to some ForwardResolution or RedirectResolution. I also have other ActionBeans which get GET requests with pretty URLs (@UrlBinding), and these sometimes add ValidationErrors (e.g., if user mistyped URL, or other error occurred), set them in context, and do a ForwardResolution to /root.jsp. And usually that works just fine, the root page gets these validation errors and displays them fine. But rarely (according to logs) something fails. Is it an abuse / hack to use ValidationErrors outside of a form to validate GET parameters? What should I use instead? How can I debug which user actions have lead to the source page not being supplied but being expected? Regards, John ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users