tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chase" <ch...@osdev.org>
Subject Re: Problems in starting up a servlet
Date Mon, 29 Oct 2001 03:25:38 GMT

----- Original Message -----
From: "Jovie Castaneda" <jovie@pure-commerce.com>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Sunday, October 28, 2001 8:33 PM
Subject: Problems in starting up a servlet


> I am trying to make my servlet work at the start of tomcat
> my servlet is located in the webapps/test/web-inf/classes
> -in the browser you can access it through
> http://localhost:8080/test/servlet/StartMe
>
> these are things I have done
> 1.Edit web.xml in the conf directory
>    I added the following:

webs apps get searched for and automatically loaded, you don't really need
to do this. Atleat I know they do with the latest Tomcat...

> I also edited the web.xml located in /webapps/test

did you leave off here "WEB-INF" ?

> with the following:
>  <servlet>
>         <servlet-name>StartMe</servlet-name>
>         <servlet-class>StartMe</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>StartMe</servlet-name>
>         <url-pattern>/StartMe</url-pattern>
>     </servlet-mapping>

When you specify a url-pattern, you are specifying the virtual location in
the webapp. The url would look like http://localhost:8080/test/StartMe . You
could just leave out the web.xml and access the servlet via the first url
you were trying.

-Chase


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


Mime
View raw message