You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by uddav <ad...@gmail.com> on 2008/10/08 23:11:55 UTC

Creating virtual directory in Tomcat - HTTP Status 404 ...

hello everyone,

i am a novice in this field. I was trying to create a virtual directory
(alias directory) in Tomcat in Solaris box. Following is what i did.

1. stopped tomcat 

2. located the "server.xml" file under <INSTALL DIR>/tomcat/conf 

2. edited it to add 
       <Context path="/test"
	                        docBase="/dirtest/prod_scrpts"
	                        debug="1"
	                        reloadable="true" >
        </Context>

3. added the above between the host tags such that
     <Host appBase="webapps" autoDeploy.......>
     ... ... ... ...
          <Context path="/test"
	                        docBase="/dirtest/prod_scrpts"
	                        debug="1"
	                        reloadable="true" >
        </Context>
     </Host> 

4. started tomcat 

Now when i try to access the newly create virtual directory by going to the
URL "http://<servername>:8080/test" i get the error:

HTTP Status 404 - /test/
--------------------------------------------------------------------------------
type Status report
message /test/
description The requested resource (/test/) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/5.0.27

Any suggestions and recommendation will be greatly appreciated.

Thankyou
uddav 

-- 
View this message in context: http://www.nabble.com/Creating-virtual-directory-in-Tomcat---HTTP-Status-404-...-tp19887681p19887681.html
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: Creating virtual directory in Tomcat - HTTP Status 404 ...

Posted by Scott Dunbar <sc...@xigole.com>.
What is in the directory /dirtest/prod_scrpts?  If it doesn't have a 
file named index.jsp, index.html or index.htm (defaults set in 
conf/web.xml) then it will give a 404.  Try a very small "hello world" 
html page for one of those files.  The default is to disable file 
listings for directories which is where the 404 is coming from.



uddav wrote:
> hello everyone,
>
> i am a novice in this field. I was trying to create a virtual directory
> (alias directory) in Tomcat in Solaris box. Following is what i did.
>
> 1. stopped tomcat 
>
> 2. located the "server.xml" file under <INSTALL DIR>/tomcat/conf 
>
> 2. edited it to add 
>        <Context path="/test"
> 	                        docBase="/dirtest/prod_scrpts"
> 	                        debug="1"
> 	                        reloadable="true" >
>         </Context>
>
> 3. added the above between the host tags such that
>      <Host appBase="webapps" autoDeploy.......>
>      ... ... ... ...
>           <Context path="/test"
> 	                        docBase="/dirtest/prod_scrpts"
> 	                        debug="1"
> 	                        reloadable="true" >
>         </Context>
>      </Host> 
>
> 4. started tomcat 
>
> Now when i try to access the newly create virtual directory by going to the
> URL "http://<servername>:8080/test" i get the error:
>
> HTTP Status 404 - /test/
> --------------------------------------------------------------------------------
> type Status report
> message /test/
> description The requested resource (/test/) is not available.
> --------------------------------------------------------------------------------
> Apache Tomcat/5.0.27
>
> Any suggestions and recommendation will be greatly appreciated.
>
> Thankyou
> uddav 
>
>   


---------------------------------------------------------------------
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: Creating virtual directory in Tomcat - HTTP Status 404 ...

Posted by uddav <ad...@gmail.com>.
Thank you both for those information, they were very helpful. Again, thank
you so much. =)



Caldarale, Charles R wrote:
> 
>> From: uddav [mailto:adi.uprety@gmail.com]
>> Subject: Creating virtual directory in Tomcat - HTTP Status 404 ...
>>
>>                                 docBase="/dirtest/prod_scrpts"
>> URL "http://<servername>:8080/test" i get the error:
>> HTTP Status 404 - /test/
> 
> Unless you have a welcome file (e.g., index.html) in /dirtest/prod_scrpts,
> that's exactly the error you should get.  If you want Tomcat to display
> directory listings when no welcome files are present, you'll have to
> enable that for the DefaultServlet in conf/web.xml (or the webapp's
> WEB-INF/web.xml file).
> 
>> Apache Tomcat/5.0.27
> 
> Note that 5.0 is no longer supported.
> 
>  - 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/Creating-virtual-directory-in-Tomcat---HTTP-Status-404-...-tp19887681p19976883.html
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: Creating virtual directory in Tomcat - HTTP Status 404 ...

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: uddav [mailto:adi.uprety@gmail.com]
> Subject: Creating virtual directory in Tomcat - HTTP Status 404 ...
>
>                                 docBase="/dirtest/prod_scrpts"
> URL "http://<servername>:8080/test" i get the error:
> HTTP Status 404 - /test/

Unless you have a welcome file (e.g., index.html) in /dirtest/prod_scrpts, that's exactly the error you should get.  If you want Tomcat to display directory listings when no welcome files are present, you'll have to enable that for the DefaultServlet in conf/web.xml (or the webapp's WEB-INF/web.xml file).

> Apache Tomcat/5.0.27

Note that 5.0 is no longer supported.

 - 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