On Wed, 26 Feb 2003 11:21:21 -0800 (PST) Steve Guo <[EMAIL PROTECTED]> 
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:[EMAIL PROTECTED]>
Phone: 780-424-4922


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to