struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gemes Tibor <>
Subject Re: double-click protection and double-update problem
Date Fri, 24 Jan 2003 16:34:40 GMT
2003-01-24, p keltezéssel Olivier Gourment ezt írta:

> I am not using Struts yet, so I am not familiar with the Struts
> specific classes and tags, and I would like to be able to recommend it
> to my customer.

You can create a token with saveToken(request); use this in yor
form-populating action.

And check for it later in the save acion with sg like:

if (!isTokenValid(request)) { 
 ActionErrors errors = new ActionErrors(); 
 errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.token"));
 return new ActionForward(mapping.getInput()); 

This works automagically.



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message