| Author |
bookmarking pages
|
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
i read in the earlier posts that I should use tokens to avoid bookmarking of pages. but in my situation i have action chaining so when i pass from action1 to action2, im guessing the request is reset and the token is invalid. what is the best way around this.
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
The token only resets when you call saveToken or resetToken (you'll usually call saveToken). If you never change the token, the same one is kept for an entire session. You should have no problems with tokens even though you are chaining actions, Mannu.
|
A good workman is known by his tools.
|
 |
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
So, Marc(or anybody else) this should work or am I doing something wrong in action1: save data from page 1 form saveToken(request); forward to action 2 in action 2: if(isTokenValid(request)) then "get data from db for new page" resetToken(request); saveToken(request); forward to page 2
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
IMO it's better like this: in action1: if(!isTokenValid(request)) > add ERROR and forward somewhere save data from page 1 form saveToken(request);// this does change token, by the way forward to action 2 in action 2: "get data from db for new page" forward to page 2
|
 |
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
din't know what i was thinking, that makes much more sense. Thanks. [ September 09, 2005: Message edited by: mannu kapoor ]
|
 |
 |
|
|
subject: bookmarking pages
|
|
|