| Author |
ActionForward and token Help please....
|
Cory Max
Ranch Hand
Joined: Jul 20, 2005
Posts: 83
|
|
Hi Everyone, I am using tokens to stop the double post problem. My issue is that I dont want the second post to send them to a failure page. I want it to send them to the same page as the first post, but I only want the first post to affect the state of the objects on the server. Here is some code public class PurchaseOrderAction extends DispatchAction { public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { //save the token saveToken(request) // rest of the code for loading the form } catch(Exception ex){//exception} } //******************************************** public ActionForward submitOrder(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { // check the token. Proceed only if token is valid if(isTokenValid(request,true)) { //implement order submit functionality here } else { // i dont want to return a faliure here :-( return mapping.findForward("failure"); } } catch(Exception ex){//exception} } } Can anyone please help?
|
There are only 10 types of people in this world... Those who understand binary and those who don't.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: ActionForward and token Help please....
|
|
|