Application scope variable on startup



Hi,

I have my own ResourceFactory which returns a bean. I configure this
resource factory in tomcat 5.5 context xm file.

I would like to create a application scope variable on tomcat startup
and assign the value from the bean.method().

Is there anyway we can do it using web.xml?

This can eliminate to create JNDI initialContext in every jsp as I
would be dependent on this application scope variable on each page.

Thanks

.



Relevant Pages

  • Re: Tomcat - access another context
    ... > I have two different context in Tomcat 4. ... Store bean reference to app1 context: ... Another way would be to use a global resource references where you access ...
    (comp.lang.java.programmer)
  • Tomcat - access another context
    ... I have two different context in Tomcat 4. ... Now i want to access one of my bean which resides in one context from ...
    (comp.lang.java.programmer)
  • Re: Unsupported major.minor version 49.0
    ... my webapps, I've been reading about this in the Tomcat Docs, and even though I have tried to do what it says here I get SEVERE errors when Tomcat is starting up (I mean if I define a element in either conf/Catalina/localhost/admin.xml, balancer.xml, or manager.xml (does it make a diff. ... and define the context there. ... The context xml file defines some things ... is appBase setting in the that owns this webapp. ...
    (comp.lang.java.help)
  • Re: Unsupported major.minor version 49.0
    ... I've been reading about this in the Tomcat Docs ... >> Create a separate yourownwebapp.xml file, and define the context there. ... Note, I spoke of the "context xml file", not the webapp. ...
    (comp.lang.java.help)
  • Re: Tomcat/JSP 404 Error
    ... >> webapps folder. ... > statement at the top of every servlet file, ... However, to create a context in Tomcat, go to your ...
    (comp.lang.java.programmer)