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

Http Session for unauthenticated application

I am implementing one web application which is sort of unauthenticated for new user, and it will be used by another web app i.e. not used directly by end user, but the parent web app is not in my control. So through my web app new user can buy the…
Girish
  • 1,717
  • 1
  • 18
  • 30
0
votes
1 answer

HttpSession.getSession().isNew() is always true

I'm working with a HtppServlet and I need to use the session in order to know what I have to do (first time or not). But when I when the session it seems is always a different one, so the process always does the same it's supposed to do the first…
zepol
  • 187
  • 5
  • 20
0
votes
0 answers

HttpSessionStateBase losing property values of inherited type

We are using HttpSessionStateBase to store messages in a set up similar to this working example: public class HttpSessionMessageDisplayFetch : IMessageDisplayFetch { protected HttpSessionStateBase _session; private IList
0
votes
1 answer

Unable to get session.getAttribute in RequestMethod.POST

I have tow method and using Spring MVC, first is a method=RequestMethod.GET and there I set session.setAttribute("clientId", "abc"). Second method is a method=RequestMethod.POST where I do this: HttpSession session =…
user614946
  • 599
  • 5
  • 10
  • 27
0
votes
1 answer

Glassfish v3 + NetBeans + Simple Authentication Simulator : Why do I get an exception related to serialization?

Greetings, fellow StackOverFlow members. I have just begun to learn how to program web-enabled applications using technologies such as Java Enterprise Beans and Java Persistence API. The official NetBeans website currently offers a bundle that…
0
votes
0 answers

java: identify the actual http connection

I'm developing a HTTP server using HttpServer class. The code is like the following. public static void main(String[] args) throws Exception { HttpServer server = HttpServer.create(new InetSocketAddress(8989), 0); server.createContext("/",…
Kallel Omar
  • 1,208
  • 2
  • 17
  • 51
0
votes
0 answers

JSF bean method not being called from filtered page

I have a page containing a p:commandLink that calls a very simple method on a session-scoped backing bean. The backing bean method simply logs a message to the console and redirects to a welcome page. When run, the link does nothing. There are no…
tommccann
  • 133
  • 1
  • 10
0
votes
1 answer

Need help on HTTPSession Timeout

I'm developing a webapp, purely on JS and Rest WS. Deployed on Weblogic. Using FORM Auth for Login and Session Invalidate for Logout. For session timeout I've two logics 1) web.xml session timeout configuration 2) JS timer, that checks for click or…
Prateek Agarwal
  • 407
  • 1
  • 8
  • 20
0
votes
1 answer

Java : HttpSession timeout filter check returns valid session object

My Web App is purely JS app with crossroads js for routing. For Login I'm using j_security_check FORM Auth and /LogOut servlet to invalidate session. Issue 1 The real issue comes when the session is timed out, the login.html is rendered in part of…
0
votes
1 answer

Trying to set and get attribute from one class to another via a 3rd class in JAVA

I have a bean class which looks like this @ManagedBean(name = "usingBean") @SessionScoped public class UserInfo implements Serializable { private static final long serialVersionUID = 2668727340500045081L; String loginId; } I set this…
CSD
  • 11
  • 1
0
votes
2 answers

How to get HttpSession from sessionId in grails application

I have grails application, using sessionRegistry I can get sessionId. Now, how can I get HttpSession from that sessionId.
Pankaj Shinde
  • 3,361
  • 2
  • 35
  • 44
0
votes
0 answers

Is there only a single HTTP Request associated with a HTTP Connection?

The source of confusion is this answer. To be honest, I know what is Http Request, Http Session, but I have never heard this - Http Connection. So it boils down to this only. What exactly is the difference b/w Http Request & Http Connection?
Farhan stands with Palestine
  • 13,890
  • 13
  • 58
  • 105
0
votes
0 answers

Why is injecting a Stateful Session bean in JSF/ CDI managed beans is considered bad?

Pascal Thivent mentions here that - If you are using SFSB, then you must avoid injecting them into classes that are multithreaded in nature, such as Servlets and JSF managed beans (you don't want it to be shared by all clients). Moving swiftly…
Farhan stands with Palestine
  • 13,890
  • 13
  • 58
  • 105
0
votes
0 answers

HttpSession Attribute vs SessionScoped CDI Bean

In my project I have a @Stateful UserSessionData bean that only stores user data. Upon a user logging in, it gets brought forth with a JNDI lookup, populated, and stored in a HttpSession attribute. My question is: shouldn't I instead create a…
John
  • 23
  • 1
  • 8
0
votes
1 answer

Is there a way to keep track on user's sessions within applications in the same tomcat?

I have multiple applications (wars) deployed on same Tomcat application server. Each application has form login and uses Spring Security to authenticate. There is a centralized application (not in same Tomcat) from which Spring Security checks user…
Nordkraft
  • 125
  • 2
  • 9