web app directory

2012-09-14 Thread Paul Joseph
Hi there, I am using Tomcat 7 and Cocoon 2.1.11. Question: How do I get the directory of my application as in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\myapp I was using this call: System.getProperty(catalina.base) But it only takes me as far as: C:\Program Files\Apache

RE: web app directory

2012-09-14 Thread Robby Pelssers
You might want to play with javax.servlet.getRealPath() but I read some comments that it might return null if the war is not exploded. http://docs.oracle.com/javaee/6/api/index.html?javax/servlet/package-summary.html -Original Message- From: Paul Joseph [mailto:pjos...@gmail.com]

RE: web app directory

2012-09-14 Thread Robby Pelssers
But reading your mail twice... Are you actually uploading files inside the exploded war folder??? Not so nice in my opinion. Not sure if that is wise. Or am I misinterpreting your use case? Why not store/ upload the files in a configurable location? Robby -Original Message- From:

Re: web app directory

2012-09-14 Thread Paul Joseph
Thanks much Robby...Will try the javax.servlet.getRealPath() Yes, it is inside the exploded war folder...previously it was in a configurable location but it turned out to be too much of a hassle--so they decided to make it invisible. Paul On 9/14/2012 11:41 AM, Robby Pelssers wrote: But

Re: web app directory

2012-09-14 Thread Jasha Joachimsthal
On 14 September 2012 18:19, Paul Joseph pjos...@gmail.com wrote: Thanks much Robby...Will try the javax.servlet.getRealPath() Yes, it is inside the exploded war folder...previously it was in a configurable location but it turned out to be too much of a hassle--so they decided to make it

Re: web app directory

2012-09-14 Thread Paul Joseph
Right...let me ask the boss. On 9/14/2012 1:52 PM, Jasha Joachimsthal wrote: On 14 September 2012 18:19, Paul Joseph pjos...@gmail.com mailto:pjos...@gmail.com wrote: Thanks much Robby...Will try the javax.servlet.getRealPath() Yes, it is inside the exploded war