Hi,

Can u please suggest something on the following

Suppose we have a add new row form.
Lets say  the db table is primary keyed on the basis of a sequence number. On
save the form is submitted to DB and suppose,it forwards this request to the
some list screen.

problem is if user refreshes the page then again the same row is again
inserted. Since the primary key is sequence number so, there is no unique key
violation.

That is the reason i have prefered the use of send redirect although it is
very inefficient.


Thanks and Regards
Raj
EXT 6146

===============================================================================
=================
Request.sendRedirect sends an HTTP redirection message to the client, due to
which the client agent initiates a new request to the server, asking for the
redirected resource. This scenario therefore includes 2 network calls from
the client to the server and is generally used when the redirection is done
to a resource outside your web server.

dispatcher.forward, on the other hand, redirects the output to a resource
within the server, a process to which the client is unaware of.This scenario
includes one call from the client to the server, which is obviously cheaper.
Besides, performing a forward this way enables the forwarded page to access
all the objects bound to the request scope that were created by the
forwarding page...

zm.


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Shankar
Sent: Wednesday, February 27, 2002 6:51 AM
To: [EMAIL PROTECTED]
Subject: Re: difference between resuestdispatcher.forward and
resposne.sendRedirect


They are used in different contexts altogether
Shankar
----- Original Message -----
From: "Sudarson Roy Pratihar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 8:34 AM
Subject: difference between resuestdispatcher.forward and
resposne.sendRedirect


Hi All,

Can any anyone pls tell which one is better in performance -

resuestdispatcher.forward or resposne.sendRedirect?
Thanks and Regards,
Sudarson





-------------------------------------------------------------------

The contents of this e-mail are confidential to the ordinary user
of the e-mail address to which it was addressed and may also be
privileged. If you are not the addressee of this e-mail you should
not copy, forward, disclose or otherwise use it or any part of it
in any form whatsoever. If you have received this e-mail in error
please notify us by telephone or e-mail the sender by replying to
this message, and then delete this e-mail and other copies of it
from your computer system. Thank you.

We reserve the right to monitor all e-mail communications through
our network.

___________________________________________________________________________
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