Thanks for the resonse,
The servlet I have made is rather large (200k source - not including templates
for generating pages)

I've packaged it in a jar, and need it to be able to run just by adding to
classpath

so any IT staff setting up the system only have to add the classpath, and the
program needs to determine where it is located (to open, and write to files)
for several reasons, I am no longer using getResourceAsStream() to open these
files, so I need to find the full path that they are located in..
I wanted to set these in an environment variable, but someone decided to
deprecate the method..
how should i overcome this problem??

thanks
Rob

"Christopher K. St. John" <[EMAIL PROTECTED]> wrote:
> Rob Hazlewood wrote:
> >
> > I'm distributing a servlet, and the servlet needs to know where it is
> > located.
> >
>
>  Why exactly do you want to know? There's probably a
> work-around, but the solution would depend on what in
> particular you're trying to accomplish.
>
>  Although it won't help you a bit with your problem,
> it might make you feel better to check out the official
> java bug list. Some people feel strongly that env variable
> access should be possible, or barring that, that the
> documentation should be clarified.
>
>
> > Ideally, I would like it to get it by setting an environment variable
> > and then for the program to be able to read this.
> > ... i've noticed that tomcat does it
> >
>
>  Tomcat cheats. The startup scripts do something along
> the lines of:
>
>   $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME}
org.apache.tomcat.startup.Tomcat "$@" &
>
>  Of course, that's platform specific. You can check this
> out on your own by looking in the "bin" directory of a
> tomcat installation, where you will find a maze of twisty
> little shell/bat scripts, all alike.
>
>
>
> -cks
>
> ___________________________________________________________________________
> 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


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

___________________________________________________________________________
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