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

Where does the Grails Spring Security plugin save currentUser in HttpSession

it is famous to get the current user by calling : springSecurityService.currentUser ; Does Spring Ssecurity API save this object in HttpSession. if So, how to access to this object from session . i.e: session['currentUser']
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
0
votes
1 answer

Jsf 2.2 with servlet filter

I use jsf 2.2 and i want to redirect jsf pages to login page without session i didn't use http session here.iam trying to use session scoped variable and check whelther variable is null or not and redirect it to login page because session scoped is…
user
  • 11
  • 1
0
votes
1 answer

Reused HttpSession in Resin 4.0.41

I am using Resin 4.0.41 and have trouble when creating new session using HttpSession. I have following codes: // "request" has type of HttpServletRequest HttpSession session = request.getSession(false); if (session!=null) { …
danisupr4
  • 815
  • 1
  • 9
  • 22
0
votes
1 answer

My java server does not recognize the HTTP session. Client on VB.NET

I have a java application running like a server in Tomcat for my web app and my app cordova (same as the web application but with functions like a BarCode Scanner). With this application the server works perfectly. But now I am developing a little…
emilioxiri
  • 113
  • 2
  • 10
0
votes
1 answer

JSP/Tomcat secure login with sessionstorage

I have a system running on Tomcat, with HTML/JSP in front-end, and java/Spring/Struts in backend. I made a login-feature where the user enters his username and password. In backend, I validate the username and password to the stored user in DB. If…
TorK
  • 567
  • 2
  • 10
  • 27
0
votes
1 answer

openid RP not maintaining session between calls to provider

I have a working "relying party" app that uses a thirdparty OpenID provider for login. However, if I attempt login in with a "home grown" OpenID provider which uses the org.openid4java.server.SampleServer, the session is not maintained between…
0
votes
1 answer

Need of getSession(boolean create) in HTTPServletRequest

Why doesn't container create the instance of HTTPSession when it receives first request, the way it does it for ServletContext or ServletConfig? Since sessions are managed by container, it would be logical to create session instance when it receives…
0
votes
3 answers

"Global HttpSession" in java

Example, I have 5 different users logged in my application. Each account has a session id saved in my db. But, I want to check if each session Id is active every now and then. I am planning to create a some sort of global container that holds all…
whoknows
  • 296
  • 1
  • 4
  • 18
0
votes
1 answer

Getting and NullPointerException while accessing to a session attribute

I am trying to access to a session attribute from a Filter in my webapp running on Tomcat: boolean socialLogin = (Boolean) session.getAttribute("socialLogin"); I'm getting a NullPointerException, how can I handle the situation of if the attribute…
Rafa Romero
  • 2,667
  • 5
  • 25
  • 51
0
votes
1 answer

Spring mvc unable to fetch attribute set in session

I am using Spring MVC and JQUERY to implement a 2 step process to submit data from a form to the server: A JQUERY ajax POST request would submit the file data from form to the server on click of file browse. This would store the file on file server…
inw
  • 1
  • 1
  • 4
0
votes
0 answers

How to override\change HttpSession timeout in OC4J 10g (10.1.3.5.0)

In my WAR's web.xml, I added the following XML tags: 1 Although I've done that, the session doesn't timeout after 1 minute. I registered a HttpSessionListener to monitor the…
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
0
votes
1 answer

Create http session in filter

My xhtml web pages are called from an external system using a simple request, I suppose to check if the user name - given from the request - is valid or not, if valid he suppose to get to the home page, other than that he is redirected to the…
Yara Mousa
  • 79
  • 6
  • 15
0
votes
1 answer

Keep http session alive whilst use is on page

If call HttpSession.setMaxInactiveInterval() with 3600 - meaning an hour and have an AJAX script that hits my sever every 10 minutes, will that be sufficient? I can't seem to find a reason way to see what sessions are expiring and why, otherwise I…
Cheetah
  • 13,785
  • 31
  • 106
  • 190
0
votes
2 answers

ActionContext.getContext().getSession() and NullPointerException

I am developping an application with Struts2, Spring, Spring security and Hibernate. I need to use session, I try to define my session with this code: Map session = ActionContext.getContext().getSession();//line 1 session.put("objet",objet);//…
0
votes
1 answer

HttpSession reinit by Chrome

I develop a website in Java und Tomcat 7.0.53, with Authentification from User. When authenticated, the user is saved in the HttpSession. Under firefox, everything works fine. But under Chrome, it seems that the session is reinitialized after a…
Hermios
  • 622
  • 1
  • 5
  • 20