Two possibilities occur to me: 1. write your own "session" mechanism and use hidden form variables to distinquish between forms in different tabs. 2. generate the contents of each tab from different URLs so the cookie mechanism considers them separate locations.
I need more elaboration towards the solution, that how I can restrict the user if he is accessing my application from another tab.
How can I user URL encoding if this is the solution? and How it helps? or any other idea to implement it.
Joined: Jul 03, 2007
I have some pointer on the my above problem that how can I identify that user is coming from tab.
if I access session.jsp from index.jsp then on second page I see session.isNew true and Refrer is my index page.
And if I try to open session.jsp directly from another tab then session id will be same, session.isNew false and refrer will be null.
see following cases:
1. User is log in to my site. session.isNew = true and Refere rwill be null (normal case, no action will be taken) 2. User has logged in and browsing my site. session.isNew = false and Refere will not be null (no action) 3. User has already a session and opened a tab and hit the url to login again. session.isNew = false and Refere will be null
in last case I can take action to redirect the user to some messge page that you already login and something like that.