Hi,
    Thanks Simon for the valuable advice. I got most of it. I still need
some clarifications:

I am use:    Tomcat 3.2
                 WindowsNT4
                  IIS 4.0.

Things I did is:
1) I Repeated the following lines in server.xml in <tomcat home/conf>
    for different context-paths
(i.e. for  http://host/context-path/<servlet name>:     /servlet, /login
etc)

    by adding different values of 'prefix' attribute.

<RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="0" prefix="/login/" />

2) Defined mappings in web.xml (in webapps/root/.../web.xml) for all
servlets that are in packages.

        This seems to work when I requests to Tomcat directly. I wanted to
know:
A) whether the above configurations is logically CORRECT.

-Thanks

-Thyagesh




----- Original Message -----
From: Kitching Simon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 18, 2000 4:43 PM
Subject: RE: Need Some help..


> Hi,
>
> I suggest thinking of your mappings in two steps:
> (a) get the mappings right *within* a context
> (b) decide what context prefix you want.
>
> If you ve a context with a path (ie url prefix) of
> "mywebapp", then you can set up URLs as you desire
> *within* that webapp.
>
> Configuring the url->servlet mappings (ie what servlet
> is run when a user requests a particular url) is done
> by defining <servlet-mapping> tags within the
> WEB-INF/web.xml file for your webapp. The urls
> you define like this are all *relative* to the webapp
> url, eg if you set up a mapping from "/foo" to the
> java class "mypackage.myclass", then it must be
> accessed by the user as "http://somehost/webappname/foo".
>
> If you have a whole bunch of servlets, and you don't want
> to enter separate servlet-mapping entries for each one, then
> you may want to take advantage of the "invoker servlet" which
> effectively sets up bulk url mappings for you, but doesn't give
> you such fine control as creating invididual mappings.
>
> Deciding whether you want the webapp to have a
> prefix of "/" (ie be the root webapp) is a separate
> thing. This is configured with the <context> tag
> in the $TOMCAT_HOME/conf/server.xml file.
>
> WAR files have nothing to do with paths at all; they
> are just a convenient method of installing the bunch of
> files making up a webapp.
>
>
> PS: In future, please specify your tomcat VERSION, as
> answers to questions often depend on which tomcat you
> are using.
>
> Regards,
>
> Simon
>

Reply via email to