tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hole <steve.h...@messagingdirect.com>
Subject RE: Manual servlet deployment problems on 4.1.18
Date Thu, 27 Feb 2003 04:39:57 GMT
On Wed, 26 Feb 2003 11:21:21 -0800 (PST) Steve Guo <cool_xml@yahoo.com> 
wrote:


> You tried to make it simple, but actually made it complicated.
> Your webapp is simple, so you should invoke the servlet by:
> localhost:8080/simple/simple
> localhost:8080/simple/servlet/simple

That was the trick.

This implies that the <servlet-mapping> element defines the name of the 
web application?

> Naming all the same tends to confuse users (not sure confuses Tomcat or 
> not). Why not try:
> 'test' for the webapp
> 'Simple' for the servlet
> 'simple' for the servlet name in web.xml
> then you will invoke by
> http://localhost:8080/test/servlet/Simple or
> http://localhost:8080/test/servlet/simple or
> http://localhost:8080/test/simple

So what does the web.xml look like for the above?   Something like:

<webapp>
  <servlet>
     <servlet-name>simple</servlet-name>
     <servlet-class>Simple></servlet-class>
  </servlet>

  <servlet-mapping>
     <servlet-name>simple</servlet-name>
     <url-pattern>/test</url-pattern>
  </servlet-mapping>
</webapp>

In otherwords, I assumed the <servlet-name> element linked the <servlet> 
and <servlet-mapping> elements.   Is that true?  The documentation for the
servlet-mapping functionality is not exactly great and there is no 
documentation on the default mapping rules at all that I could find.

Anyway, thanks for the help.

Cheers.

---
Steve Hole
Chief Technology Officer - Billing and Payment Systems
ACI Worldwide
<mailto:holes@ACIWorldwide.com>
Phone: 780-424-4922


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


Mime
View raw message