Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session.getAttribute only works with localhost URL 1

Status
Not open for further replies.

oricteropo

IS-IT--Management
Mar 7, 2003
29
US
I am successfully setting a session variable at the URL http:\\localhost:9080\testWeb using the following code:

if (request.getParameter("openReport") != null) {
session.setAttribute("reportName", stringReportName);
}
After the session variable is set I can then view it from anyother page on my site using:
session.getAttribute("reportName")

This same code work's when I use it on the URL http:\\rsc_sza:9080\testWeb (where rsc_sza is the name of my computer) but it seems to expire when I move off of the current page. I need the variable to persist throughout the entire session.

Anyone have any ideas what the problem may be?

Thanks in advance,
Jeff
 
try checking the session state. It sounds like the settings are off a bit

here is a great resource I've used more then a few times on managing session state and more

Session Manager

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top