On Mon, Jan 17, 2005 at 04:08:15PM -0600, Jonathan Wilson wrote:
: I'm setting a servlets private static variable from within itself  via 
: the contextInitialized(SCE) method but it's not accessible from the 
: init() method once that get's called...I would have thought the static 
: part would make that variable accessible to all thread of the servlet 
: that was started...or is something else going on? Any help is appreciated.

I didn't look all that closely for the bug itself, but this line caught
my ele:

: public class controller extends HttpServlet implements 
: ServletContextListener {

Any reason you're putting both in the same class?  You could have one
ContextListener class instantiate a variable and store it in Application
scope; then, the servlet could retrieve it in its init() method.  (Be
sure to use the init( ServletConfig ) overload in that case.)

Are you sure the ContextListener is being fired? (i.e. that it's been
properly registered?)

Another question: I don't have the JavaDoc in front of me, but does
ContextListener (or any of its parent classes) have an init() method?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to