Hi,
    I have a design flow problem.  My problem is when a user submit a form,
the controller will call the action class to process, in here, it will
insert a record to database.
    After finish the process, the controller redirect to another jsp page,
let say employees list page. Ok, in employees list page, if the user refresh
the page, then it will repost the data to the controller, then another
record will insert again.
    To solve this problem, I create a token before the user submit the form,
so, when the user submit the form, I can check the token b4 to process.  If
the process is done, the token will remove.
    So, when the user try to refresh the page, I can show an error msg.  But
my problem is, if the user want to create another employee after they submit
the form, to save time, they may click back button to create another new
employee,  but in my case, the token is already remove, so when they try to
submit again, it will fail and the error msg is same as try to refresh the
page.

    What I try to achieve is the user can click back button to create a new
employee, but they cannot refresh(in employees list) after submit the form,
or they can refresh, but the record won't insert to database again.

Can anyone tell me how to solve this kind of problem.


Thanks in advance



Louis

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to