This week's book giveaway is in the Testing forum. We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line! See this thread for details.
Now here's an interesting one for you. In my webbapp I came to a point where I have to keep an object into the user's session for a short period of time. I developed a session filter that automatically removes the attribute unless the requestURI() is in an "accepted uris list". The scenario looks like this: the user clicks a link in a jsp, the link takes him into some action that retrieves an object from the underlying repository and stores it in the user session and then forwards the response to the jsp page. And here comes the weirdness. By using an Internet Explorer browser the attribute removes itself as soon as it's stored (I used a SessionListener class to notify me upon session events). When using Mozilla Firefox the attribute remains in the user's session but when I hit F5 on the page it gets removed. I found out that this is because of the SessionFilter but here comes a question for all you Struts gurus - why ? The first time the page loads everything works fine, as soon as I hit refresh - the attribute is gone. What happens behind the curtains ?
Problem solved. The difference in behaviors between IE and FF comes from the fact that IE refresh the page fully (requesting all the images and css again so the SessionFilter removes the attribute. I fine-tuned the filter to only consider the requestURIs that end with *.do.
Have a good day, Dan
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?