You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robin Barooah <ro...@sublime.org> on 2000/04/18 16:04:44 UTC

Hello, and help!

Hi,

First, hello to everyone - this is my first posting on this list.

I am having some difficulties getting my first installation of tomcat
+ apache configured correctly.

Working though the documentation, message archive, cvs tree and supplied
config files (but not the source :-)  I think I've come to a reasonable
understanding of how to set contexts up under tomcat, and I have
installed a test application consisting of an html page and a jsp page,
so that it works when it's accessed through tomcat's own http server on
port 8080.  My difficulty is that I can't work out how to map it into a
virtual host under apache successfully.   I've managed to map the jserv
examples perfectly well. though.

I'll detail the application and it's results:

### My application consists of the following files:

index.html    - a text html page.
jtest.jsp    - a JSP test page.
/META-INF/    - empty directory.
/WEB-INF/ classes    - empty directory.
/WEB-INF/lib    - empty directory.
/WEB-INF/web.xml    - contains a xml header, doctype declaration and
just <web-app></web-app>

### the context entry in the server.xml file is:

 <Context path="/cttest" docBase="/root/webapp" debug="0"
reloadable="true"
  defaultSessionTimeOut="30" isWARExpanded="true"
  isWARValidated="false" isInvokerEnabled="true"
  isWorkDirPersistent="false">
 </Context>

### The virtualhost entry in my httpd.conf file is:

<VirtualHost stage>
ServerAdmin robin@sublime.org
DocumentRoot /usr/local/www/stage/htdocs/
Servername stage
ErrorLog logs/stage-error_log
CustomLog logs/caretaker-access_log common
<Directory />
</Directory>

AddType test/jsp .jsp
AddHandler jserv-servlet .jsp

ApJServMount /examples /root
ApJServMount /scooby /cttest

</VirtualHost>

###

The virtual host is called stage, and the actual server name is mozart.
Both names are in the local /etc/hosts file. The following urls give
these results:

http://mozart:8080/examples    -    The examples directory from the jdsk
with working servlets.
http://mozart:8080/cttest    -    The expected output from my index.html
.
http://mozart:8080/jtest.jsp    -    The expected output from my
jtest.jsp.
http://stage    -    The index file from the stage DocumentRoot.
http://stage/examples/    -    The examples directory from the jsdk with
working servlets.
http://stage/scooby/    -    ERROR 404 - Location:: /scooby/index.html
\n File Not Found /scooby/index.html

The error page isn't the standard apache one, and there's no error in
the stage-error_log.

Can anyone advise me as to what's wrong while I still have some hair
left?

Thanks.

Regards,

-Robin Barooah

--
electronic mail messages
robin at sublime dot org