Hi Dan.  I appreciate your response and hope I didn't offend you.

I read the sections in the 'Core J2EE Patterns' book that you mentioned and 
looked at the code pulled from Struts.  I understood the theory of what was 
needed to be accomplished but really did not see a concrete example of how 
to implement.  I took my best shot and used, for my jsp page, something 
resembling what is on page 80 only using <html:hidden>.  That was when I 
started to get exceptions that I didn't have the proper getter method.  It 
wasn't until I combed the archives that I found the references back to 
struts-example (which I'm embarrassed to say I've been all over but never 
saw the token methods) and a review of the <html:form> tag to realize that 
the form tag looks at the request for usage of transaction token then 
creates its own hidden field.  Thanks again for your response and patience 
with my confusion.  Tom

At 12:35 PM 8/7/01 -0400, you wrote:
>Hi Tom,
>
>Tom Tibbetts wrote:
>
> > Hi all.  Is there example code about how to implement saveToken and
> > isValidToken methods.  Core J2ee patterns gives a good talk on theory but
> > they drop the ball with examples.
>
>We cover the general theory of duplicate form submission issues and the
>synchronizer token in the "Presentation Tier Design Considerations" chapter
>of 'Core J2EE Patterns'.
>
>We also include an example with source code in the "Presentation Tier
>Refactorings" chapter. In fact the source code used with permission is from
>Struts itself, including the 'saveToken()' and 'isTokenValid()' methods.
>
>Hope this helps,
>Dan
>
> > Thanks in advance.  Tom
>
>--
>Dan Malks                            Sun Java Center
>Enterprise Java Architect            703.208.5794

Reply via email to