Re: servlets - application level object

Discussion in 'Java' started by Phil Hanna, Jul 2, 2003.

  1. Phil Hanna

    Phil Hanna Guest

    On Tue, 01 Jul 2003 00:06:35 GMT, "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).
    >
    >


    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
    Phil Hanna, Jul 2, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    442
  2. Wendy S
    Replies:
    0
    Views:
    792
    Wendy S
    Jul 1, 2003
  3. John C. Bollinger

    Re: servlets - application level object

    John C. Bollinger, Jul 2, 2003, in forum: Java
    Replies:
    2
    Views:
    1,739
    John C. Bollinger
    Jul 2, 2003
  4. pabbu
    Replies:
    8
    Views:
    720
    Marc Boyer
    Nov 7, 2005
  5. Jéjé
    Replies:
    0
    Views:
    233
    Jéjé
    Sep 27, 2005
Loading...

Share This Page