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!
Joined: Feb 08, 2006
This sounds like browser caching.
Joined: Feb 26, 2008
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.