Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] Cosmetic change - nest URL patterns in Filter/Servlet


Arjan,

hmmm if we start trying to make XML less verbose and more readable, then where would we stop :)

However, I'm not totally opposed to some convenience improvements.... but they would need a very simple/clear mapping back to the canonical form.  How about something like:

<filter>
    <filter-class>org.example.Filter</filter-class>
    <mapping>
        <url-pattern>/SomePath</url-pattern>
    </mapping>
</filter>

As that would still work well for multiple mappings and if dispatch types were included.   Of course the same would need to be done for servlets and the general change would be that a <mapping> within a <XXX> would be identical to a <XXX-mapping> with the same name.

cheers


On Fri, 30 Apr 2021 at 07:51, arjan tijms <arjan.tijms@xxxxxxxxx> wrote:
Hi,

Quite often I see patterns like the following: n I see 

<filter>
    <filter-name>SomePath</filter-name>
    <filter-class>org.example.Filter</filter-class>
</filter>
<filter-mapping>
    <filter-name>SomePath</filter-name>
    <url-pattern>/SomePath</url-pattern>
</filter-mapping>

What about making it a little more compact as an option and allow for:

<filter>
    <filter-class>org.example.Filter</filter-class>
    <url-pattern>/SomePath</url-pattern>
</filter>

Thoughts?

Kind regards,
Arjan Tijms

_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev


--

Back to the top