You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew <as...@ezan.ac.ru> on 2001/09/09 10:14:33 UTC

Re: Mapping question- suggestion

    First, thanks to All for fast respond. And I've read spec and know that
this not possible but I was believe Tomcat provide some "extension" for
such cases.Some little notice: Microsoft products(XML support in .NET for
example) doesn't use specs as is but add a litle bit more functionality for
user's convience.I think it's a goot practice as it allow correct tiny(not
visible maybe) spec  gaps "on the fly".I suppose Microsoft as one of main
participants in specs development
declare only "form/sructure" elements while hide some useful extensions for
use in their own products. So, one could not be afraid to look "beyond"
spec.
    Let's be more inventive.
Regards.

----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: <to...@jakarta.apache.org>
Sent: Saturday, September 08, 2001 11:03 PM
Subject: Re: Mapping question


>
>
> On Sat, 8 Sep 2001, Andrew wrote:
>
> > Date: Sat, 8 Sep 2001 18:11:49 +0400
> > From: Andrew <as...@ezan.ac.ru>
> > Reply-To: tomcat-user@jakarta.apache.org
> > To: tomcat-user@jakarta.apache.org
> > Subject: Mapping question
> >
> > How I can map /Path/*.ext to servlet?
>
> The legal syntax for <url-pattern> values in the web.xml file are defined
> in the servlet specification, which you can download at:
>
>   http://java.sun.com/products/servlet/download.html
>
> For your needs, you have two choices:
>
> * Path mapped ("/path/*")
>
> * Extension mapped ("*.ext")
>
> but it is *not* legal to combine them -- you have to choose one or the
> other.
>
> Craig McClanahan
>
>
>
>




Re: Mapping question- suggestion

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sun, 9 Sep 2001, Andrew wrote:

> Date: Sun, 9 Sep 2001 12:14:33 +0400
> From: Andrew <as...@ezan.ac.ru>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Mapping question- suggestion
>
>     First, thanks to All for fast respond. And I've read spec and know that
> this not possible but I was believe Tomcat provide some "extension" for
> such cases.Some little notice: Microsoft products(XML support in .NET for
> example) doesn't use specs as is but add a litle bit more functionality for
> user's convience.I think it's a goot practice as it allow correct tiny(not
> visible maybe) spec  gaps "on the fly".I suppose Microsoft as one of main
> participants in specs development
> declare only "form/sructure" elements while hide some useful extensions for
> use in their own products. So, one could not be afraid to look "beyond"
> spec.
>     Let's be more inventive.

There's a different that is at least as compelling in the Java community
-- let's be portable.

This is specifically not an issue that Microsoft does not need to address,
because they only need to be compatible with themselves (which is why they
don't need specs - whatever the product does is what the standard is, and
it can change at any time).  But, there are > 25 licensed J2EE platforms
(all of which support servlet 2.2), plus a bunch more non-J2EE servers
that are also compatible with the specs (including Tomcat).  And web
applications that conform to the specs run on *all* of them.

Let's say Tomcat was modified to be non-portable in this regard.
Naturally, you'd want to go ahead and use this feature.  But, the moment
you do, you are locked in to Tomcat now and forever more.  Is that what
you really want?

No, I didn't think so.

And if you really do, well, that's why the source is there for you to lock
yourself in.  The main class you will need to mess with is
org.apache.catalina.core.StandardContextMapper, but there are some other
places that will be affected also.

Craig