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
2 answers

How to check the HttpSession exists in Filter

I am having a javax.servlet.Filter in which I want to redirect to login page if HttpSession is new and redirect to the logout page if HttpSession expired and to some other page if HttpSession is present. The login and logout pages are external…
Achaius
  • 5,904
  • 21
  • 65
  • 122
0
votes
1 answer

how to kill http session after action completes in OAF

I am calling one action for csv download in IE9 using OAF framework. After processing gets completed, browser is showing the csv to Save or Download. But, problem is my browser gerts hanged with processing mouse sign,for which I have to press F5 to…
0
votes
0 answers

Missing spring http session object

I try in Spring to get the HttpSession like this. I know, there are better ways to do so, but this is a legacy code, so I have to handle it. private static HttpSession getHttpSession() { ServletRequestAttributes requestAttributes =…
Robert Moszczynski
  • 1,081
  • 2
  • 16
  • 26
0
votes
1 answer

What's the difference between HttpSession object and HttpContext object?

I am learning Servlet. But don't understand the major difference between HttpSession object and HttpContext object ? As both are used to keep track of the user. But I don't understand , are both of them being accessible across the user or servlet…
Archana Sarang
  • 101
  • 1
  • 9
0
votes
0 answers

Stateless service providing the data for Http Session

I have a simple service which produces some string value: class MyService { String foo() { return UUID.randomUUID(); } } This value is then put to an activeMQ queue "integration.uuids" by some Camel route. I want this value to be…
Alexey Buistov
  • 209
  • 2
  • 4
  • 11
0
votes
0 answers

Java HttpSession timeout not changing from no timeout to 10 minutes timeout doesnt work

Using java code and not in web.xml, I need to ensure the session is created at a particular page with no time out. Once the user goes past this page, the same session needs to have a timeout of 10 minutes. //I am using this to set to no time…
0
votes
2 answers

Restore the previous session, when browser back button is clicked, Wicket

Let's say there is a int x = 10 in the session, when I click a link, I change it's value to x++ in the link click event. Is there a way, in which, if I hit the browser back button, the session will be restored back to the previous version. Meaning,…
Soumitri Pattnaik
  • 3,246
  • 4
  • 24
  • 42
0
votes
1 answer

Is it possible to store whole object in struts session?

I'm developing an struts App. In one of the actions I instantiate an object, once instantiated i need that object to be available in other actions for the user using the App. Is there a way to store a whole object in the http session in Struts 1.3?
0
votes
1 answer

Tomcat limit http sessions, out of memory

I have a Tomcat 8 server that frequently runs out of memory. My guess as to what is occurring is that Tomcat does not limit the number of http sessions in memory, so if you get enough users, then the server will eventually run out of memory. I know…
James
  • 17,965
  • 11
  • 91
  • 146
0
votes
1 answer

Strange behavior : Spring Session Attributes vs ModelAttribute

I got a very strange issue with Spring MVC 4.0.6, hosted on JBoss 7.2. When updating an existing user, the submitted information sometimes get transferred to the POST RequestMapping controller method (validateUpdate method…
Charles Morin
  • 1,449
  • 4
  • 32
  • 50
0
votes
1 answer

Websphere 8.5.5 - shared session context not working

I am moving an enterprise application that contains 2 web modules. In the ibm-application-ext.xmi I have so the two web modules can use the same session. In WebSphere 6.1 this works just fine but in WebSphere 8.5.5 it is not working. Does anyone…
Irishpack
  • 11
  • 3
0
votes
1 answer

How to get a Http Session while a servlet is being initialised?

we can get the session if we can access to HTTP request object like below: HttpSession session = request.getSession(); But, How to retrieve the HTTP session inside init method of Servlet ? If the presentation Layer is powered by JSF , Can servlet…
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
0
votes
1 answer

IBM WebSphere Application/Portal Servers, TAI and HttpSession and Cookies

I have IBM WAS 6.1 and Portal 6.1. Also i have a TAI which works when user login/logout in/out Portal. I want to work with HttpSession in TAI. Shortly my task is next: when user logging in i want to save some parameter in memory and as a key i want…
dikkini
  • 1,184
  • 1
  • 23
  • 52
0
votes
0 answers

Trying to implement logging filter for JSF 2.0

I'm trying to implement loggin filter as described in this question: How implement a login filter in JSF? But can't get any attribute associated with currently logged user. I'm using Websphere 8.0 with build-in Apache MyFaces 2.0.3 My code is…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
0
votes
1 answer

How to store data in HTTP Session for a specific period of time?

We know we can store and retrieve data in HTTP Session. Is there any out of the box way to store the data in the Session, that will be automatically destroyed after a certain period of time (while the Session still stays and keeps other data…
siva636
  • 16,109
  • 23
  • 97
  • 135