Discussion:
Using own index.html in $CATALINA_HOME/webapps/ROOT directory
jhayden
2007-08-31 10:10:14 UTC
Permalink
After changing port to 80 attempting to use Tomcat as a HTTP server as well
as
a container.
When entering http:\\localhost I am getting the standard Tomcat display.
However its being drawn from the index.jsp rather than the index.html due
the message on the page detailing
"$CATALINA_HOME/webapps/ROOT/index.jsp"

What I have attempted to do is place my own static html files in the
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT
directory.
Basically expecting my index.html to be displayed. However it only attempts
to display the index.jsp page.

I have tried commenting out the - <welcome-file>index.jsp</welcome-file>
from the web.xml but this does not make any difference.
I want to use the ROOT directory and force the index.html to be used.
All i get is a Error 404 message.
Can anyone help me please?
--
View this message in context: http://www.nabble.com/Using-own-index.html-in-%24CATALINA_HOME-webapps-ROOT-directory-tf4359312.html#a12423852
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
Mark Thomas
2007-08-31 11:03:06 UTC
Permalink
Post by jhayden
I want to use the ROOT directory and force the index.html to be used.
All i get is a Error 404 message.
Delete the contents of ROOT (jsps, WEB-INF, etc) apart from your
files. You might need to reload the ROOT web application although I am
fairly sure the default configuration will detect the change and
reload the webapp for you.

Note: Tomcat 6 treats any directory in webapps as a web application.

HTH,

Mark

---------------------------------------------------------------------
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
jhayden
2007-08-31 11:46:38 UTC
Permalink
Tried that but still getting the error.
I only left the default index.html file there and it still gives me the 404
Error.
It appears that it only wants to use the index.jsp file?
--
View this message in context: http://www.nabble.com/Using-own-index.html-in-%24CATALINA_HOME-webapps-ROOT-directory-tf4359312.html#a12424931
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
Mark Thomas
2007-08-31 13:10:48 UTC
Permalink
Post by jhayden
Tried that but still getting the error.
I only left the default index.html file there and it still gives me the 404
Error.
It appears that it only wants to use the index.jsp file?
The default welcome file list is index.html. index.htm, index.jsp. In
that order.

Is this a clean install?

Mark

---------------------------------------------------------------------
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
jhayden
2007-09-01 19:23:43 UTC
Permalink
Post by Mark Thomas
Post by jhayden
Tried that but still getting the error.
I only left the default index.html file there and it still gives me the 404
Error.
It appears that it only wants to use the index.jsp file?
The default welcome file list is index.html. index.htm, index.jsp. In
that order.
Is this a clean install?
Mark
---------------------------------------------------------------------
Yes. Brand new.
Without changing anything in ROOT, if I comment out the index.jsp from the
web.xml file it gives me a 404 Error. As soon as I un-comment the line it
works fine. Therefore its only interested in using the index.jsp?
--
View this message in context: http://www.nabble.com/Using-own-index.html-in-%24CATALINA_HOME-webapps-ROOT-directory-tf4359312.html#a12443155
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
Mark Thomas
2007-09-02 02:50:35 UTC
Permalink
Post by Mark Thomas
Post by Mark Thomas
Is this a clean install?
Mark
---------------------------------------------------------------------
Yes. Brand new.
Without changing anything in ROOT, if I comment out the index.jsp from the
web.xml file it gives me a 404 Error. As soon as I un-comment the line it
works fine. Therefore its only interested in using the index.jsp?
For a clean Tomcat 6 install, you can just edit index.html and the
changes will be reflected instantly.

I noticed there is index.jsp and index.html. The jsp probably needs to
be removed from the build.

Mark



---------------------------------------------------------------------
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
Victor Lutin
2007-08-31 15:12:50 UTC
Permalink
Hi,

Well, what web.xml file you modified?

CATALINA_HOME = C:\Program Files\Apache Software Foundation\Tomcat 6.0\

1. %CATALINA_HOME%/conf/web.xml
2. %CATALINA_HOME%/webapps/ROOT/WEB-INF/web.xml

I have Tomcat 6 installed, i tried to do that, and works for me, You
most comment web.xml in opction 1. and verify web.xml in option 2 for
<welcome-file>.

I got 404 error when I put a URL like this on my browser: (8180 is
my port for tomcat)

http://localhost:8180/ROOT/
but with
http://localhost:8180

loads my new Index.html.

VL.
Post by jhayden
After changing port to 80 attempting to use Tomcat as a HTTP server as well
as
a container.
When entering http:\\localhost I am getting the standard Tomcat display.
However its being drawn from the index.jsp rather than the
index.html due
the message on the page detailing
"$CATALINA_HOME/webapps/ROOT/index.jsp"
What I have attempted to do is place my own static html files in the
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT
directory.
Basically expecting my index.html to be displayed. However it only attempts
to display the index.jsp page.
I have tried commenting out the - <welcome-file>index.jsp</welcome-
file>
from the web.xml but this does not make any difference.
I want to use the ROOT directory and force the index.html to be used.
All i get is a Error 404 message.
Can anyone help me please?
--
View this message in context: http://www.nabble.com/Using-own-
index.html-in-%24CATALINA_HOME-webapps-ROOT-directory-
tf4359312.html#a12423852
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
jhayden
2007-09-13 18:15:21 UTC
Permalink
I ended up uninstalling tomcat and then reinstalling it.
It works fine now.........Very odd. Thanks for you help.
Post by Victor Lutin
Hi,
Well, what web.xml file you modified?
CATALINA_HOME = C:\Program Files\Apache Software Foundation\Tomcat 6.0\
1. %CATALINA_HOME%/conf/web.xml
2. %CATALINA_HOME%/webapps/ROOT/WEB-INF/web.xml
I have Tomcat 6 installed, i tried to do that, and works for me, You
most comment web.xml in opction 1. and verify web.xml in option 2 for
<welcome-file>.
I got 404 error when I put a URL like this on my browser: (8180 is
my port for tomcat)
http://localhost:8180/ROOT/
but with
http://localhost:8180
loads my new Index.html.
VL.
Post by jhayden
After changing port to 80 attempting to use Tomcat as a HTTP server as well
as
a container.
When entering http:\\localhost I am getting the standard Tomcat display.
However its being drawn from the index.jsp rather than the
index.html due
the message on the page detailing
"$CATALINA_HOME/webapps/ROOT/index.jsp"
What I have attempted to do is place my own static html files in the
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT
directory.
Basically expecting my index.html to be displayed. However it only attempts
to display the index.jsp page.
I have tried commenting out the - <welcome-file>index.jsp</welcome-
file>
from the web.xml but this does not make any difference.
I want to use the ROOT directory and force the index.html to be used.
All i get is a Error 404 message.
Can anyone help me please?
--
View this message in context: http://www.nabble.com/Using-own-
index.html-in-%24CATALINA_HOME-webapps-ROOT-directory-
tf4359312.html#a12423852
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
View this message in context: http://www.nabble.com/Using-own-index.html-in-%24CATALINA_HOME-webapps-ROOT-directory-tf4359312.html#a12660513
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...