Hello

I might get it wrong, but I think your refresh problem
comes from the fact that when you insert the data in
your servlet, you haven't got your ID number yet and
you let the database put that number by itself. So
that if the user sends the same data twice, you don't
know whether it is a real new row or an existing one.
What about getting the sequence number (it should be
an Oracle sequence number type, not a max+1, so that
there should not be two users with the same number)
BEFORE sending the empty form to your user in a
<hidden> input?
When the user submits the form, you just insert the
number from the hidden field into a unique field in
the table. If he refreshes the page he will attempt to
send the same number again. You will get an
SQLException that you may catch and do whatever you
want with.

I hope that was your problem...
Vincent

--- Rajkishore Dash <[EMAIL PROTECTED]> a �crit : >
> I do not have problems with the inserting the data
> to the table(either
> .nextval in oracle or getting the max + 1).
>
> But the concern is the same row  is inserted again
> when u refresh the page in
> case of request forward. Because the last request
> from client was to  insert
> one record.
> Instead if i use a sendredirect, the url changes. (
> Ref. last mail  and the
> fig. explained below ).
>


=====
Vincent BUI,
[EMAIL PROTECTED]

PS : la signature de propagande qui suit n'est pas de mon fait.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to