RE: getRealPath and war file

2006-08-11 Thread Propes, Barry L
can you not put the images in an image dir, and always source them to that directory? i.e. ? -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

Re: getRealPath and war file

2006-08-10 Thread Romain Quilici
Sorry, in my previous message, I did not mean the working dir but the temp dir(obtained with javax.servlet.context.tempdir). Romain Mark Thomas wrote: Romain Quilici wrote: Hello Dies, the working directory would be fine, but my images need to be accessible via a url(which is not the case i

Re: getRealPath and war file

2006-08-10 Thread Dies Koper
> Push a url to a servlet which then serves the images from the working > directory? In which you could also set the headers (images are temporary, so maybe set Cache-Control, Expires?). Regards, Dies Mark Thomas wrote: Romain Quilici wrote: Hello Dies, the working directory would be fine,

Re: getRealPath and war file

2006-08-10 Thread Mark Thomas
Romain Quilici wrote: > 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 repla

Re: getRealPath and war file

2006-08-09 Thread Romain Quilici
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 st

Re: getRealPath and war file

2006-08-09 Thread Dies Koper
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 mainta

Re: getRealPath and war file

2006-08-09 Thread Romain Quilici
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/fil

Re: getRealPath and war file

2006-08-09 Thread Mikolaj Rydzewski
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 r

Re: getRealPath and war file

2006-08-09 Thread Romain Quilici
Mikolaj Rydzewski wrote: Romain Quilici wrote: However, Tomcat creates automatically a directory under webapps to contain war file contents, so I am wondering if Tomcat is using the newly generated directory to load the application(1st case) or the war file (2nd case). In the first case contex

Re: getRealPath and war file

2006-08-09 Thread Mikolaj Rydzewski
Romain Quilici wrote: However, Tomcat creates automatically a directory under webapps to contain war file contents, so I am wondering if Tomcat is using the newly generated directory to load the application(1st case) or the war file (2nd case). In the first case context.getRealPath("/") should

Re: getRealPath and war file

2006-08-08 Thread Mark Thomas
Romain Quilici wrote: > However, Tomcat creates automatically a directory under webapps to > contain war file contents, so I am wondering if Tomcat is using the > newly generated directory to load the application(1st case) or > the war file (2nd case). If unpackWARs is true then the WAR is unpacke

Re: getRealPath and war file

2006-08-08 Thread Li
Hi, Most of j2ee application servers (tomcat, jboss) when a war or ear file is deployed. It will generate a folder which contains the same file structure (web application format) as which is in the war or ear file. A war is considered as a file but not a path. So if Tomcat only reads war but not