can you not put the images in an image dir, and always source them to that 
directory?
i.e. <img src="../../images/**"> ?

-----Original Message-----
From: Romain Quilici [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 10, 2006 1:05 AM
To: Tomcat Users List
Subject: Re: getRealPath and war file


Hello Dies,
the working directory would be fine, but my images need to be accessible 
via a url(which is not the case if they are located inside the temp dir)
In fact when an image is generated, I push the url inside the client 
browser, the new url automatically replaces the previous one in a 
statement like <img src=.....>.
So I need a url to be able to access my images
Regards
Romain
Dies Koper wrote:
> Hello Romain,
>
> Is there no way you can use the temporary working directory 
> (javax.servlet.context.tempdir)?
> I don't know what "pushing inside a client browser" means, but as you 
> mentioned the files are temporary, this sounds like the place to put 
> them..
> Also, you won't need to worry about maintaining some extra directory 
> after deployment, and this is a portable solution.
>
> Regards,
> Dies
>
> Romain Quilici wrote:
>> Mikolaj Rydzewski wrote:
>>> Romain Quilici wrote:
>>>> My pb is more to write in a given directory(must be accessible with 
>>>> a url), than to read.
>>>> And I would prefer this directory to be located in my webapp.
>>> Use directory outside webapp and then map it with alias, or some 
>>> kind of dispatcher servlet/filter.
>>>
>>> It'll help you to redeploy webapp and not to loose uploaded/saved 
>>> files.
>>>
>> Actually,
>> in my application, files are temporary. So even if they are deleted 
>> in doesn't matter.
>> What I mean is images are pushed inside a client browser when they 
>> are generated, but then are no longer used.
>> I prefer to create the directory within my application, to avoid 
>> permissions issues
>> As I understood, context.getRealPath("/"); will return the context of 
>> my application, even if my app is deployed within a war(as soon as 
>> UnpackWars is set to true in Tomcat).
>> So I can deal with this command. I will provide anyway a mechanism to 
>> check if context.getRealPath("/"); is null, in such case the 
>> application should take the values from init parameters
>> Regards
>> Romain
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to