You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Murtuza <kh...@gmail.com> on 2007/06/11 15:54:31 UTC

making a directory we accesible

I have a directory on my Linux file system, which only has some text files. I
want to make its content web accessible without copying this directory
directly under tomcat installation.  so suppose all my files are in
/home/mydir1/mydir/test.txt, I should be able to access them as
localhost:8080/mydir/test.txt.

Thanks
-- 
View this message in context: http://www.nabble.com/making-a-directory-we-accesible-tf3901739.html#a11061067
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: making a directory we accesible

Posted by Murtuza <kh...@gmail.com>.
Thanks! it diud work I had to create folder under /conf



Caldarale, Charles R wrote:
> 
>> From: Murtuza [mailto:khanmurtuza@gmail.com] 
>> Subject: RE: making a directory we accesible
>> 
>> I am using tomcat 6 and it doesn't have this directory 
>> structure
> 
> Even Tomcat 6 has a conf directory.  Under conf, there should be a
> Catalina directory, although it may not be created until it's needed.
> Under conf/Catalina, there should be a directory per <Host> name, with
> the default being localhost.  If you've changed the <Host> name,
> substitute your name for localhost.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/making-a-directory-we-accesible-tf3901739.html#a11061898
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: making a directory we accesible

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Murtuza [mailto:khanmurtuza@gmail.com] 
> Subject: RE: making a directory we accesible
> 
> I am using tomcat 6 and it doesn't have this directory 
> structure

Even Tomcat 6 has a conf directory.  Under conf, there should be a
Catalina directory, although it may not be created until it's needed.
Under conf/Catalina, there should be a directory per <Host> name, with
the default being localhost.  If you've changed the <Host> name,
substitute your name for localhost.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


RE: making a directory we accesible

Posted by Murtuza <kh...@gmail.com>.
I am using tomcat 6 and it doesn't have this directory structure, thanks for
the reply.



Caldarale, Charles R wrote:
> 
>> From: Murtuza [mailto:khanmurtuza@gmail.com] 
>> Subject: making a directory we accesible
>> 
>> so suppose all my files are in
>> /home/mydir1/mydir/test.txt,
>> I should be able to access them as
>> localhost:8080/mydir/test.txt.
> 
> Create a file named $TOMCAT_HOME/conf/Catalina/localhost/mydir.xml and
> put just the following in it:
> 
> <Context docBase="/home/mydir1/mydir" />
> 
> Should be all you need, assuming whatever userid Tomcat is running under
> has access to that directory.
> 
>  - Chuck
> 
> 
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/making-a-directory-we-accesible-tf3901739.html#a11061494
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: making a directory we accesible

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Johnny Kewl [mailto:john@kewlstuff.co.za] 
> Subject: Re: making a directory we accesible
> 
> What would happen if the user made a linux sym-link under the 
> tomcat ROOT folder to
> /home/mydir1/mydir/   as mydir.... would that work?

That should work (haven't tried it), but I find symlinks to be a great
way of confusing oneself and others, especially anyone who doesn't know
the target has a symlink pointing to it.  It obviously would make it
difficult to place the "app" on a Windows system, unless you're gutsy
enough to play around with fsutil.  Doing it with a <Context> element
preserves platform independence.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


Re: making a directory we accesible

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
This is when I wish I was on linux so I could try it, but Chuck will be able 
to tell us anyway.
What would happen if the user made a linux sym-link under the tomcat ROOT 
folder to
/home/mydir1/mydir/   as mydir.... would that work?

----- Original Message ----- 
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, June 11, 2007 4:12 PM
Subject: RE: making a directory we accesible


> From: Murtuza [mailto:khanmurtuza@gmail.com]
> Subject: making a directory we accesible
>
> so suppose all my files are in
> /home/mydir1/mydir/test.txt,
> I should be able to access them as
> localhost:8080/mydir/test.txt.

Create a file named $TOMCAT_HOME/conf/Catalina/localhost/mydir.xml and
put just the following in it:

<Context docBase="/home/mydir1/mydir" />

Should be all you need, assuming whatever userid Tomcat is running under
has access to that directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



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


RE: making a directory we accesible

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Murtuza [mailto:khanmurtuza@gmail.com] 
> Subject: making a directory we accesible
> 
> so suppose all my files are in
> /home/mydir1/mydir/test.txt,
> I should be able to access them as
> localhost:8080/mydir/test.txt.

Create a file named $TOMCAT_HOME/conf/Catalina/localhost/mydir.xml and
put just the following in it:

<Context docBase="/home/mydir1/mydir" />

Should be all you need, assuming whatever userid Tomcat is running under
has access to that directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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