Path problems can be resolved by setting the base path for your files
in the servlet init arguments. Then construct absolute paths based on
the file prefix you store in the initargs. You can then migrate to a
different setup by changing the initargs.
Justin
Quoting Wennie Wu ([EMAIL PROTECTED]):
> It may be better to put the textfile into the public-html(I am not quite
> sure the exactly name for this, please check the JWS directory.
>
> Hope would be of any help.
>
> Wennie
>
>
> >From: Jimmy Bands <[EMAIL PROTECTED]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> > Servlet API Technology." <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: simple desparate query. Please help.
> >Date: Sat, 18 Sep 1999 19:34:18 +1000
> >
> >Hello all,
> >
> >I have developed an e-commerce application for a customer based almost
> >entirely on servlets. It was developed on an Intranet using
> >JavaWebserver1.1.3.
> >
> >A couple of servlets have to load the contents of textfiles (flatfiles) in
> >order to operate correctly.
> >Now, on JWS, with the absence of a path, the servlets would look for these
> >files in the install directory (or server-root).
> >
> >The problem arises with the hosting account I have. They have set out the
> >following structure:
> >
> >- homedirectory - wwwdirectory (html)
> > - fls (contains the flatfiles)
> > - graphics
> > - servlets
> >
> >The home directory is write-protected. Using a path in the servlets of
> >../wwwdirectory/fls/textfile.txt to locate the text files does not work.
> >
> >I was wondering whether anyone can tell me why this does not work.
> >Does the path have to be taken with reference to the server-root or the
> >servlets directory?
> >Would it be acceptable to keep the flatfiles in the servlets directory and
> >if so, what would the path be?
> >
> >Any advice or suggestions would be greatly appreciated.
> >
> >Regards,
> >Jimmy Bands
> >
> >___________________________________________________________________________
> >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 Your Private, Free Email at http://www.hotmail.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
___________________________________________________________________________
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