sendRedirect will work if you don't need to preserve the originating request
data - as it returns to the browser before redirecting it behaves as a new
request would.
Another option would be to use the request dispatcher which can do an
include or a forward.
eg to include a html or jsp ...
PrintWriter out = response.getWriter;
out.Println("<HTML>");
out.Println("<BODY>");
RequestDispatcher rd = request.getRequestDispatcher("destinationURL");
rd.include(request, response);
out.Println("</BODY>");
out.Println("</HTML>");
Similarly to forward to the required page use rd.forward(request, response);
Gareth
>From: Manish Bhatnagar <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: other options for out.println statements to load a HTML web
> page
>Date: Wed, 17 Jan 2001 09:11:33 +0530
>
>Use HttpServletResponse.sendRedirect().... That will solve your problem.
>--Manish--
>
>"Lambert, Stephen : CO IR" wrote:
>
> > I am currently using out.println statements for displaying a HTML page
>after
> > writing data to a db.
> > And, I do know how to use a setTimeout statement to load a HTML web
>page.
> >
> > My question is, is it possible to redirect or load an HTML web page
>rather
> > than embed HTML tags within out.println statements? I don't want to use
> > servlet chaining, since I'm going from a servlet to an HTML web page.
> >
> > Also, since I'm working in a Linux/Apache/JServ environment, I can't use
>JSP
> > pages.
> > Any suggestions or links to an example?
> > Thanks.
> >
> >
>___________________________________________________________________________
> > 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
>
>--
>+------------------------------------Live-Your-Dream----+
>Obstacles are things a person sees when he takes his eyes off his goal.
>-E. Joseph Cossman
>
>___________________________________________________________________________
>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
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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