This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Struts: Duplicate Form Submission Handling
It's not a secret anymore!