Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Re: servlets - application level object (http://www.velocityreviews.com/forums/t123904-re-servlets-application-level-object.html)

Wendy S 07-01-2003 01:07 AM

Re: servlets - application level object
 
Miguel De Anda wrote:

> Is there some application level object that I can use to store settings
> such as database connection info and directory settings? I need something
> that is at least readable throughout my servlets (writing settings after
> initialized is not important).


Yes. Set up a ServletContextListener and have it do whatever you need when
the servlet context (the webapp) is loaded.

http://java.sun.com/products/servlet...tListener.html

I have mine load a bunch of HashMaps into application scope. They are later
used to populate drop-down select lists on HTML forms.

--
Wendy in Chandler, AZ
"BTW, Lucifer just called and he needs a pair of ice skates :-)"
James Turner on struts-dev, voting to release Struts 1.1 Final


All times are GMT. The time now is 10:30 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.