Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Filter problem  RSS feed

 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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 ...

give me an idea how to solve this

thanks in advance
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Written one session filter which is used to restrict the url

I do not understand. Can you paste the code here?
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply

this is the filter i wrote to block url



This code is used to restrict url but it is not working for mozilla browser

Thanks in advance
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried debugging your filter?
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually mozilla does not creates a new session each time.But IE creates a new session each time when we open a new browser window but mozilaa does not.So how can i overcome this problem

thanks
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The standard behaviour of FireFox is to share the session when you open a new tab within the same browser window. You might find this behaviour in IE7 too.
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.The filter iam written its working for IE but not for firefox.How can i resolve this could you help me about this thing iam waiting for your reply

venkat
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I googled regarding this issue but no use.Iam not getting any answer to this question.Any help should be a greate appreciation

Venkat
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great ... Thanks for your reply

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.

Thanks

venkat
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Every body

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)

How can we acheive this...

venkat
 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Richard Green

You told like

The standard behaviour of FireFox is to share the session when you open a new tab within the same browser window. You might find this behaviour in IE7 too.

So how should i resolve this

Thanks for your reply

Venkat
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Venkata Swamymora,

Please Ease Up! and also be aware that Patience is a virtue.

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!