Hi,
Project/application: myWebApp
IDE: netbeans
Server: apache
tomcat
browser: firefox
I'm in the session management section of my
j2ee courseware and the following code relates to using cookies / URL rewriting for the same. I'm facing the following issues:
a)
Unable to view jessionid (& its value) on the message body of the web page
On running the web application the first time, the html page
http://localhost:8084/myWebApp/index.html is loaded with
the hyperlinks as given in the below html code. On clicking AddCookies, the cookies - c1 and c2 - in the
servlet file "AddCookies"
are deployed with the appropriate message.
So, on subsequent request (i.e clicking the link Home on the page [url]http://localhost:8084
/myWebApp/AddCookies[/url] to go back to the index.html page and then clicking the link ReadCookies), the page
http://localhost:8084/myWebApp/ReadCookies should display, on the body, the jessionid cookie & its value (sent
by server to browser in response to the first request) apart from the servlet ones.
However, the jsessionid cookie is not
displayed.
b)
append jessionid (& its value) to the url (http://localhost:8084/myWebApp/ReadCookies)
I disabled cookies in the browser, closed the above page and ran the application. From the page [url]http://localhost:8084
/myWebApp/[/url], i again clicked on ReadCookies to go the ReadCookies page. Here, the page gives out the following error
which is fine as i've disabled cookies in the browser (& the servlet cookies message would not be displayed). But the jsessionid & its value - being system generated - should be appended as parameter to the url mentioned in point b). This does not happen.
Could any of the forum experts explain the above.
thanks,
Sudhir
html code
servlets code
xml code