Discussion:
Creating virtual directory in Tomcat - HTTP Status 404 ...
uddav
2008-10-08 21:11:55 UTC
Permalink
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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Scott Dunbar
2008-10-08 21:19:33 UTC
Permalink
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.
Post by uddav
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
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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Caldarale, Charles R
2008-10-08 21:22:24 UTC
Permalink
Subject: Creating virtual directory in Tomcat - HTTP Status 404 ...
docBase="/dirtest/prod_scrpts"
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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
uddav
2008-10-14 16:14:26 UTC
Permalink
Thank you both for those information, they were very helpful. Again, thank
you so much. =)
Post by Caldarale, Charles R
Subject: Creating virtual directory in Tomcat - HTTP Status 404 ...
docBase="/dirtest/prod_scrpts"
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.
---------------------------------------------------------------------
--
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: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Loading...