You have a webapp: /MyWebApp
You have a servlet mapping /MyServlet

Then the full URL is /MyWebApp/MyServlet

Notice that you don't have a servlet mapping of /MyWebApp/MyServlet

Dion

> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Duane
> Morse
> Sent: Thursday, May 31, 2001 6:33 PM
> To: [EMAIL PROTECTED]
> Subject: URLs and servlet mapping
>
>
> I'm confused about the rules related to servlet mapping.  Suppose
> my Web app
> is called MyApp, and I make a servlet
> mapping to associate the URL "/MyApp/X" with servlet XServlet.  Suppose
> XServlet produces a page with a HREF to
> another servlet, YServlet.  I know that mapping "/MyApp/Y" to "YServlet"
> works, so "/MyApp/Y" would be a valid
> HREF.  But must the HREF (and, correspondingly, the servlet
> mapping), always
> start with the Web app name?
> If I wanted to make the HREF simply "Y", would the request make
> it to MyApp
> at all?  If so, would the URL have been
> transformed into "/MyApp/Y" so that the servlet mapping would do the right
> thing?
>
> Duane Morse, Eldorado Computing Inc., Phoenix Arizona
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to