tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Help Needed to configure servlets
Date Fri, 25 Oct 2002 12:55:43 GMT
Hi,

>webapps
>   --- AppDir                     -----  JSP file
>        --- Web-inf               ----- web.xml file
>              -- classes         ----- My Servlet Class files
>
>http://localhost:port/AppDir/<Servletclass>

In the above configuration, if you have the invoker servlet mapping
enabled in $CATALINA_HOME/conf/web.xml:

http://localhost:port/AppDir/servlet/<ServletClass> will invoke your
servlet
http://localhost:port/AppDir/your.jsp will invoke your JSP file

If you add the following to your web.xml:
<servlet>
  <servlet-name>myservlet</servlet-name>
  <servlet-class>your.servlet.class</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>myservlet</servlet-name>
  <url-pattern>/MyServlet</url-pattern>
</servlet-mapping>

Then your servlet will be accessible (without needing the invoker
servlet) at:
http://localhost:port/AppDir/MyServlet

Yoav Shapira
Millennium ChemInformatics

Mime
View raw message