Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] Ordering Filters/Listeners

Thank you Mark.

I am glad to get your response for my post.
I agree that It is possible by writing a fat web.xml which is merged
with web-fragment.xml.
Consequently,
・Servlet specification provides that the assembler can customize
any ordering between fragments by absolute-ordering elements .
・Servlet specification DOES NOT provide that the assembler put
a fragment before web.xml, because the assembler can write a fat web.xml.

I can understand, this is a reasonable line.
So everything becomes clear.

Regards,

2023年1月30日(月) 18:53 Mark Thomas <markt@xxxxxxxxxx>:
>
> On 29/01/2023 06:20, Masao Sato wrote:
> > No way to put the top of order for order sensitive elements (filters
> > or listeners ) of web-fragment.xml .
>
> As per section 8.2.3, if an application requires such a configuration it
> can do so in the application's web.xml.
>
> > why?
> > This restriction is designed by some historical reason?
>
> See the Servlet 3 EG discussions for how the current solution evolved.
>
> > Or  should we discuss the optional rules to relax this restriction?
> >
> > Does the current servlet specification need  2 optional features?
> > One is  pre-defined name for web.xml module, used in name element in
> > abstract-ordering or ordering elements. The other is optional flag
> > which treats the web.xml module as a member of  the othres elements.
> > These features will overwrite default ordering rule of web.xml and can
> > put any fragments before web.xml module.
>
> I think this is a case of 'Where do you draw the line?' It isn't
> possible to have Filters from fragment A before Filters from fragment C
> as well as listeners from fragment C before listeners from fragment A
> either. Should we introduce ordering controls per configuration type?
>
> There is a balance to strike between configuration flexibility and
> configuration complexity.
>
> The current solution of "if you can't do what you want with fragment
> ordering, use the application's web.xml" seems to strike a reasonable
> balance.
>
> I'll note that, with the rules for merging web.xml and web-fragment.xml
> in section 8.2.3, it is often possible to achieve the desired behaviour
> by only moving a few definitions to the application web.xml.
>
> Mark
> _______________________________________________
> 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