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

Passing parameter values using a href, storing and retrieving them using session only with JSP's

As opposed to what my question suggests, I completely understand that it is not right to have any form of code in a JSP. But I have an important task to accomplish and this is the scenario : Once a link is clicked, the parameters that are…
suravich
  • 13
  • 1
  • 4
0
votes
1 answer

Servlet session data in java servlet

I noticed that servlets encode the session data to the URL (visible) when cookies are disabled. Doesn't this open the possibilities for attacks when someone is snooping on the traffic in the network ? Also, why isn't it added to data part and sent…
user3388324
  • 572
  • 5
  • 18
0
votes
0 answers

OpenSessionInViewFilter and object in session - Spring MVC

I'm having a problem with OpenSessionInViewFilter and objects described in Sections, to do in a given request, occurs: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: ... , could not initialize proxy - no…
0
votes
1 answer

How to get current session (HttpSession) object in @Scheduled method in Spring 4.0.2?

I am using Spring 4.0.2 for my Web Application. My Web Application is about file processing. There are some statues about files like "In Progress", "On Hold", "Completed". One user can complete multiple files, but only one at a time. So at a time…
Vishal Zanzrukia
  • 4,902
  • 4
  • 38
  • 82
0
votes
2 answers

Stateless session bean maintaining state

I deployed a web application on the localhost GlassFish server. This application takes order information from user and stores it in a List type variable in a Stateless Session Bean.The list object is created in the constructor. I open the order…
0
votes
1 answer

Session management using HTTPSession

I am trying to understand session management in JSP/Servlets using HTTPSession but got confused while visualizing in any web application.So needs clarifications.Suppose I am having one web application using JSP/Servlets. There is a login page.First…
user2800089
  • 2,015
  • 6
  • 26
  • 47
0
votes
1 answer

Do I need to lock HazelcastHttpSession instance when modify its attribute?

I am planing to use Hazelcast for Http session Clustering. I read this document - http://hazelcast.org/docs/latest/manual/html/httpsessionclustering.html and I understand that I need to setup com.hazelcast.web.WebFilter filter and this filter will…
LHA
  • 9,398
  • 8
  • 46
  • 85
0
votes
1 answer

HttpSession using servlets

I am trying to create a http session of 5 seconds. Here is the code protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub HttpSession…
0
votes
2 answers

Pass session attribute from jsp to javascript function

I'm trying to pass a HTTP Session attribute from a JSP page to a JavaScript function written in external JS file. When I'm writing JS part in body section without writing specific function it works fine but when I declare a function and try to pass…
SajithRu
  • 225
  • 1
  • 8
  • 24
0
votes
2 answers

HttpSession attribute : Why is the attribute not updated

I am practicing a little bit with sessions and servlets. I have created a servlet to test it, and I have the next "doGet" method: @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException,…
raspayu
  • 5,089
  • 5
  • 37
  • 50
0
votes
2 answers

Making HttpSession variable static?

I'm using a HttpSession session variable to store error/succes messages for various actions that my servlets are doing and I display those messages in jsp's when it requires. But is it ok to create a new HttpSession object in each of the methods I…
erasmus77
  • 327
  • 1
  • 5
  • 16
0
votes
0 answers

Are USERLANGUAGE and JSESSIONID cookies implicit?

As for the subject: Are USERLANGUAGE and JSESSIONID cookies implicitly part of HttpServletRequest? Even without declaring any httpsession? protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException…
Rollerball
  • 12,618
  • 23
  • 92
  • 161
0
votes
3 answers

HttpSession and JBoss. What is the effect of the session timing out?

Some code I have inherited creates a session with this line: HttpSession session = req.getSession(); //req is an instance of HTTPServletRequest In the config for the app the value for session-config is set to 10 (minutes). After that about the only…
user911625
0
votes
1 answer

How to populate data from servlet to dropdown

I Have a servlet where i have returned a list : protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } /** * @see…
Roy
  • 1,231
  • 1
  • 24
  • 61
0
votes
1 answer

Http sessions and hibernate combined use

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Registration; import Pojos.Users; import Pojos.hiber; import java.io.IOException; import java.io.PrintWriter; import…
sadman
  • 11
  • 3