Hi All,
I just installed Ubuntu 12 along with LAMP. I am trying to walk through all the steps necessary to get a new web project picked up by apache/tomcat. 1) to
test to see if it can find a .html file 2) if I can load a test
servlet that I deploy. I am reaching out for help as I have messed up the configuration 2 times already, and thought I better get some help before I mess something else up.
The name of the project is called "samples"
1) I went to /var/lib/tomcat6/conf/Catalina/localhost to create a samples.xml file to match what was there:
-rw-r--r-- 1 root tomcat6 922 Dec 13 2011 docs.xml
-rw-r--r-- 1 root tomcat6 78 Dec 13 2011 examples.xml
-rw-r--r-- 1 root tomcat6 958 Dec 13 2011 host-manager.xml
-rw-r--r-- 1 root tomcat6 948 Dec 13 2011 manager.xml
-rw-r--r-- 1 tomcat6 tomcat6 51 Feb 6 12:48 ROOT.xml
-rw-r--r-- 1 root root 65 Feb 6 13:36 samples.xml
with contents:
/var/lib/tomcat6/conf/Catalina/localhost# more samples.xml
<Context path="/samples" docBase="/var/lib/tomcat6/webapps" />
2) in /var/lib/tomca6/webapps/samples, I added a index.html file (copied the one from ROOT) that gets displayed and changed a few text words in it.
3) I added a WEB-INF dir with a web.xml
samples/WEB-INF
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Samples</display-name>
<description>This is my sample application</description>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
4) When I try
http://localhost:8080/samples , I get a 404 error.
http://localhostt:8080/examples still works though.
Is there something else in the system that must be specified to make the index.html file work?
Thanks for your expertise and help.. Steven