Written one session filter which is used to restrict the url i.e ( L:ike when we copy the url from browser and paste into another browser).This is working fine for Internet Explorer but its not working for Mozilla.Why because mozilla doesn't creates new session ...
Neither Firefox nor IE "create sessions". The session is created on the server, not the client. The session context is maintained in one of 2 ways:
1. via URL rewriting. Additional text is attached to links on the returned pages. This information typically looks like ";jsessionid=....".
2. via a cookie. The same information (session ID) is passed to the client, but instead of being appended to URLs, it's kept in a cookie in the browser.
In either case, the session itself is on the server, but the browser sends beck subsequent requests with the session id in them (either as part of the URL or as one of the returned cookies). This session id is the key into the server's collection of sessions, so that the property trans-request (session) data is used.
URL rewriting fails if you forget to indicate to the output mechanism that URL rewriting must be done for a given URL. Cookies fail if the user has disabled cookies or if the cookie is malformed. Session cookies are normally created automatically and can be assumed to be properly formed, so the more common case is that the user has disabled cookies - in which case URL rewriting is the only alternative.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
BUt the filter written by me its working fine in IE but not for firefox.I forgot to mention one thing that is we are maintaining session using ticket this class implements serializable interface.Is there any problem with this thing.
Till now the problem was not solved.The problem is that the filter is working fine for Internet Explorer browser but not working for mozilla firefox .Any body help regarding this issue shoulb be great appreciated
My intention is to block the url(copy the url from one browser(IE) and open another browser(IE) paste the copied url to this browser)
I understand that you are in a hurry. I guess Tim Holloway had given a very clear reply which contradicts to the most general and common belief about Sessions. He clearly mentioned that the browsers do NOT create sessions instead it is created on the Servers. So there is no point in talking about that further.
But as what Richard Green said, i also have experienced the same with IE wherein you seem to see the same session replicated when you press Ctrl+N in the same browser instance. In such case, what i think is the session attributes are maintained but NOT created in the browsers.
The problem what you have pasted seems to be a bit strange as it seems to be working fine in IE but not in Firefox. Had it been the case, you need to look at the way how the browsers deals with it.
One common idea would be no matter how many windows/tabs you keep it opened, every individual instance of a browser should have a unique id with which only you get an appropriate response sent back to the corresponding browsers and you don't get any overlap between them. Just try to keep track of that. It may help.