----- Original Message -----
From: Robert Christie <[EMAIL PROTECTED]>
To: JSP <[EMAIL PROTECTED]>
Sent: 03 March 2000 18:51
Subject: Inconsistent behaviour - Servlets vs JSP
> I am trying to compare a couple ways of implementing a solution using JSP
> and
> Servlets. I am running NT with IBM VA Java (V 3), and within the Websphere
> Test
> Environment. The browser is IE 4.
>
> I am experiencing a strange anomaly in the behaviour between the following
> approaches and I am hoping someone may be able to explain.
>
> Approach 1.
> I have a search page (straight HTML). The Action of the form specifies a
> Servlet The servlet creates a Java bean which does a bit of messaging and
> eventually
> contains some business data. I stuff this into the session, then redirect
to
> a JSP which displays the content of the data bean.
>
> At the top of the JSP I have HTML which specifies no caching.
> At the bottom, I remove the bean from the session.
>
> From this JSP, the user can choose to display further details of the data
> displayed. If they choose to do this, a (different) servlet is called, a
new
> java bean
> is created, and a different JSP page is called to display the detail.
>
> From this page, if the user presses the back button, the previous bean is
> gone, and I can detect this and send to an error page. All is well.
>
> Approach 2.
> Similar to above. But I start with a JSP page which creates an empty bean
> which will be used to hold search results and stuffs it into the session.
> The action on the
> form is a different JSP page which will do a bit of messaging and fill the
> previously created bean with business data, and display it. (It also
creates
> the next data bean for further processing).
>
> Again, the second JSP page contains the no-caching HTML and removes the
> first bean from the session. It also allows navigation to further detail.
To
> do this a further JSP page is called just as above.
>
> However, if the user now presses the back button, the previous page is
> displayed, unlike the previous example, there is no attempt to re-run the
> JSP so I can't detect that there is some potentially bad navigation going
> on.
>
> Why is the JSP not re-run when navigating back to the page, when in the
> previous example the JSP is re-run ?
>
>
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets