I have some links on a home page that are called as follows:
When the user comes to the site for the first time (no cookie set yet), they get a jsessionId assigned. All pages are served by servlets. Most of the links work fine, but the ones that lead to a servlet that redirects to an https login page have the jsessionID embedded in their url. Thus, they break and I get a 404 error. Earlier, i was able to even see the home page's source that showed the embedded jsessionId, but I think my using the <html:link> tag fixed that.
Here is the header trace -- I'm at a loss as to why the jessionId is being made part of the URL when cookies are working fine:
This is the home page... working as it should. Cookie is set, and we're ok.
Now with the servlet that redirects to an https login page (with a redirect back to the referring page on success), I get this -- note the URL with jsessionId embedded.
Now the browser tries to get this bad url and fails...
Any thoughts on why this would occur, and what I can do to prevent it? My impression is that the Struts framework (1.3.10 is what I use) should handle the URL rewriting if I use the right tags... maybe I'm not?
I'm happy to post the redirect code, but I figure this post is long enough.
Joined: Dec 11, 2010
Oh, I should add that the appropriate action is that by calling https://www.mysite.com/storeIt/landing.s2s
I should be redirected to https://www.mysite.com/login.s2s?redirect="/storeIt/landing.s2s"