wood burning stoves*
The moose likes Servlets and the fly likes Regarding cookie disable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Regarding cookie disable" Watch "Regarding cookie disable" New topic
Author

Regarding cookie disable

sujava mam
Greenhorn

Joined: Dec 15, 2006
Posts: 5
Hi all,

I am storing user details in cookies which will be used when user connects to same site again.But when cookies are disabled i cannot store the details required.Is there any alternative solution for thsi problem. I mean can i store details other than in cookies or session.I want 2 read those values whe user connects 2 site again.

Kindly advice me.

Regards,
Srijava
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can maintain session information without cookies by using url rewriting.
For long term persistance, however, without cookies, you won't be able to remember users when they come back unless you ask them to log in with a username and password.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sujava mam
Greenhorn

Joined: Dec 15, 2006
Posts: 5
Hi,

I have never worked on url rewriting . can any one give me some sample code to understand what is url rewriting.

Regards,
sujava mam
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Look at SRV.7.1.3 in the servlet spec (link in my signature).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41040
    
  43
There really is no code to show. You turn off cookie support on the server (or, alternatively, in the browser) and if the web app now requests a session -and you have encoded all URLs in the HTML code you generate by using HttpServletResponse.encodeURL- then you should see the session IDs as part of all URLs in the HTML.


Ping & DNS - my free Android networking tools app
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by sujava mam:

I mean can i store details other than in cookies or session.I want 2 read those values whe user connects 2 site again.


For tracking requests from the same client, there are couple of other ways other than the usual cookie way that you can use.
But about the exact problem that you have asked , that is storing in client some information other than by using cookies , I do not think you can do so.
Please do not take my question as hijack.
Do not you feel that there is a good risk by giving someone the ability to write to your disk remotely?




Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding cookie disable
 
Similar Threads
Where to keep client state
Session tracking
Click tracking in Java
Running a event listener before a filter
A few questions regarding SSO