You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2011/03/04 16:49:08 UTC

WicketFilter works with only one filterPath

Hi,

In the context of https://issues.apache.org/jira/browse/WICKET-3497 I want
to ask other Wicket devs whether WicketFilter parses only one
<filter-mapping> and ignores others by intention ?
Debugging https://issues.apache.org/jira/browse/WICKET-3497 I think Wicket
1.4 handles the case with two or more <filter-mappings> on the same <filter>
by accident.

So my question is: were there any discussions (around Wicket 1.1/1.2) that
WicketFilter/WicketServlet should work only with the first <**-mapping> ?


Example from the ticket quickstart:

<servlet>
<servlet-name>wicket.getUrlTest</servlet-name>
<servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
 <init-param>
<param-name>applicationClassName</param-name>
 <param-value>fs.quick.wicket.WicketApplication</param-value>
</init-param>
 </servlet>

<servlet-mapping>
<servlet-name>wicket.getUrlTest</servlet-name>
 <url-pattern>/app/*</url-pattern>
</servlet-mapping>

 <servlet-mapping>
<servlet-name>wicket.getUrlTest</servlet-name>
 <url-pattern>/longapp/*</url-pattern>
</servlet-mapping>

martin-g

Re: WicketFilter works with only one filterPath

Posted by Igor Vaynberg <ig...@gmail.com>.
we are building a specialization of the servlet api, so we dont have
to support every possible feature.

once we have a listener in place, and sounds like we need it for 1.5,
this problem may go away anyways.

-igor

On Sat, Mar 5, 2011 at 10:28 AM, Martin Grigorov <mg...@apache.org> wrote:
> The only problem is that Servlet API supports it and Wicket < 1.5 too (as I
> said - by accident)
>
> I guess the solution/workaround for the ticket is to create two pairs of
> <servlet>/<servlet-mapping> using the same Application impl
>
> On Sat, Mar 5, 2011 at 8:16 PM, Igor Vaynberg <ig...@gmail.com>wrote:
>
>> it doesnt make much sense to map the same filter instance to two
>> different paths...
>>
>> -igor
>>
>> On Sat, Mar 5, 2011 at 5:16 AM, Juergen Donnerstag
>> <ju...@gmail.com> wrote:
>> > I don't know. May be too long ago.
>> >
>> > -Juergen
>> >
>> > On Fri, Mar 4, 2011 at 4:49 PM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> >> Hi,
>> >>
>> >> In the context of https://issues.apache.org/jira/browse/WICKET-3497 I
>> want
>> >> to ask other Wicket devs whether WicketFilter parses only one
>> >> <filter-mapping> and ignores others by intention ?
>> >> Debugging https://issues.apache.org/jira/browse/WICKET-3497 I think
>> Wicket
>> >> 1.4 handles the case with two or more <filter-mappings> on the same
>> <filter>
>> >> by accident.
>> >>
>> >> So my question is: were there any discussions (around Wicket 1.1/1.2)
>> that
>> >> WicketFilter/WicketServlet should work only with the first <**-mapping>
>> ?
>> >>
>> >>
>> >> Example from the ticket quickstart:
>> >>
>> >> <servlet>
>> >> <servlet-name>wicket.getUrlTest</servlet-name>
>> >>
>> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>> >>  <init-param>
>> >> <param-name>applicationClassName</param-name>
>> >>  <param-value>fs.quick.wicket.WicketApplication</param-value>
>> >> </init-param>
>> >>  </servlet>
>> >>
>> >> <servlet-mapping>
>> >> <servlet-name>wicket.getUrlTest</servlet-name>
>> >>  <url-pattern>/app/*</url-pattern>
>> >> </servlet-mapping>
>> >>
>> >>  <servlet-mapping>
>> >> <servlet-name>wicket.getUrlTest</servlet-name>
>> >>  <url-pattern>/longapp/*</url-pattern>
>> >> </servlet-mapping>
>> >>
>> >> martin-g
>> >>
>> >
>>
>

Re: WicketFilter works with only one filterPath

Posted by Martin Grigorov <mg...@apache.org>.
The only problem is that Servlet API supports it and Wicket < 1.5 too (as I
said - by accident)

I guess the solution/workaround for the ticket is to create two pairs of
<servlet>/<servlet-mapping> using the same Application impl

On Sat, Mar 5, 2011 at 8:16 PM, Igor Vaynberg <ig...@gmail.com>wrote:

> it doesnt make much sense to map the same filter instance to two
> different paths...
>
> -igor
>
> On Sat, Mar 5, 2011 at 5:16 AM, Juergen Donnerstag
> <ju...@gmail.com> wrote:
> > I don't know. May be too long ago.
> >
> > -Juergen
> >
> > On Fri, Mar 4, 2011 at 4:49 PM, Martin Grigorov <mg...@apache.org>
> wrote:
> >> Hi,
> >>
> >> In the context of https://issues.apache.org/jira/browse/WICKET-3497 I
> want
> >> to ask other Wicket devs whether WicketFilter parses only one
> >> <filter-mapping> and ignores others by intention ?
> >> Debugging https://issues.apache.org/jira/browse/WICKET-3497 I think
> Wicket
> >> 1.4 handles the case with two or more <filter-mappings> on the same
> <filter>
> >> by accident.
> >>
> >> So my question is: were there any discussions (around Wicket 1.1/1.2)
> that
> >> WicketFilter/WicketServlet should work only with the first <**-mapping>
> ?
> >>
> >>
> >> Example from the ticket quickstart:
> >>
> >> <servlet>
> >> <servlet-name>wicket.getUrlTest</servlet-name>
> >>
> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
> >>  <init-param>
> >> <param-name>applicationClassName</param-name>
> >>  <param-value>fs.quick.wicket.WicketApplication</param-value>
> >> </init-param>
> >>  </servlet>
> >>
> >> <servlet-mapping>
> >> <servlet-name>wicket.getUrlTest</servlet-name>
> >>  <url-pattern>/app/*</url-pattern>
> >> </servlet-mapping>
> >>
> >>  <servlet-mapping>
> >> <servlet-name>wicket.getUrlTest</servlet-name>
> >>  <url-pattern>/longapp/*</url-pattern>
> >> </servlet-mapping>
> >>
> >> martin-g
> >>
> >
>

Re: WicketFilter works with only one filterPath

Posted by Igor Vaynberg <ig...@gmail.com>.
it doesnt make much sense to map the same filter instance to two
different paths...

-igor

On Sat, Mar 5, 2011 at 5:16 AM, Juergen Donnerstag
<ju...@gmail.com> wrote:
> I don't know. May be too long ago.
>
> -Juergen
>
> On Fri, Mar 4, 2011 at 4:49 PM, Martin Grigorov <mg...@apache.org> wrote:
>> Hi,
>>
>> In the context of https://issues.apache.org/jira/browse/WICKET-3497 I want
>> to ask other Wicket devs whether WicketFilter parses only one
>> <filter-mapping> and ignores others by intention ?
>> Debugging https://issues.apache.org/jira/browse/WICKET-3497 I think Wicket
>> 1.4 handles the case with two or more <filter-mappings> on the same <filter>
>> by accident.
>>
>> So my question is: were there any discussions (around Wicket 1.1/1.2) that
>> WicketFilter/WicketServlet should work only with the first <**-mapping> ?
>>
>>
>> Example from the ticket quickstart:
>>
>> <servlet>
>> <servlet-name>wicket.getUrlTest</servlet-name>
>> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>>  <init-param>
>> <param-name>applicationClassName</param-name>
>>  <param-value>fs.quick.wicket.WicketApplication</param-value>
>> </init-param>
>>  </servlet>
>>
>> <servlet-mapping>
>> <servlet-name>wicket.getUrlTest</servlet-name>
>>  <url-pattern>/app/*</url-pattern>
>> </servlet-mapping>
>>
>>  <servlet-mapping>
>> <servlet-name>wicket.getUrlTest</servlet-name>
>>  <url-pattern>/longapp/*</url-pattern>
>> </servlet-mapping>
>>
>> martin-g
>>
>

Re: WicketFilter works with only one filterPath

Posted by Juergen Donnerstag <ju...@gmail.com>.
I don't know. May be too long ago.

-Juergen

On Fri, Mar 4, 2011 at 4:49 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> In the context of https://issues.apache.org/jira/browse/WICKET-3497 I want
> to ask other Wicket devs whether WicketFilter parses only one
> <filter-mapping> and ignores others by intention ?
> Debugging https://issues.apache.org/jira/browse/WICKET-3497 I think Wicket
> 1.4 handles the case with two or more <filter-mappings> on the same <filter>
> by accident.
>
> So my question is: were there any discussions (around Wicket 1.1/1.2) that
> WicketFilter/WicketServlet should work only with the first <**-mapping> ?
>
>
> Example from the ticket quickstart:
>
> <servlet>
> <servlet-name>wicket.getUrlTest</servlet-name>
> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
>  <init-param>
> <param-name>applicationClassName</param-name>
>  <param-value>fs.quick.wicket.WicketApplication</param-value>
> </init-param>
>  </servlet>
>
> <servlet-mapping>
> <servlet-name>wicket.getUrlTest</servlet-name>
>  <url-pattern>/app/*</url-pattern>
> </servlet-mapping>
>
>  <servlet-mapping>
> <servlet-name>wicket.getUrlTest</servlet-name>
>  <url-pattern>/longapp/*</url-pattern>
> </servlet-mapping>
>
> martin-g
>