Hi all ,
This is my first project I work in , and I need help to solve a problem
..
I have a method to insert data from JSP page ' form1' into database
then return a number ' X ' from database to another JSP page ' form2 '
.
the problem is : each time I refresh ' form2 ' the number ' X '
increase coz the servlet code excuted and invoke the methode to insert
the same data into DB then return the new value of ' X ' although some
of entered data are defined as primary key or unique fields and should
not be entered twice .
what should I do ??
Pawel Szulc - 30 Oct 2006 19:07 GMT
> what should I do ??
read a book?
Wesley Hall - 30 Oct 2006 19:36 GMT
> what should I do ??
You have a common problem, the refresh button on the browser is
resubmitting the POST request.
Read this for a description of the problem and a solution:
http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
polilop - 30 Oct 2006 21:27 GMT
try using http://struts.apache.org/
> Hi all ,
>
[quoted text clipped - 12 lines]
>
> what should I do ??