This is a better way of doing things rather than the bean idea given
earlier, this usage makes it simply
more efficient as well as relaiable, here is the nswer given by Craig for
.....
<snipet>
>
> what is the different between <jsp:forward .... /> and
sendRedirect() ?
>
<jsp:forward> -- and it's cousin in the servlet API,
RequestDispatcher.forward() --
happen on the server side. What happens is your browser sends a
request to a particular
URL, which invokes a servlet (or a JSP page). That servlet (or JSP
page) decides that a
different page should display the results for this very same
request, so it does what
amounts to a "go to" to that page to display the results. One extra
benefit -- you can
pass request attributes to the new page using
ServletRequest.setAttribute().
On the other hand, sendRedirect() sends an HTTP "moved temporarily"
message back to your
browser, along with the new URL. The browser then resubmits its
request to the new
URL. Depending on your connection speed to the network, this can
take substantially
longer.
Craig
</snipet>
I T H
Amit
> -----Original Message-----
> From: Danny Trieu [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 20, 1999 8:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Redirect in JSP
>
> use <jsp:forward ... />
>
> "Alvarez Contera, Jos� Alberto" wrote:
>
> > Hi all,
> > we are using the sendRedirect method to make a http request to a Perl
> CGI.
> > The problem is this: all the parameters are passed in the URL, even
> login
> > and password. Can we make a redirect and pass the parameters by post? If
> we
> > could do this, how?
> >
> > thanks
> > JAAC
> >
> >
> ==========================================================================
> =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > FAQs on JSP can be found at:
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html