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
0
votes
1 answer

Shiro subject on HttpSession

I'm using Shiro on my application layer which is served trough web requests. I think SecurityUtils.getSubject won't work as expected as I want to save the current subject through different requests, and I don't want to use Shiro Web utils, because I…
bgarate
  • 116
  • 2
  • 9
0
votes
1 answer

Is Http session timeout reset on ajax call?

I have a Java Servlet app with session tracking mechanism using HTTPSessionListener. Front end script of my app periodically makes ajax calls to the server after 10 seconds. I have set session timeout to 1 minute. Session timeout doesn't seem to…
aBhijit
  • 5,261
  • 10
  • 36
  • 56
0
votes
0 answers

Can I manually set session ID in Java?

I am developing a simple publish subscribe application in Java. I am planning to use session ID as channels/topics. Can I set the session ID manually?
aBhijit
  • 5,261
  • 10
  • 36
  • 56
0
votes
2 answers

Sharing httpsession between themes and portlet in different portlet application

I am trying to share the httpsession between themes and portlet in different portlet application. But it always return null value in the portlet. The themes is posting in to a servlet to store httpsession : HttpSession session =…
cyrilforce
  • 11
  • 2
0
votes
0 answers

Data found after session invalidate

I'm working with a framework and getting an issue which i can't get to the end of. We have the following code: String returnValue = LoginWorker.logout(request, response); ShoppingCart newShoppingCart =…
Zsolt János
  • 491
  • 8
  • 18
0
votes
2 answers

How to Delete the data from database when user close the browser

I am new to Programming I searched a lot in online but no one could satisfy my requirement.Here I want to delate data from database when user close the browser window. Here i found one solution in stack overflow public class YourHttpSessionListener…
kondapaka
  • 132
  • 1
  • 10
0
votes
2 answers

State of HttpSession instance after timeout?

What makes the HttpSession instance expire as after time-out also when checked if(session!=null){ System.out.println("The instance is not null"); }else{ System.out.println("The instance is null"); } each time the…
wadjikars
  • 21
  • 1
  • 1
  • 3
0
votes
1 answer

same HttpClient multiple request ends up with different HttpSession

I am using the new Apache HttpClient 4.2 (not the one from Apache Commons). I need to open up one HttpClient and make multiple requests to the same server. From the documentation, the httpClient should automatically maintain the cookie, and…
bhomass
  • 3,414
  • 8
  • 45
  • 75
0
votes
1 answer

JBoss Tools: javax.servlet.* could not be resolved

The namespace javax.servlet.* could not be resolved in Eclipse. I'm using Eclipse for Java EE developers + JBoss Tools. Any idea for a clean solution?
mitchkman
  • 6,201
  • 8
  • 39
  • 67
0
votes
2 answers

Session not committed before the end of function

I have a big action that takes 50 seconds to process. But, at the same time, I have another action that could be processed on the server (by clicking on a link). However, if my second action try to access session's attributes put by my first action,…
Florent06
  • 1,008
  • 2
  • 10
  • 29
0
votes
1 answer

Issue with tracking maximum login attempts using servlet and HttpSession

I am trying to limit the number of maximum login attempts. Here is what I am doing currently: 1.) Store the login counter in the session 2.) On every login attempt comparing the counter stored in the session 3.) If counter is smaller then maximum…
me_digvijay
  • 5,374
  • 9
  • 46
  • 83
0
votes
3 answers

can't store parameter in session (Spring MVC)

I have the following problem with annotation based Spring MVC: I have two Controllers (LoginController, AdminController) and I can pass an object (loggedInUser of type BonjourUser) form the LoginController to the AdminController by persisting it in…
m5c
  • 15
  • 1
  • 5
0
votes
1 answer

Http Basic Authentication with session identifier

I’m using Http Basic Authentication for my API access from a mobile application. Unfortunately I need to keep state internally. As the state is per session I can’t use username/password as the state key. It seems like I have to add something like a…
0
votes
0 answers

Vaadin request processing per http session

Am using Vaadin 6.8. Though the below link describes how Vaadin supports multiple browser tab, https://vaadin.com/web/joonas/wiki/-/wiki/Main/Supporting%20Multible%20Tabs Tabs of same browser will be using same http session and hence same…
Tejas
  • 1
0
votes
1 answer

Fail to retrieve value from HashMap with HttpSession as key

I have a HashMap where I am putting HttpSession object as Key and HashSet as Value HashMap> map = new HashMap>(); I have a HttpSession listener where I need to check weather session object…
user1448652
  • 169
  • 2
  • 4
  • 9