You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul <pa...@metrak.com> on 2000/07/02 13:50:39 UTC

servlet paths and contexts

I have JSP working under linux/jakarta/apache.  I have created a context in
server.xml which is outside the .../webapps/examples.  Unfortunately I can't
work out what I need to configure to make servlets work (in my app, the
servlet examples work) and what their URL reference should be in web pages.

Some tips would be appreciated - if a document that described the
interactions between tomcat-apache.conf, server.xml, web.xml existed, that
would be helfpul.  I have tried to reverse engineer this from the comments
in the files and the webapps/examples but with no luck.

Some more background follows:

My dir tree for JSP application that is working.

/home/pms/src/doclist   (html and JSP files
    L WEB-INF   (web.xml)
        L classes   (has beans for JSP files)
        L lib  (postgresql.jar)

server.xml contains:
<Context path="/doclist" docBase="/home/pms/src/doclist" debug="0"
reloadable="true" >  </Context>

tomcat-apache.conf contains an alias to doclist:

Alias /doclist /usr/local/jakarta-tomcat/webapps/doclist
<Directory "/usr/local/jakarta-tomcat/webapps/doclist">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /doclist/servlet /doclist
<Location /doclist/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

I noticed that the path is not what I was expecting (but editing it and
restarting apache) doesn't seem to help.