I -think- that you don't have to create all of the

>     <servlet>
>         <servlet-name>
>             Test1
>         </servlet-name>
>         <servlet-class>
>             Test1
>         </servlet-class>
>     </servlet>

There is an Invoker servlet that you associate with the
path for the servlets... and the invoker looks for the
class file, and runs it.  

in the tomcat/conf/web.xml:

    <servlet>
        <servlet-name>
            invoker
        </servlet-name>
        <servlet-class>
            org.apache.tomcat.servlets.InvokerServlet
        </servlet-class>
    </servlet>

and you associate this with a path in your app web.xml:

     <servlet-mapping>
         <servlet-name>
             invoker
         </servlet-name>
         <url-pattern>
             /vsj/*
         </url-pattern>
     </servlet-mapping>

Can anyone confirm this?  I can't find any docs for the
ServletInvoker... and can not get things running.  The 
lack of detailed documentation is extremely frustrating.
Even the the recent article in Linux Journal glosses over
all the important details.

-Jim


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 16, 2001 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: web.xml
> 
> 
> I want to know, whenever you want any servlets to run do you 
> have to put an 
> entry in the web.xml file? Can you run a servlet without 
> putting an entry in 
> there. Lets say I write a servlet called "Test1.java" that uses the 
> 'RequestDispatcher's methods "forward()" or "include()". And 
> lets say that I 
> want to either "foward()"  or "include()" a servlet call 
> "Test2.java" , does 
> that mean that I have to put an entry in the web.xml like this:
> 
>     <servlet>
>         <servlet-name>
>             Test1
>         </servlet-name>
>         <servlet-class>
>             Test1
>         </servlet-class>
>     </servlet>
>     <servlet>
>         <serlvet-name>
>             Test2
>         </servlet-name>
>         <servlet-class>
>             Test2
>         </servlet-class>
>     </servlet>
> 
> If this is true, meaning, if I have to put an entry in the 
> web.xml file for 
> every script I write would it get pretty messy and hard to 
> organize with all 
> these entrees in the web.xml file.There must a another 
> way............. 
> 
> 

Reply via email to