Forums Register Login

How to display all the session variables from an HTML page?

+Pie Number of slices to send: Send
Anyone know how, using only the session object, to print out all the variables that are stored on that object from html?
Your help is appreciated
------------------
"It's alive, it's alive!" -Young Frankenstien (We all are mad scientists when it comes to getting things to execute perfectly.)
+Pie Number of slices to send: Send
Don't know if this is what you're looking for or not. There's no way you can do it directly from plain HTML since HTML is static and the session object really "lives" in the dynamic environment of the web container. The only thing the session object exposes are it's attributes and a few other settings which you can read about here: http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSession.html
The following example JSP shows you how to generate HTML that shows the objects in the session attribute collection.

HTH
Junilu
Don't MAKE me come back there with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 9227 times.
Similar Threads
request
Servlets and Threads
variable scope question/confusion
JSession Id and third party payment site
Final variable access from class inside function
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:47:21.