On Fri, Sep 10, 2004 at 12:00:45PM +0200, MATHOT Jacques wrote:
> I am implementing an upload function for my web applications using Tomcat 4.0.14 
> server. I was expecting the files to be stored on the root directory of my 
> application and not in one of the own Tomcat directories.
> How can I specify that the directory to be used is my application root directory ?
> 
>       FileInputStream fis = new FIleInputStream("Doc8585.zip");
>       ...
        I don't think you can.  You'll run into what seems to be a related problem
if you try to, for example, use struts-tiles and specify a dtd in the
tiles-defs.xml file.  The location is based on whereever you happen to
be when tomcat is started.  i.e. if you are in /foo/bar when you run
startup.sh files will end up there.
        Either create a directory somewhere else, and hard code the entire path
to that, or hardcode the path to the tomcat webapps directory and use 
request.getContextPath() to append the application directory.

> This message and any files transmitted with it are legally privileged and intended 
> for the sole use of the individual(s) or entity to whom they are addressed. If you 
> are not the intended recipient, please notify the sender by reply and delete the 
> message and any attachments from your system. Any unauthorised use or disclosure of 
> the content of this message is strictly prohibited and may be unlawful.

        What is this crap?  This seems rather inappropriate to be sending to
a mailing list.

eric


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to