Thanks. I did find it in the version of the file that's in the 1.5.2
distribution, but not on the quick start page,
http://www.stripesframework.org/display/stripes/Quick+Start+Guide .
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]
From: Ben Gunter [mailto:[email protected]]
Sent: Wednesday, November 11, 2009 11:43 AM
To: Stripes Users List
Subject: Re: [Stripes-users] Problem with Quick Start Guide example
It's an <init-param> under StripesFilter's <filter> element.
-Ben
On Wed, Nov 11, 2009 at 1:41 PM, Steven Solomon <[email protected]>
wrote:
Ben,
I copied the web.xml from the quick start page and now it works. But I'm
still scratching my head. Where in web.xml is the Stripes.EncryptionKey
referenced?
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]
From: Ben Gunter [mailto:[email protected]]
Sent: Wednesday, November 11, 2009 5:59 AM
To: Stripes Users List
Subject: Re: [Stripes-users] Problem with Quick Start Guide example
... he said before actually checking to see if Stripes.EncryptionKey was
already there. The example app is configured with a reusable encryption key.
I just tested the 1.5.2 release, and I'm not seeing the behavior you
describe. When I start the app under Tomcat 6.0 and enter 1 and 0 and hit
divide, I get a validation error telling me "Dividing by zero is not
allowed." Have you perhaps changed web.xml and forgot to add the encryption
key?
-Ben
On Wed, Nov 11, 2009 at 8:37 AM, Ben Gunter <[email protected]> wrote:
Steven, make sure you reload the initial view each time you restart your app
server. The _sourcePage parameter is encrypted using a key that does not
survive app server restarts. So if you start your server, load the page and
the restart the server you have a _sourcePage value that the server can no
longer decrypt. The reason it only happens if it's the first thing you do is
that on the second try, the _sourcePage value written to the page has been
encrypted with the correct key.
Note that in a production app you'd set the encryption key with the
Stripes.EncryptionKey init-param to avoid this problem. Maybe we should do
that with the sample app to avoid this kind of problem.
-Ben
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