Web Development

General discussion


Determing File directory path in JAVA

By cjk6723 ·
I have built a JAVA class whose methods gets called from a JSP. This class obtains information from an INI file that is located in the META-INF directory within a given website(There are multiple websites) I need to determine the path of the META-INF directory for the current website in order to locate this INI file. Unfortunately, when I access it from the web, it is giving me a directory where the servlet class is being executed from and not the class package directory itself. How do I determine the current directory where the servlet class is actually located on the server itself? By the way, if I run it from regular JAVA with a main method and not through a web browser, it runs fine and locates the directory correctly.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums