Hello Jeff,

"Bailey, Jeff A" wrote:

>   I assume that
> the web.xml works and I just dont know how to implement it correctly, could
> you point me / us in the right direction?
>
> Basically I have tried placing this in web.xml:
>
>   <servlet-mapping>
>     <servlet-name>blah</servlet-name>
>     <url-pattern>/*.test</url-pattern>
>   </servlet-mapping>
>

To start with, that mapping is not a spec-compliant one.

>From the spec (10.2)

 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

Your mapping is neither 1 nor 2, so it must be 3  (an exact match) and I guess
that's not what you're trying to do.

Regarding whether an extension-mapping needs a file. We admit that the spec. is
not very clear on this issue, we'll try to get this to be more clear for JSP
1.2, although we are pretty sure that the extension-mapping is meant to be done
like we do it.

The Reference Implemetation from Sun we compared with when deciding on how to
deal with this, does it our way (reporting 404 if there is no such file). That
was an old RI though and of course this could have changed and if it has, we
will change this to make sure we are indeed implementing it in a spec compliant
manner. I will get back on this when we have made sure what the spec means, and
we'll influence the JSP 1.2 spec to be more clear.

Regards,
Karl Avedal


Reply via email to