Shahzad:

(Again assuming I understand your current question,) I don't really see why
dynamically generated values (presented in <tr><td>'s or anywhere else in your jsp)
should not be saved in session variables (or even static variables if they will be
common to all users). Here's what you can do in psuedo-code:

The first time that you generate your jsp, save all data that you pick up from the
db in session/static vars. Then, as before, write code in your jsp as follows:

if (db-session-var-value is null) {
    go to db and pick up values to present;
    save the values in session vars. for the next time this jsp is displayed;
}
else present the value in the session variable (within <tr><td>'s or whatever..)

The only time this will not be ok is if the submission of the form by the client
will cause different values to be saved in the database (due to updates/writes to
the database, etc.). In which case, I would think you would *want* to go to the
database again.

I believe though that this above approach goes against the MVC idea of using JSPs
only for presentation purposes. You may want to use a (controller) servlet to save
the database values in an appropriate bean, save that bean in a session variable and
then use that bean to display the jsp.

Regards,
Geeta
P.S. Unless I grossly misunderstand your question, I don't think using HTTPS makes
much difference to your problem.


Mahmood Shahzad wrote:

> Geeta :
> Thanks u reached exactly my problem. There r few concerns. If the page contains
> some dynamically generated data  that was not presented in form components but
> just in  <TD> <TR> tags, that data will not be available on server side for
> regeneration of page and as the cache is off on client side and also I m using
> HTTPS, Server will get the data from DB again. In this way it not be consistent
> now with the client data provided by the client.
> I want the same copy of all the data which was not even available in controls.
>
> Shahzad Mahmood
>
> Geeta Ramani <[EMAIL PROTECTED]> on 12/27/2001 05:22:32 PM
>
> Please respond to "A mailing list for discussion about Sun Microsystem's Java
>       Servlet API Technology." <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Shahzad Mahmood/CresSoft)
>
> Subject:  Re: Problem with the back button in the HTML
>
> Shahzad:
>
> (If I understand your question correctly), maybe you can use a jsp instead of an
> HTML page and when the user submits the form, save all the values in session
> variables. Then your jsp can be coded with logic like the foll. psuedo-code:
>
> if(session var val is nonull) value presented in the form = "";
> else value presented in the form = session var. value;
>
> Regards,
> Geeta
>
> Mahmood Shahzad wrote:
>
> > Hi All,
> >
> > I have to present the values submitted by a user on an HTML page when the user
> > presses the back button available in HTML. Do someone have any solution.
> >
> > Browser side cash is off and I m using HTTPS.
> > Thanks in advance
> >
> > Shahzad Mahmood
> >
> > ___________________________________________________________________________
> > 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
>
> ___________________________________________________________________________
> 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