For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > March 2004 > How to retrive the base path of a web application (.war)?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to retrive the base path of a web application (.war)?
Yi Chen

2004-03-28, 10:22 pm

I am working on a Jboss based application.
There are many jsp pages included and I want
it to be easier to retrieve sources (for example,
images in the "myapp/images" folder and some
jsp modules in "myapp/modules" folder). What I
can do to retrieve the absolution path for
the current web application (the myapp.war)?

Thanks,

-Y.C.

http://www.OneImageHost.com/



Johann Burkard

2004-03-28, 10:22 pm

Yi Chen wrote:
> I am working on a Jboss based application.
> There are many jsp pages included and I want
> it to be easier to retrieve sources (for example,
> images in the "myapp/images" folder and some
> jsp modules in "myapp/modules" folder). What I
> can do to retrieve the absolution path for
> the current web application (the myapp.war)?


javax.servlet.ServletContext#getRealPath(String)

Johann
--=20
ich habe diese news-netze besucht, lang bevor es irgendwelcher regeln=20
erfolgte. seinerzeit waren wir verp=F6nt und wurden als geisteskranke=20
abgestempelt !!! ("-=3D[Admin] Team:WonneWoelkchen [=3D-" in=20
<ajjt45$4c5$1@news.eusc.inter.net> )
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com