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

How to get last accessed time?

I want to show the last accessed time on the user's profile page when the user logs in again after logout. I am using HttpSession. I have three servlets Login Logout Profile where should I use long lastTime = session.getLastAccessedTime(); here is…
SPGuar
  • 353
  • 6
  • 17
0
votes
1 answer

Can I store an entire graph in the Java HttpSession?

I am developing a web application which basically lets the user create a graph in his browser (in the server the graph is basically a List of nodes and each node has a List of edges). Each node or edge that the user creates or deletes is…
Felipe T.
  • 637
  • 1
  • 8
  • 14
0
votes
0 answers

Sandbox error after multiple flex clients from one http session

Dealing with a Flex client that needs to connect through BlazeDS to a Java backend. Currently, we have a requirement for fifty-plus clients to be attached at any given time. We need to test the load of this requirement against the server to see if…
dakira
  • 333
  • 3
  • 5
  • 12
0
votes
1 answer

Session Timeout/Expiry in java

Is it advisable to set -1 what are the dis advantages of doing so ??? Is there any better way to make sure the session never expires ???
Ragesh Kr
  • 1,573
  • 8
  • 29
  • 46
0
votes
1 answer

Measure the size of Session Attribute Objects

I want to measure the size of an object (Serialized or not) when it is set to HttpSession. How can I do this ? Even some supporting questions found, it could not be used.. Any one know how I can do this ? Probably, usage of session listener could…
Débora
  • 5,816
  • 28
  • 99
  • 171
0
votes
1 answer

Reset session timeout in Websphere by Keypress / Mouse events

I have set the session timeout in my WebSphere as 3 Mins (Consider.Actual timeout I have set is 30 mins).I have kept my application open and just moving my mouse over the J2EE application and making some keypress which will not submit any pages.Even…
explorer
  • 1,074
  • 2
  • 11
  • 31
0
votes
1 answer

Grails Get null value from stored instance in session

I am working on grails. My requirement is to get an object in whole application per user till user's session is available. After start my application when I logging in as user,after that I put an object in session. Object object =…
user1791574
  • 1,729
  • 2
  • 16
  • 30
0
votes
1 answer

Spring Security: HttpSession lost after authentication

I'm trying to use Spring Security 3.1, but I'm losing my HttpSession after the authentication. I'm getting: "No HttpSession currently exists" after having a correct HttpSession created. I'm getting the following log: 08 janv. 2014 19:53:59 DEBUG…
user3175671
  • 1
  • 1
  • 4
0
votes
2 answers

Mock HTTPSession

I use jdk1.6.0_24, when I try to mock HTTP session with Mockito I have the next error: java.lang.UnsupportedClassVersionError: javax/servlet/http/HttpSession : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native…
user2993815
  • 169
  • 2
  • 6
0
votes
2 answers

HttpSession Servlet don't work correctly from a servlet to a servlet

Good afternoon, I'm trying to recover an instantiated object from a servlet in the HttpSession object. When I try to recover from the JSP, I get the object smoothly. However when I try to retrieve this data from another Servlet, not me gets the…
user2606850
  • 485
  • 4
  • 12
0
votes
1 answer

EasyMock - HttpSession Setting session - method pass via request

I'm wondering on a request pass to a method and pulling the HttpSession? Following from JUnit: @Test public void testSessionPass(){ HttpServletRequest request = createMock(HttpServletRequest.class); HttpSession session =…
ogottwald
  • 113
  • 1
  • 3
  • 15
0
votes
1 answer

EasyMock handling HttpSession

How do I get EasyMock to work with HttpSession. I'm doing the following: System.out.println("begin"); HttpServletRequest request = createMock(HttpServletRequest.class); expect(request.getParameter("firstName")).andReturn("o"); …
ogottwald
  • 113
  • 1
  • 3
  • 15
0
votes
0 answers

JSP retaining values while navigating multiple windows

Assumption: MVC framework is being used In the web application ,there is parent(main screen) where the values are displayed through the request scope and an event on parent window popups the child window. Then if user does update some value in…
devv
  • 311
  • 5
  • 17
0
votes
1 answer

Http session in littleproxy

How do we handle the http session in littleproxy? I read about couple of approaches where in which one can use HTTP cookies and other is HTTP authentication headers. Does littleproxy supports cookie handling or does it support the authentication…
0
votes
3 answers

HttpSession CDI injection in servlet project

I have problem with my project for studies. I have simple project with one servlet and I need to have some CDI beans with diferent scopes. This part was realy simple, but I have to be able to inject HttpSession into each of me CDI beans. To resolve…
gandalfml
  • 908
  • 1
  • 10
  • 23