Hi. I'm imploying Struts transaction tokens in order to prevent the user from submitting register form twice.
registerForm is a sub class of ValidatorForm. The problem is when I type /action/register.do?operation=load I got register.jsp page which is full of validation errors and Struts generated tokens is not included in the page. How over come this problem (without turning off the validation) ?
Originally posted by John Todd: The problem is when I type /action/register.do?operation=load I got register.jsp page which is full of validation errors
That's just the problem: When you type in an Action URI, none of the fields have been populated, so naturally validation is going to fail. If you're planning on calling this action both from a URI and from a form submit, you need to define two separate action mappings. They can both refer to the same action class, and have basically the same settings, but they must each have a different path name. The one you call from a URI should specify validate="false" and the one you call from a form submission should specify validate="true". Example:
[ February 14, 2007: Message edited by: Merrill Higginson ]