tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Brazhnyk <a.brazh...@biconsulting.ws>
Subject RE: Default Servlet
Date Fri, 08 Feb 2002 10:59:48 GMT

> -----Original Message-----
> From: Odo [mailto:god@heaven.club.ne.jp]
> Sent: Friday, February 08, 2002 12:27 PM
> To: Tomcat Users List
> Subject: Re: Default Servlet
> 
> 
> Yes Anton,in my case as you said it's enough to have only Tomcat4.
> But if I'll configure Tomcat4 running alone,listening port 80,
> what should i do to redirect all my requests directly (not using in 
> middle any html or jsp) to only one servlet Myservlet?
> Please give me some examples or links with examples?
> 

I wouldn't recommend you using invoker servlet 
(it usually used when you call something like /servlet/myServlet.
Assuming you will use ROOT application (to leave server.xml alone)
in your web.xml you can write something like:

  <servlet>
    <servlet-name>name</servlet-name>
    <servlet-class>package.YourServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>name</servlet-name>
    <url-pattern>/</url-pattern> <!-- its default now -->
  </servlet-mapping>

One thing you need to be aware of, absolutely any request that
isn't mapped explicitly will go to your servlet (including
static resources e.g. http://host//index.html or /images/top.jpeg)

Somebody please correct me if I'm wrong, since I tried it long ago. :)

Anton


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message