If ou are referring a bean somewhere.. in which case the default Scope is Page 
change the scope to Session as in
<c:set var="HashMap" value="HashMap" scope="session"/>
and reference a session scoped HashMap instead of page scoped HashMap

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Rashmi Rubdi" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Saturday, November 11, 2006 1:36 PM
Subject: Re: How do I enable HTTP Sessions after setting up Virtual Hosts?


Sorry I didn't explain the test case earlier. 

Well, I conducted a few other tests and the session is infact working. 

I was misled by a custom written error message that said "Your session has 
expired" , when infact the problem was or is something else. 
(I still need to figure out what the problem is).

After further testing it appears that the problem only occurs in IE and not in 
Firefox. So, this is definitely not a Tomcat problem, and so I'll close this 
thread.

But, the strange thing is this problem didn't occur in IE before the virtual 
host configuration. It's probably a coincidence.

Some info about the earlier problem :

I'm storing a HashMap of URLs and IDs in the session and then, I'm re-writing 
the URL. On click of the rewritten URL the original URL is read from the 
HashMap from the session and a redirect is performed to the original URL. 

For example, 

I have a URL like this /songs/?song_id=123&artist_id=345

This URL is stored in the HashMap as ID=SONG_TITLE    
URL=/songs/?song_id=123&artist_id=345

The Rewritten URL is displayed as /SONG_TITLE/

The code for the link is written as <a href="/SONG_TITLE/">Song Title</a>

When the link is clicked  the URL for ID SONG_TITLE is read from the session 
and a redirect is performed to /songs/?song_id=123&artist_id=345 

When the link is clicked if the URL /songs/?song_id=123&artist_id=345  is not 
found (usually if the session expires), then the error message
"Session expired" is displayed

In IE when I click on the link <a href="/SONG_TITLE/">Song Title</a> it doesn't 
work - by this I mean the URL is not being read from the HashMap.
But it is being read from the session in Firefox.

However, when I conduct a simple test like

<c:set var="flowerName" value="Hibiscus" scope="session"/>
<c:out var="flowerName"/> 

It correctly displays Hibiscus in both IE and FF.

So, the problem seems to be something else. 

Thanks for pointing out the context path. 

-Rashmi

----- Original Message ----
From: Hassan Schroeder <[EMAIL PROTECTED]>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Saturday, November 11, 2006 9:15:03 AM
Subject: Re: How do I enable HTTP Sessions after setting up Virtual Hosts?


On 11/11/06, Rashmi Rubdi <[EMAIL PROTECTED]> wrote:

> HTTP Session was working before I set up Virtual Hosts on Tomcat 5.5/ Windows 
> XP.

?? And exactly how is it not working now? What's the test case?

> The entries in server.xml :

>       <Host name="projectA" appBase="webapps/projectA">
>          <Context path="/" docBase="C:/dev/projects/projectA/__source"

Dunno if it's related but that Context path is wrong -- should be ""
(null path) for the default Context. (Just guessing that it might cause
a mismatched path in the session cookie.) So fix that first. :-)

-- 
Hassan Schroeder ------------------------ [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to