Mike Engelhart wrote:

> Can anyone point me towards the documentation for the JSWDK 1.0 release that
> explains what a servlet uses as the path for FileInputStreams and
> ResourceBundle properties files?  I am trying to move my application over to
> the JSWDK for development and I have a startup initialization servlet to
> load ResourceBundles and other Properties files that have JDBC information
> and things like that.
>
> Thanks,
>
> Mike
>

The current working directory (to resolve relative file paths) will be wherever
you run the JSWDK "startserver" command from.

For PropertyResourceBundle objects, Java resolves resource package names using the
same class path it uses for finding classes.  So, if you have a property bundle
named "com.mycompany.mypackage.Resources.properties", it should be in the same
place (either directory or nested in a JAR/ZIP file) that you would put a class
named "com.mycompany.mypackage.MyClass.class".  You would access it by saying:

    ResourceBundle bundle =
ResourceBundle.getBundle("com.mycompany.mypackage.Resources");

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to