A common reason for this error message appearing is that validation is
failing on the initial view of the page.  Stripes hasn't had a chance to
insert the encrypted hidden field _sourcePage into the form, because it's
the initial view.

If you don't want validation to run on the initial view of the page (usually
the @DefaultHandler) you can mark the event as @DontValidate.  This will
prevent Stripes from running validation when this event is executed.

On Tue, Nov 10, 2009 at 9:38 PM, Steven Solomon <[email protected]>wrote:

>  Hello,
>
>
>
> I’m new to Stripes and I’m working through the Quick Start Guide calculator
> example.
>
>
>
> When I run the calculator example with the division operation and the 
> validation method ( avoidDivideByZero with annotation 
> @ValidationMethod(on="division") ), an IllegalStateException is thrown by 
> ValidationErrorReportResolution if I try to divide by zero.
>
>
>
> Here is the text displayed in the page:
>
> *Stripes validation error report*
>
> 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 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().
>
> Strangely (or not), the exception is only thrown if divide by zero is the
> first operation after bringing up the page. If I perform an ‘add’ operation
> before attempting to divide by zero, then the exception is not thrown.
>
> I’m running the latest Stripes 1.5.2 under Tomcat 6.0. Is this a legitimate
> bug (i.e. is it just me)? What should go in the method avoidDivideByZero
> so that the exception isn’t thrown?
>
> Thanks,
>
> *Steve Solomon*
>
> *Sr. Software / Systems Engineer*
>
> Ironhawk Technologies, Inc.
>
> 6701 Center Drive West, Suite 700
>
> Los Angeles, CA  90045
>
>
>
> (310) 815-2800 Main - ext. 6224
>
> (310) 258-9824 Fax
>
>
>
> [email protected]
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to