开发者

How do you avoid using jsessionid?

I heard that ebay uses Java, but I did开发者_Go百科n't find jsessionid cookie when I signing in.

Are there alternative techniques exists to track users sessions? How do you avoid using jsessionid?


There are may, many different options to achieve this. The simplest one I can think of is to store your own cookie and use memcache (or similar) to share the session data between all your servers.

With this solution, you don't have the problem of your session living on only one server.


I checked just now that ebay actually created 7 cookies out of which 4 would expire as soon as I close my browser (one or more of them may actually be for session management).

To maintain information about a user session on HTTP which is stateless, the server must give the client a unique identification which must be used in later requests to the server for identifying it as the same client. This unique identification is mostly stored as cookies, sometimes passed on and on as a request parameter or you can use any other suitable method so that the identification is not lost.

As far as I know, automatic setting of JSESSIONID can be turned off in a JSP application and our own session management method can be used.

<%@ page session="false" %>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜