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

Avoid REST service to be consumed twice

I have a question about Spring MVC controllers scope and REST services. I have a couple of REST services, wich returns a token in the response so I can later recreate the state of the application, but I don't want the users use the same token twice,…
maxivis
  • 1,727
  • 3
  • 21
  • 35
0
votes
0 answers

spring boot application with HttpSession : Can not get get session attributes

***I am trying to implement session management in spring boot application using HttpSession. when i call a web service through postman client,session attributes are accessible.But while accessing from application,it wont be available. This is my…
0
votes
1 answer

session times out despite activity in an app built with Spring boot and embedded jetty

We have the following: Java 8 web app developed with Spring Boot and embedded Jetty. The UI for the app is built using react. The backend exposes multiple REST APIs via Jersey. The authentication is done using SAML with Okta as the IDP. We use…
0
votes
1 answer

Is there a way to log httpsession when it times out?

When httpsession times out, is there a way to log something like "Httpsession with JessionId :'blabla' time out"?
Jinxin Ni
  • 331
  • 3
  • 10
0
votes
0 answers

href link not working for the first time in email

I have href link which was built on java, I am using it for forget password. when ever user clicks forget password it asks for email id, user enters email and it sends email with a link where user can enter new password. but this functionality is…
0
votes
1 answer

ASP.NET HttpSession.Abandon not closing redis connection

I'm using redis as my SessionState provider, but i cant get the infrastructure to close the connection when I Session.Abandon()... so if a user is simply logging out so another one can login (very common scenario for me, since they share a…
Leonardo
  • 10,737
  • 10
  • 62
  • 155
0
votes
1 answer

Getting null in HttpSessionStateBase c# unit test

While running my unit test method, I am getting null values in instance of HttpSessionStateBase. I have mocked the httpcontext like this var httpRequest = new HttpRequest("", "http://localhost/", ""); var stringWriter = new StringWriter(); var…
Jidheesh Rajan
  • 4,744
  • 4
  • 23
  • 29
0
votes
1 answer

Session not invalidated properly, throwing "Session is invalid"

I have an JSF 2.2 application using Wildfly 10 as server. Users are logged in and added to a list of online users: HttpSession session =…
erickdeoliveiraleal
  • 708
  • 2
  • 9
  • 21
0
votes
1 answer

Session Management in Tomcat?

I understand that session ids generated by tomcat are unique and fairly random. However I am wondering if that is true between tomcat restarts i.e. Is their any possibility that same session id is generated again after server is restarted ?
Amit
  • 13,134
  • 17
  • 77
  • 148
0
votes
1 answer

Spring MVC when autowired HttpSession will be created?

Issues in using AutoWired HttpSession: LoginController calls LoginService passing HttpServletRequest as parameter. I've autowired HttpSession like this in few other annotated classes (but NOT in LoginService): @Autowired private HttpSession…
Swamy
  • 49
  • 1
  • 9
0
votes
1 answer

ComboBox from a List or a Map Collection

EDIT: I want to show a spring-mvc dropdown box out of a object list which is a property from another class. I did this after searching:
Germán Acosta
  • 57
  • 1
  • 13
0
votes
2 answers

Keep reference to HttpSession while it passivates/activates

Jetty has this functionality where it can evict idle HttpSession objects out of memory and persist them on disk (passivation). Once a new request arrives with the same session id, it'll be brought back into memory (activation). Jetty 9.2 and 9.3…
0
votes
2 answers

Error in Storing Session and to display Success message Laravel 5.3

I followed the documentation on Laravel 5.3's HTTP Session https://laravel.com/docs/5.3/session Its not that to me in using this feature. I created the sessions table via the laravel's documentation but Im not getting any stored sessions on the…
jean chu
  • 145
  • 4
  • 13
0
votes
1 answer

is using a session is the best way of implementing a shopping cart in java?

I want to implement a shopping cart in my upcoming java project(i will be using your basic JSPs and servlets) The first thing that came to my mind is to store the shopping cart elements in the user session (httpsession), but I think it is poor to do…
A.Alqadomi
  • 1,529
  • 3
  • 25
  • 33
0
votes
0 answers

How to invalidate HttpSession on logout

See code below. getSession(false) returns a session, but getAttribute returns null. The session has already been invalidated (basically because this method gets called twice in the situation I'm testing). The error that I'm dealing with is that…
Jessica
  • 1
  • 2