cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject RE: web app directory
Date Fri, 14 Sep 2012 15:37:13 GMT
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:pjoseph@gmail.com] 
Sent: Friday, September 14, 2012 5:27 PM
To: users@cocoon.apache.org
Subject: web app directory

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 Software 
Foundation\Tomcat 7.0"

the reason is the client wants to run many copies of myapp, each for a 
different group as in myapp1, myapp2 and so on.

Internally, in my code I needed this location to do things like upload 
files etc. and I was finding my locaiton before using the 
getProperty("catalina_base") and adding on to it "\myapp" which clearly 
won't work any more.

best
Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message