There is no "back" in this scenario, because this "request to controller
servlet and forward" process counts as just one client request (unlike an
HTTP redirect, for instance). You would have to deal with any consequences
raised by the user reloading the page with the refresh button, however, and
duplicating the request.

Bruce

-----Original Message-----
From: Paul Copeland <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, January 22, 2003 2:44 AM
Subject: Re: Servlet question...


>How does using a RequestDispatcher change what happens when you hit the
>back button? Whatever the Front Controller does to decide where to
>dispatch the request will still be the same when you go back - unless
>you have changed a state variable in the session memory, but that would
>not depend on using a RequestDispatcher, would it?
>
>-- Paul Copeland, JOT Object Technologies - http://www.jotobjects.com
>
> > Date:    Tue, 21 Jan 2003 15:31:38 -0500
> > From:    "Bruce W. Perry" <[EMAIL PROTECTED]>
> > Subject: Re: Servlet question...
> >
> > This sounds like you are using a Controller servlet design, in which
> > a front-controller servlet receives the request, examines it, then
> > passes the request along to the proper servlet or JSP. In this case,
> > using an object that implements the javax.servlet.RequestDispatcher
> > interface, as in
> >
> > RequestDispatcher dispatcher = request.getRequestDispatcher(String
> > path_to_servlet_or_JSP_destination );
> >
> > ... in your servlet get method, will avoid problems with the "back"
> > button, if I'm understanding your message correctly. you then pass
> > the HTTP request along using the dispatcher.forward( request,response
> > ) method, and it's the destination page that ends up sending the
> > response to the browser, not the Controller servlet. Everything
> > happens in this case on the server side. See for instance
> >
> >
>http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatch
e
> >  r.html
> >
> > Bruce
> >
> > -----Original Message-----
> > From: Hélder Sousa <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: Monday, January 20, 2003 12:53 PM
> > Subject: Servlet question...
> >
> >
> > Hello
> >
> > This is the first mail that I send to the list with an intriguer
> > doubt.. I think :) I have a servlet that is responsable for create
> > several pages depending a parameter that I send. Depending that
> > parameter I create an instance of an object that I need for create
> > the selected page contents (in HTML, of course). The ideia is have
> > some differents java objects that corresponde to the differents pages
> > and the user "enter" in the site for an only "door", the single
> > servlet, using GET METHOD. Until here I don't have any problems.. The
> > main problem is about the browser.. When I "enter" some pages through
> > my servlet and then I make "back" in the browser, it load the page
> > from server again.. For the common pages this isn't a problem, but in
> > my case the objects invoke services in server and delay to much the
> > response to the browser.. My question is: what happens when I click
> > in "back" button? There is a way to make the browser do not load the
> > servlet from server again? Tks for the help
> >
> >
> > Hélder Sousa Departamento de  Projectos e-Business I2S - Informática
> > Sistemas e Serviços <<mailto:[EMAIL PROTECTED]>> -
> > <<http://www.i2s.pt/>> Tel.: +351 22 834 04 00; Fax: +351 22 834 07
> > 95 Portugal
> >
>
>___________________________________________________________________________
>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
>
>

___________________________________________________________________________
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