If your servlet never services http requests, how is an http session useful? You can only access the session through a request - which you'll never have.
Would the servlet context work? getServletContext().setAttribute(...) -- Voytek Jarnot Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? > -----Original Message----- > From: Chappell, Simon P [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 16, 2003 11:40 AM > To: Struts Mailing List (E-mail) > Subject: [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 [EMAIL PROTECTED] > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

