wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts: Duplicate Form Submission Handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts: Duplicate Form Submission Handling" Watch "Struts: Duplicate Form Submission Handling" New topic

Struts: Duplicate Form Submission Handling

Matt Connors

Joined: Sep 08, 2004
Posts: 23
I am trying to properly handle duplicate form submission in my Struts application. In my .jsp I put the following hidden field:

<html:hidden property="org.apache.struts.taglib.html.TOKEN" />

and I receive the this error message:

"javax.servlet.jsp.JspException: No getter method for property org.apache.struts.taglib.html.TOKEN of bean org.apache.struts.taglib.html.BEAN"

Can someone tell me what I'm doing wrong? Is there a different way to set up this hidden field?

Thanks in Advance,
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

Struts handles this automatically. You do not need to add the html:hidden tag.

If you've html:form on the jsp and a previous action did saveToken(request); it will slip the hidden field in right after the opening form html tag.

A good workman is known by his tools.
Matt Connors

Joined: Sep 08, 2004
Posts: 23
You are correct - thanks!
I agree. Here's the link: http://aspose.com/file-tools
subject: Struts: Duplicate Form Submission Handling
Similar Threads
saveToken() without html:form?
Duplicate form submission - Synchronizer Token Pattern
Multiple Forms, Multiple Submissions
Preventing multiple posts
Double Submit Problem/Bug in JavaRanch Site