Hi Martin, Thanks again for your mail.
I was able to solve this problem, it was an IE6.0 bug. I've mentioned all the details on how it was solved in my e-mail previous to this one. -Regards Rashmi ----- Original Message ---- From: Martin Gainty <[EMAIL PROTECTED]> To: Tomcat Users List <users@tomcat.apache.org> Sent: Saturday, November 11, 2006 6:05:45 PM Subject: Re: How do I enable HTTP Sessions after setting up Virtual Hosts? Assuming the cookies="true" has been set for <Host> or <Context> elements if cookies fail.. then it sounds as if url rewriting is in order In that case you may want to look at a tag which will cause your URL to be re-written such as <html:form> ...put all code here </html:form> (If cookies or URL-rewriting dont suit you then you may want to look at hidden variables) I found this link quite helpful http://husted.com/struts/FAQ/view.htm Sounds like a IE malady but I havent found any info on MS site indicating why specific cookies would fail.. Anyone else? 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 3:24 PM Subject: Re: How do I enable HTTP Sessions after setting up Virtual Hosts? Martin, Thanks for your reply. The HashMap variable is and has always been on session scope just as you have indicated. This kind of set up has always been working both with Internet Explorer and Firefox, but I think something happened after I set up the Virtual Host. Now it only works in FF and not IE. But an interesting observation is that when I print in *Internet Explorer* , the URL is not printing. However, in Firefox the URL is printing when I print the value stored in the HashMap. <jsp:useBean id="urlMap" type="java.util.Map" class="java.util.HashMap" scope="session"/> ID is: <c:out value="${param.id}" /> URL is: <c:out value="${sessionScope.urlMap[param.id]}" /> I'm guessing this has something to do with Internet Explorers Cookie settings. I've set it to "Accept All Cookies" but the HashMap value is still empty. I'll look in to this further. -Rashmi ----- Original Message ---- From: Martin Gainty <[EMAIL PROTECTED]> To: Tomcat Users List <users@tomcat.apache.org> Sent: Saturday, November 11, 2006 2:17:44 PM Subject: Re: How do I enable HTTP Sessions after setting up Virtual Hosts? 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] --------------------------------------------------------------------- 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]