Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: Read and write inside WEB-INF

David Smith

2007-07-14

Replies:

Only works for unpacked web applications. If you attempt getRealPath
from inside a packed war file it will return null.

--David


hanasaki wrote:
> Hmmm does this work for packed WAR's or only Unpacked... ?
>
> Jacob Rhoden wrote:
>  
>> Much Appreciated! Thanks.
>>
>> Edoardo Panfili wrote:
>>  
>>> Jacob Rhoden ha scritto:
>>>    
>>>> what is the correct way to find the location of your WEB-INF
>>>> directory (or your apps directory for that matter).
>>>>
>>>>      
>>> try with
>>> String x = this.getServletContext().getRealPath("WEB-INF");
>>>    
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@(protected)
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>  
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@(protected)
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>  


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.