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/t123955-re-servlets-application-level-object.html)

Phil Hanna 07-02-2003 02:37 AM

Re: servlets - application level object
 
On Tue, 01 Jul 2003 00:06:35 GMT, "Miguel De Anda"
<sodamnmad@hotmail.com> 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).
>
>


A simple way is to put a file in the /WEB-INF directory, and read it
with ServletContext.getResourceAsStream("/WEB-INF/myfile");
--
Phil Hanna
Author of JSP 2.0: The Complete Reference
http://www.philhanna.com
http://www.philhanna.com


All times are GMT. The time now is 08:53 PM.

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