You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chappell, Simon P" <Si...@landsend.com> on 2003/10/16 18:39:39 UTC

[Semi OT] When does a servlet get a session?

OK, I have a servlet running alongside my Struts application and it is basically used to start (from the init() method) a separate network listener for handling network requests from a number of PLC units that are incapable of generating HTTP traffic, only straight socket connections, blasting a wierd protocol called DF1 and then waiting for a reply.

We have all of that working. But now we want to store a piece of information in the servlet session so that we can load-balance on a WAS cluster. When we call back into the servlet to store the information, our session information is null.

My question is ... when does a servlet get a session and can we force one from the init method? This servlet never gets called, so we never have an HttpSession. Can we force it to create an HttpSession?

Simon

-----------------------------------------------------------------
Simon P. Chappell                     simon.chappell@landsend.com
Java Programming Specialist                      www.landsend.com
Lands' End, Inc.                                   (608) 935-4526

"Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense." - Sir Winston Churchill

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org