With regards to mappings, Section 11.2 of the JSDK 2.3 spec says:

     A string containing only the '/' character indicates the "default"
servlet of the
     application. In this case the servlet path is the request URI minus
the context
     path and the path info is null.

To make my servlet the default servlet of my web app, I put the following
into my web app's WEB.XML file:

     <servlet-mapping>
         <servlet-name>myServlet</servlet-name>
         <url-pattern>/</url-pattern>
     </servlet-mapping>

I thought, then, that I could call my servlet from within a JSP with the
following, but it doesn't seem to work:

     <jsp:include page="/" flush="true">
         <jsp:param name="someParam" value="someValue" />
     </jsp:include>

When calling the JSP with "http://myMachine/myApp/myJSP.jsp";, the JSP
loads, but the <jsp:include> doesn't resolve correctly.  Checking the debug
log (Tomcat 4.0.3), I see the following:

   Mapping contextPath='/myApp' with requestURI='/myApp/' and relativeURI='/'
   Decoded relativeURI='/'
   Trying exact match
   Trying prefix match
   Trying extension match
   Trying default match
   Mapped to servlet 'default' with servlet path '/' and path info 'null'
and update=true

Shouldn't I have gotten an exact match on my web app's default servlet,
instead of it defaulting to Tomcat's default servlet?

Jay

___________________________________________________________________________
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