Questions tagged [httpsession]

An Java interface used by the servlet container to create a session between an HTTP client and an HTTP server.

An Java interface used by the servlet container to create a session between an HTTP client and an HTTP server. The session object has an expiration time which allows the container to invalidate the session after that specified time of the user inactivity. It is active while the user making requests, across more than one connection or page and remains active after the user exit application and stay active until it's expired. The server persists the session object for the user between restarts. While it's valid the session interface allows the application to bind objects to it and access then from different requests of the same user. A session usually corresponds to one user, who may visit a site many times. The server can maintain a session in many ways such as using cookies or rewriting URLs.

Details from the API docs:

Tutorials:

655 questions
3
votes
1 answer

Google App Engine how to track httpsession destroy

anybody knows how to track httpsession destroy with GAE? I've found that HttpSessionListener doesn't work properly in GAE and sessionDestroyed method never calls. To be more specific I have an information that I store in database when user logins to…
endryha
  • 7,166
  • 8
  • 40
  • 64
3
votes
1 answer

springmvc validate httpsession containing userobject

I need to validate HttpSession (for Spring MVC Application) in a better way for my current Project. Here is the Scenario: 1) Once user is successfully validated, userObject object is added to httpSession class HttpSession session =…
Ankit
  • 2,126
  • 4
  • 33
  • 53
3
votes
0 answers

Java spring HttpSessionListener

I wrote my own SessionExpireListener that will be invoked when session is deleted. All my sessions are stored in redis. So i am using @EnableRedisSession(maxInactiveIntervalInSeconds = 10) annotation. When i run my server…
3
votes
1 answer

Spring MVC: How autowiring of HttpSession works?

I would like to know how autowiring of HttpSession works. If we declare like below: @Autowired private HttpSession httpSession; When exactly in the Spring workflow, httpSession variable declared above will be initialized with…
Swamy
  • 49
  • 1
  • 9
3
votes
3 answers

Java Servlets and HttpSessions

Very basic question. I have a portal containing several servlets, one of which takes care of logging in (but only as an admin). How do I use HttpSessions between Servlets to know if the admin is signed in? Thanks in advance!
whirlwin
  • 16,044
  • 17
  • 67
  • 98
3
votes
2 answers

What method to use for logout in wicket application?

Wicket org.apache.wicket.authroles.authentication.AuthenticatedWebSession has 2 methods: signOut and invalidate. The javac says that signOut mark use not logged in while invalidate do the same (e.g. call signOut) but remove the logon data from…
Cherry
  • 31,309
  • 66
  • 224
  • 364
3
votes
3 answers

Implementing a generation of HttpSession key

I am trying to implement a generation of HttpSession key I am generating a random number between 1,000,000 to 9,999,999 and send it as a cookie to the user. Is it possible to make this process secure? anyone can make a random number like that and…
user399950
3
votes
2 answers

Session management in Dropwizard 0.8.x

Can someone give me insight of how do I implement session management in Dropwizard 0.8.x or above. I was using Dropwizard 0.7.0 till now and working perfectly in it. But I really confused by change docs provided when I migrated to 0.8.x. In…
Yash Krishnan
  • 2,653
  • 1
  • 18
  • 22
3
votes
2 answers

Access a HttpSession in a ClientHttpRequestInterceptor in Spring MVC

I access my sessions in Spring MVC controllers simply with @Autowired like this: @Autowired private HttpSession session; The problem is, I have now access the session within a ClientHttpRequestInterceptor. I tried it with…
Robert Moszczynski
  • 1,081
  • 2
  • 16
  • 26
3
votes
1 answer

A new HttpSession for each request?

I've always taken for granted the JSESSIONID cookie created for every fresh request for a given client when developing applications using the servlet specification. But after giving it a bit of thought, isn't is more logical for the servlet…
sasuke
  • 6,589
  • 5
  • 36
  • 35
3
votes
1 answer

Setting non-serializable attribute value into HttpSession

I get an error sometimes when I deployed project, but does not it every time. Localbean does not work when the error error message Warning: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession (key: localBean, value class:…
SerefSEVEN
  • 45
  • 3
  • 11
3
votes
2 answers

How does a tomcat server identify clients for creating session id

I need to learn how a tomcat server identify different hosts to create unique sessions. Does it do it according to Ip ? Based on answer to this question, I want to be able to create multiple sessions for single client, on a server which uses simply…
Ozum Safa
  • 1,458
  • 2
  • 15
  • 27