<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Seems strange that there wouldn't be the option to do this. Is there any
> way to write your own default servlet?
>

To do your own default servlet, you need a mapping like the one for
"default" in conf/web.xml:
   <servlet-mapping>
      <servlet-name>MyDefaultServlet</servlet-name>
      <url-pattern>/</url-pattern>
   </servlet-mapping>

This mapping sends anything that doesn't match any other mapping to
MyDefaultServlet.  In particular, this usually means static content as well
(e.g. gif, jpeg, css, etc files), so your servlet has to be prepared to deal
with this case as well.


>
> Thank You,
>
> Justin A. Stanczak
> Web Manager
> Shake Learning Resource Center
> Vincennes University
> (812)888-5813
>
>
>
>
> "Mike Cherichetti \(Renegade Internet\)" <[EMAIL PROTECTED]>
> 09/03/2003 08:11 PM
> Please respond to "Tomcat Users List"
>
>
>         To:     "Tomcat Users List" <[EMAIL PROTECTED]>
>         cc:
>         Subject:        RE: Servlet mappings?
>
>
> I don't think this can be done with mappings.  You can put an index.jsp
> file
> with only a forward/redirect call in it to transfer control to your
> servlet.
> I've done this before, seems to work quite well.
>
> Mike
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 03, 2003 8:55 PM
> To: [EMAIL PROTECTED]
> Subject: Servlet mappings?
>
>
> I have a web app with multiple servlets. I would like one of those
> servlets to handle all requests to http://mywebserver/. Basically I want
> it to do the same thing as the welcome-file in the web.xml. How can I do
> this?
>
>
> Thank You,
>
> Justin A. Stanczak
> Web Manager
> Shake Learning Resource Center
> Vincennes University
> (812)888-5813
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>




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

Reply via email to