I found an interesting situation, possibly a bug.  I am using Orion 1.0.3b, and
in the WEB-INF/web.xml file I declare my <servlet-mapping> in the following
manner:

<servlet-mapping>
     <servlet-name>Login</servlet-name>
     <url-pattern>/Login/*</url-pattern>
</servlet-mapping>

I have a Form that calls this servlet.  Like:

<HTML>
     <BODY>
          <FORM METHOD="POST" ACTION="/Login">
               <INPUT TYPE="HIDDEN" NAME="action" VALUE="auth">
               <INPUT TYPE="INPUT" NAME="j_username">
               <INPUT TYPE="PASSWORD" NAME="j_password">
               <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit">
          </FORM>
     </BODY>
</HTML>

This mapping works in WebLogic, but does not work in Orion. Well, it sort of
works....The correct servlet will be fired off, but the Request coming in is
empty.  I do not see anything coming in from the form.  But If I do the
following mapping:

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


It works.  The first mapping should work as well.  Below I have copied part of
the Java 2 Servlet Specification v2.2 that deals with Mapping, which is Section
10.   -- Notice servlet2 in the Mapping Examples. --

According to the spec(Java 2 Servlet Specification v2.2 -- SRV.10.2; Examples
are in SRV.10.2.2):

SRV.10.2 Specification of mappings
In the web application deployment descriptor, the following syntax is used to
define mappings:

- A string beginning with a '/' character and ending with a '/*' postfix is used
as a path mapping.
- A string beginning with a '*.' prefix is used as an extension mapping
- All other strings are used as exact matches only
- A string containing only the '/' character indicates that the servlet
specified by the mapping becomes the "default" servlet of the application.

SRV.10.2.1 Implicit Mappings
....
....
....

SRV.10.2.2 Example Mapping Set
Consider the set of mappings in Table SRV.10-1

Table SRV10-1 Example Set of Maps
Path Pattern        Servlet
/foo/bar/*          servlet1
/baz/*              servlet2
/catalog       servlet3
*.bop               servlet4


The behavior in Table SRV.10-2 would result.

Table SRV.10-2: Incoming Paths Applied to Example Maps
Incoming Path            Servlet handling Request
/foo/bar/index.html      servlet1
/foo/bar/index.bop       servlet1
/baz                servlet2
/baz/index.html               servlet2
/catalog            servlet3
/catalog/index.html      "default" servlet
/catalog/racecar.bop          servlet4
/index.bop               servlet4












Reply via email to