File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Usage of isTokenValid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Usage of isTokenValid" Watch "Usage of isTokenValid" New topic

Usage of isTokenValid

Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
What is the best practice on using isTokenValid()? Does one use if for all form posts to check for duplicate or only on those that issue a transaction like Save or Update? In other words does a search need to use the token checking on form post?


Never be satisfied with anything less than the best and you will surely pass the test...
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I say there's no point in dealing with the overhead of tokens in situations where it doesn't really matter if the user submits twice. In a search, there's no real harm done if there's a double submit.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Usage of isTokenValid
jQuery in Action, 3rd edition