You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dean A. Hoover" <dh...@rochester.rr.com> on 2003/04/11 15:49:10 UTC

newbie tomcat-4.1.24 deployment

I'm attempting to set up a web development environment. In
order to get some understanding of what I need to do, I grabbed
a copy of the HelloWorldExample servlet that comes packaged
with tomcat. I set up a directory structure with build.xml, web.xml,
HelloWorldExample.java. If I run "ant deploy", the servlet is
compiled, a war file is built, and it is "deployed" to tomcat.

When I run tomcat manager, it shows up. I see the directory
in webapps. I try to hit the servlet using:
http://localhost:8080/apress/servlet/HelloWorldExample

from which I get HTTP Status 404. I'm guessing I am missing
something simple. I tried to follow what the tomcat example
was doing in its original place (examples application), but I
didn't quite make it. I am attaching my simple directory structure
containing the files build.xml, web.xml, and
HelloWorldExample.java, if anyone can help.

Thanks.
Dean Hoover


Re: newbie tomcat-4.1.24 deployment

Posted by "Dean A. Hoover" <dh...@rochester.rr.com>.
solved by adding to web.xml:

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

Dean A. Hoover wrote:

> I'm attempting to set up a web development environment. In
> order to get some understanding of what I need to do, I grabbed
> a copy of the HelloWorldExample servlet that comes packaged
> with tomcat. I set up a directory structure with build.xml, web.xml,
> HelloWorldExample.java. If I run "ant deploy", the servlet is
> compiled, a war file is built, and it is "deployed" to tomcat.
>
> When I run tomcat manager, it shows up. I see the directory
> in webapps. I try to hit the servlet using:
> http://localhost:8080/apress/servlet/HelloWorldExample
>
> from which I get HTTP Status 404. I'm guessing I am missing
> something simple. I tried to follow what the tomcat example
> was doing in its original place (examples application), but I
> didn't quite make it. I am attaching my simple directory structure
> containing the files build.xml, web.xml, and
> HelloWorldExample.java, if anyone can help.
>
> Thanks.
> Dean Hoover
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org