Hi,

I have a class that is instantiated by a servlet. The class reads XML
files that are located in the same directory. However, these files will
be eventually moved to another server where I have no administrative
privileges for Jserv or Apache, also the path to my files will be
different. Therefore, I need a way to ensure the the File IO will work.
What I need is a way to determine the directory path in which the
instantiated class is at (on runtime obviously). I tried to use the
Runtime and System classes, but since the class is instantiated by the
servlet I only get "/" as the path.
I could add the new path to the servlet zone property file  but then
that will mean that I have to restart the server; I am trying to find a
better solution for that. In fact the XML files that I am reading are
intended to have init parameters.. in that way I can add, delete or
change parameters on the fly then make those changes available to all
servlets (I will not not need to restart Jserv  or modify the zone
properties I would simply have to recompile my servlets so that they are
reloaded). Perhaps, this sounds too complicated but I am just facing too
many restrictions by the administrator of the server that will
ultimately host the servlets.

Any ideas?


Thanks.

Felix.
President and CEO of MAD...
                 &&
ITS Visiting Scientist (Experimental Support for IT)

___________________________________________

                 F e l  i x   G u e r r e r o
                                          Application Developer
                  ITS (Information Technology Services)
                                         IACC Building Room 246
                               North Dakota State University
                                                   Fargo, ND 58105
                                   Ph. Office: (701) 231 6284
                                             Fax: (701) 231 8541
___________________________________________

___________________________________________________________________________
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