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 can I open two connections on one session?

My (chat) program starts a session almost immediately, then in a separate thread it uses long polling to maintain a connection with it until it receives information. while(Globals.clientIsLoggedIn) { ... response =…
user1499731
0
votes
1 answer

Java Session in Jboss Cluster

Our application was working fine in SIT enviornment(not in cluster) . Now we moved it to UAT enviormmnt which is in JBoss cluster(2 nodes one cluster). Now a strange problem. 3 war files were deployed: Admin application EHS app Visa app…
asna
  • 31
  • 3
0
votes
1 answer

Glassfish create more than one http session in realm authentication

I have a question about realm authentication, where glassfish create more than one http session. Here's an example Web.xml: AllPages
kouzouigh
  • 93
  • 6
0
votes
1 answer

Servlet automatic navigation after session expire

Hi folks when I searched that How can I capture event on session expire then I found that HTTPSessionListener is available for this purpose.But while using that class I collided with another problem.Actually I want that when someone's session…
khan
  • 2,664
  • 8
  • 38
  • 64
0
votes
4 answers

Set/Get Objects from HttpSessions (Java)

I set an object into an HttpSession. This object is an instance of class User. Then, in another class I'm trying to do something like this: User user = session.getAttribute("userObject"); I read about Serializable but I can't understand how it…
Alex Dowining
  • 980
  • 4
  • 19
  • 41
0
votes
1 answer

Does session timeout get affected if session sharing is achieved between two java web application

If i share session(HTTPSession) of one java web application deployed and running on a dedicated machine in tomcat with other java web application deployed and running on a separate machine in tomcat, will the session time out get affected? i mean if…
Vinodborole
  • 165
  • 2
  • 15
0
votes
1 answer

Can i use session scoped bean instead of httpsession for maintaining sessions

I'm stuck at this question. I've used httpsessions before. But this time, I got this thing to choose between the two. A session-scoped managed bean or an httpsession. What do you suggest ? Please mention pros and cons of each. Thanks for helping :)
Mudassir Shahzad
  • 542
  • 2
  • 16
  • 32
0
votes
0 answers

thread to keep web service session alive

I have a client application which accesses a web service api using apache axis. My client is a service which calls the web service randomly. So I do not know when exactly the interaction happens. I want to keep the session active betweeen the web…
Praveen
  • 166
  • 2
  • 4
  • 13
0
votes
1 answer

Get session from outside service class in GWT

I successfully use the session in my services using : getThreadLocalRequest().getSession() However my application being separated in layers, a method from my service will call another method from Business layer, then calling DAO layer methods. In…
Michael Laffargue
  • 10,116
  • 6
  • 42
  • 76
-1
votes
1 answer

Swift HttpSession decode arrays

I have a code to send post requests to a NestJS api. It works, but there's a request that returns the following json: (Multiplied the entrires to help understand the context) [ { "friendshipid": "64ad04f03e3afbddb87f2c82", …
Noel
  • 35
  • 6
-1
votes
1 answer

Understanding security mechanisms of JHipster: When to use JWT, HTTP Session or OAuth2 and OpenID Connect?

I'm creating a monolithic application (something like a e-commerce or a marketplace) and I'm concerned that it is secure. I understand (broadly speaking) how JWT works, but not sure about HTTP Session or OAuth2 and OpenID Connect. When is it…
Polkov
  • 13
  • 1
-1
votes
1 answer

what is __flexSession attribute in HttpSession

i want to know what is __flexSession attribute in httpsession. Working on an application front is flex, wildfly10 is application server and back end is java. HttpSession has an attribute with name of __flexSession, which has HttpFlexSession…
user3311231
  • 33
  • 1
  • 8
-1
votes
2 answers

where HttpSession's setAttribute("attributename",object) Object will be stored?

class SessionStorage extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session=request.getSession(); int schoolId=100; …
Viju
  • 21
  • 3
-1
votes
1 answer

How to forward request and response on a link click

I have a web application. The user will log in and will be presented with a Mainpage. The mainpage is a servlet thus created by a out.println() method. I have a link which when clicked by the user will be redirected to another page say products. But…
Adarsh Jain
  • 165
  • 1
  • 2
  • 12
-1
votes
3 answers

How do I put a Java object into a HttpSession and use it across all my packages?

I am developing a Java Web Application which consists of a lot of JSPs, JSs, Servelts, while business logic is handled in POJOs. My need is to initiate a class inside my Servlet, and set is as a global variable, and use it throughout all the…
Sriram Sridharan
  • 720
  • 18
  • 43
1 2 3
43
44