• 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

Pasted url vs link - extremely odd behavior

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all. I'm trying to figure out a real strange one. I have a struts 1.1 (I think) webapp. I have a filter that checks if the user has a valid session. I also have many classes, but the one I'm focusing on is called downloader.java. What it does is accept an itemID, and then does stuff (not that important for this question).

So, I started hearing from users that they can't paste a url into the browser and be taken to item. Instead it kicks them out to the login page. Let's say the url looks like mysite.com/downloader.do?itemID=848

So, I tested this by opening a fresh browser, and pasting in the link. The first thing that happens is that the filter kicks you to the login since you aren't logged in. This is expected behavior. Once you login, and THEN paste the url into the browser and hit enter, it kicks you back to the login page, but it isn't even hitting the filter. It's not even getting in there! That behavior ALWAYS happens in Internet Explorer. In Firefox, it often works corectly and takes you right to the download. On one version of firefox I tried, it will hit the filter, go to the right java class, but the request is empty...odd..and it only happens on one of my versions of firefox.

So here's where it gets weirder. If I put a link on the homepage that is a a href to the exact same link I'm pasting into the browser, then click it, it works! The href is pointing to the exact same url. So it appears by clicking the link, it will work, whereas entering it into the browser address bar wont.

Any thoughts? Weird caching going on? Perhaps there is something in struts or web programming I'm not aware of also. I'd love ideas. Thanks!
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like browser caching.

- Brent
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you perform authentication?
Do you have cookie or url based session tracking?

Looks to me like for some reason "jsessionid" is not being passed due to which it is not able to able to associate this request with same user session.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic