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: Servlet running/not running
Date Fri, 25 Oct 2002 18:40:16 GMT
Hi,

>I have installed Tomcat 4.1.12. I have this directory structure for a
>servlet. C:\Tomcat\webapps\myApp\WEB-INF\classes and the servlet name
is
>test. OK. When I try to see this servlet by
>http://localhost:8080/myApp/servlet/test, I get this; "The requested
>resource (/myApp/servlet/test) is not available. Now, if I copy the
>test.class file to C:\Tomcat\webapps\examples\WEB-INF\classes, it works
>(http://localhost:8080/examples/servlet/test), which leads me to
believe
>that I need to do some tweaking with the configuration.

4.1.12 comes with the default invoker servlet mapping turned off for
security.  The release notes have the full details.

Uncomment the <servlet-mapping> element for the invoker servlet in
$CATALINA_HOME/conf/web.xml to make the above work.

Better yet, declare a mapping for your servlet by adding the following
to your web.xml (the one in myApp/WEB-INF):

<servlet>
  <servlet-name>testServletName</servlet-name>
  <servlet-class>test</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>testServletName</servlet-name>
  <url-pattern>/Test</url-pattern>
</servlet-mapping>

And then access your servlet by
http://localhost:8080/myApp/Test

This way, you don't have to have the invoker servlet.  

>THREAT: I posted this question yesterday too but didn't get any reply.
>Understand that I'm a Microsoft programmer trying to get on board with
you
>Java people and if you don't help me, I'll go back to working on good
ol'
>IIS.
>
> It's more of a threat to IIS actually :)

Funniest paragraph I've seen in a while ;) ;) ;)

Yoav Shapira
Millennium ChemInformatics

Mime
View raw message