Hi,

I'm striking out in my attempts to get WAS 3.02 to discover my properties
files that are supposedly in my classpath, and was wondering if anyone else
has come across this problem and know what the solution would be.

Basically, in WAS 2 with JSP 0.91 we had a number of property files with
various resources we'd read in for our servlets to use.  We placed these in
a folder called application.properties that was at the same level on our web
server as htdocs and cgi-bin.

In order to find these files we had added the path for the
application.properties folder to the java.classpath in the
bootstrap.properties file used by WebSphere.

With WAS 3.02 I've had to add to the com.ibm.ejs.sm.adminserver.classpath in
the admin.config file in order for WAS to find
the properties file, but I really don't want it there because I want to be
able to differentiate one Web apps resources from another, not have them all
share the same ones.  Unfortunately I haven't been successful if I add the
path to the Web app's classpath (on the Admin Console advanced tab).  It
appears WAS for some unknown reason can't find it when I do that.

So my question is, how can I do this so the properties file is known only
within the App Server or Web App context, not the
Admin Server context.  Where should I put the file and set up the path for
WAS to find it?

Or perhaps I'm going about this the wrong way and shouldn't be using the
ClassLoader approach like so

        properties = new Properties();

        // Access and load properties from the properties file
        try {
            // Establish the input stream
                InputStream in =
this.getClass().getClassLoader().getSystemResourceAsStream(PROPERTIES_FILENA
ME);
                // Reads the property list from the input stream
            properties.load(in);

        } catch (Exception e) {
            System.out.println("Problem in init() method loading properties:
" + e);
        }

Any help would be great - thanks,

Dan
--
Daniel Kirkdorffer
NACN IS: 425-580-6225
Sr. Consultant, Syllogistics LLC
Email: [EMAIL PROTECTED]
Web:   http://www.syllogistics.com/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to