You are making the assumption that transactions are dictated by request
type.  There are many other ways to dictate transaction state within the
context of web browser usage.

-----Original Message-----
From: Student T [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 20, 2004 1:58 PM
To: [EMAIL PROTECTED]
Subject: Token Processing

Hi

In my investigations on Struts I have developed yet another BaseAction class
(based on the Template design pattern) so I can put all common processing
for actions in one place.  In this class I use the methods resetToken,
saveToken to ensure that ALL transactional actions are checked to see if
they double posts.  Isend a new togen with every GET request and check for
token validity with every POST request.  After all that is what GETs and
POSTs were designed for.

I think I have done something useful.  But this seems such an obvious thing
to do that I am wondering why has it not been done before and included
within the Struts code.  Have I missed a flaw in my approach?

In summary

BaseAction extends Action

execute (mapping, form,request,response) {

if request is POST then
  if  double post then
    forward to warning page
  end if;
  resetToken
else
  savetoken
end if

}

Comments

Stuart Dentt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to