Try this to solve the 1st part of ur question. Part of my private FAQ list
being compiled b4 being released.

1.      How do I create a root context i.e / mapping to a context?
a.      Create the mapping in the server.xml e.g-below

<!-- ==== Special webapps ==== -->
                    <Context path="/some.domain.name"
                 docBase="webapps/context_name"
                 crossContext="false"
                 trusted="false"
                 isInvokerEnabled="true"
                 isWorkDirPersistent="true"
                 debug="0"
                 reloadable="false" >
        </Context
b.      Edit the tomcat-apache.conf  file u r using to reflect it and mount
the Jserv module to that context. E.g. Below

ApJServMount /some.domain.name/blah/servlet/blah /some.domain.name/

c. (optional) After this, if doesn't work, go to httpd.conf and Change
Servername variable with IP address of the server

Good luck. If u r having further problems, contact me.

Martin Olumide Ajayi-Obe

One, Inc.

-----Original Message-----
From: Milt Epstein [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 10:04 PM
To: [EMAIL PROTECTED]
Subject: Servlet as default "page" for web app


I just started using Tomcat, and hence the 2.2 servlet spec.  But I
don't think this is anything specific to Tomcat, it seems like it just
has to do with what the 2.2 servlet spec allows.

What I'm trying to do is have a URL of the form:

http://some.domain.name/blah

go directly to a servlet, i.e. something that normally you'd get to
with a URL of the form:

http://some.domain.name/blah/servlet/blah

I've set up blah as a webapp (i.e. a context), and essentially I'd
like a servlet to be the default "page" of the webapp.  The default
page can be a static html page (e.g. index.html) or a JSP
(e.g. index.jsp), so why not a servlet?  But I've tried a few things
with the webapp's servlet names and servlet mappings in the web.xml
file, without success.

At jakarta.apache.org, I found a similar question in the FAQ-o-matic,
and it suggested having the default index page do a redirect, and/or
using Apache's mod_rewrite.  I tried the former, both with a static
html page (and a META Refresh) and a JSP (and a RequestDispatcher
forward()), and while it works, it changes the Location: shown by the
browser to:

http://some.domain.name/blah/servlet/blah

which I'd like to avoid.  I thought maybe there was something
available via the servlet spec (and/or Tomcat) that I was missing.

I'm looking into the mod_rewrite solution as well.

Thanks.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to