Elena Palanca wrote:
> Hi,
> I have the following problem:
> I have a servlet that depending on the user connect gives a different
> page. These pages are built with frames (so inside the code of the
> frames I call static pages). I believe that in this case the only way to
> mantain sessions is using Cookies. Do I'm wrong?
> This is a big dubt but it seems to me that If I want to use
> URLrewriting or Hidden fields I have to have only dynamic page.
> Thanks in advance
> Elena
>
You are correct. Two ways to make your static HTML pages "dynamic" come to
mind:
* Write your own file-serving servlet that reads the text from a file,
scans for hyperlinks, and uses URL encoding to maintain the
session state.
* Rename your static HTML pages to JSP pages, and change
the hyperlinks to convert something like this:
<a href="nextpage.html">Next Page</a>
into something like this:
<a href="<%= response.encodeURL("nextpage.jsp") %>">Next Page</a>
Other than changing the extensions to ".jsp", and adding the
encoding, you should not need to do anything else.
Craig McClanahan
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".