HttpServlet.getServletContext().getRealPath("/Images"); will give you the
real path to Image directory in your webapp.
-----Original Message-----
From: jboss-user-bounces(a)lists.jboss.org
[mailto:jboss-user-bounces@lists.jboss.org] On Behalf Of pete007
Sent: Thursday, February 28, 2008 11:53 AM
To: jboss-user(a)lists.jboss.org
Subject: [jboss-user] [Installation,Configuration & DEPLOYMENT] - How to
access the deployfolder from inside my application
Hello,
I'm working on a system, that generates Images, places them in a special
folder and puts a-hrefs in the response of the page.
I created an folder "image" in the jboss-deployer, where I place my images.
The full path is:
$JBOSS_HOME\server\default\deploy\jboss-web.deployer\ROOT.war\images
When I first tried to generate the image files, they got placed in:
$JBOSS\bin\images\
So I am using in my application the path
../server/default/deploy/jboss-web.deployer/ROOT.war/images
This is okay for development, but when someone is using another
configuration than default, the application will place the images in the
wrong directory.
So my question is, how can I find out, where the current application is
running, or where I can find the ROOT.war of the currently used
configuration? Is there any class/method, that holds the desired
informations?
If there's a better way to make the images accessible, I would like to hear
how it works too.
Thanks in advance, Peter
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132934#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...
_______________________________________________
jboss-user mailing list
jboss-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user