• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

redirecting servlet fails with embedded jsessionId

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
_R
 
Rex Norm
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"

 
reply
    Bookmark Topic Watch Topic
  • New Topic