Re: Java application getting tomcat's home directory.

2008-04-15 Thread Bill Barker
Actually, this doesn't work either. getContextPath returns the part of the URL that corresponds to the Context. Assuming that you are using a file-based context, and you can control how the app is deployed (i.e. it is always deployed under webapps), then this might be one of the few real uses

Re: Java application getting tomcat's home directory.

2008-04-15 Thread Mark Shifman
Actually you asked for the home directory so you could use http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/ServletContext.html#getContextPath() Mark Shifman wrote: You could try http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/ServletContext.

Re: Java application getting tomcat's home directory.

2008-04-15 Thread Mark Shifman
You could try http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/ServletContext.html#getResource(java.lang.String) or http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/ServletContext.html#getResourceAsStream(java.lang.String) mas Ar5eNiC wrote

Java application getting tomcat's home directory.

2008-04-15 Thread Ar5eNiC
Hello, I am currently on a team developing a web interface that allows the user to click drop downs to change content in an html page. We are calling our java methods using a JSP page. One of our java methods needs to access a file that is in our projects folder under webapps. We cannot use relat

Java application getting tomcat's home directory.

2008-04-15 Thread Ar5eNiC
-- View this message in context: http://www.nabble.com/Java-application-getting-tomcat%27s-home-directory.-tp16711061p16711061.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mai