You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by MATHOT Jacques <ja...@eurocontrol.int> on 2004/09/10 12:00:45 UTC

Help - Newbie questions - where are the uploaded files stored ?

Hi All,

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 ?
Thanks in advance.
Regards,
Jacques Mathot

	FileInputStream fis = new FIleInputStream("Doc8585.zip");
	...

____

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.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Question about multiple instances instead virtual hosts

Posted by "Bedrijven.nl" <ma...@bedrijven.nl>.
Hello,

Now I have a production server with tomcat 4.1.24. I have several
applications installed (in webapps) and sets them up as virtual hosts. I get
the idea that using multiple instances would work better for me. I read the
documentation but what I read is there are 2 possible solutions: for each
instance install a new Tomcat installation and second modify the
CATALINA_BASE directory. Now my questions:

How could I best setup the multiple instances?? And second question is: my
Tomcat webserver is standalone. That means handles all the http requests to
port 80. How can I make this work with more than one instance?? In other
words how do I establish that a http request (port 80) will go to the right
Tomcat instance??

Thanx in advanced,

Maarten


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Help - Newbie questions - where are the uploaded files stored ?

Posted by Arun Prasad R <fi...@gmail.com>.
hi

you can set a session property like 
System.setProperty("user.dir", "/your/application/home");
this will change the applications current working dir.

i have not checked the side effects. whether tomcat will be affected
by this action or not
arun

On Fri, 10 Sep 2004 12:00:45 +0200, MATHOT Jacques
<ja...@eurocontrol.int> wrote:
> Hi All,
> 
> 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 ?
> Thanks in advance.
> Regards,
> Jacques Mathot
> 
>         FileInputStream fis = new FIleInputStream("Doc8585.zip");
>         ...
> 
> ____
> 
> 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.
> 
> Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy.
> 
> Any views expressed in this message are those of the sender.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Help - Newbie questions - where are the uploaded files stored ?

Posted by er...@swapsimple.com.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org