On Tue, 6 Mar 2001, Gordon Rose wrote:

> What I can't seem to figure out is how to configure (and in which
> file?) in order to be able to access the HelloWorld servlet using a
> URL of
>
> http://localhost/GApp/HelloWorld
>
> I know I can do this with JRun (first environment with which I
> worked).  Is it even doable in Tomcat?  I have to believe so, and that
> I've just missed it somehow.

Yes, you should look at the docs for web.xml for creating
servlet-mappings.  In fact, take the plunge and look at the specs
available at Sun for servlets 2.2:

http://java.sun.com/products/servlet/download.html

> In a related question, how do I create a URL mapping for a servlet
> (again, via what conf file) that is located in a directory other than
> the WEB-INF\classes folder (but under the root of the particular web
> app)?

I think this is done also in web.xml, using the same facilities as defined
in the 2.2 specs.

You may also need to define a servlet context in server.xml, depending on
how your directory structure is created.

-- Brett
                                http://www.chapelperilous.net/~bmccoy/
------------------------------------------------------------------------
I worked in a health food store once.  A guy came in and asked me,
"If I melt dry ice, can I take a bath without getting wet?"
                -- Steven Wright


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to