You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kent lai <ma...@virtuallyonline.net> on 2007/10/02 18:27:55 UTC

Url Coding Strategy

Hi,
	I am wondering if Wicket supports an in-built coding strategy where  
I can, given the following form

	/{var1}/fragment1/fragment2/{var2}/{var3}

	it can be mounted as a url to a page, passing in page parameters  
var1, var2, and var3.

	A more real use case of this could be a multi user site, with each  
user having a publicly accessible page.

	/kentlai/blog/2007/june -> BlogMonthArchivePage with page parameters  
user:kentlai, year:2007, month:june
	/wicket/blog/2006/may -> BlogMonthArchivePage with page parameters  
user:wicket, year:2006, month:may

	I looked through the available IRequestTargetUrlCodingStrategy, but  
could not find anything that is described to perform as above, so  
would like to check in the mailing list if it has been done before.

	Thanks

Kent


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Url Coding Strategy

Posted by kent lai <ma...@virtuallyonline.net>.
I tried out urlrewrite, but it seems that, unless the rewrite rule  
has a to type as redirect, it was unable to load my wicket page.

Looking at urlcodingstrategy, it seemed that i might need a 'stable  
mount point' as a start so that parameters can go after that. If I am  
to come up with a way to decode the url I desire, am I right to say I  
should look into IRequestCodingStrategy instead?

On 03 Oct 2007, at 12:57 AM, kent lai wrote:

> Mixing MixedParamUrlCodingStrategy with urlrewrite sounds like a  
> great idea. I would give it a go.
>
> Thanks!
>
> kent
>
> On 03 Oct 2007, at 12:48 AM, David Bernard wrote:
>
>> Have you try to customise (ignore fragment1 and fragment2, or  
>> override matches methods) the following class:
>> *  
>> org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy
>> * or  
>> org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy
>>
>> Or use a filter like urlrewrite (http://tuckey.org/urlrewrite/) to  
>> convert
>> /{var1}/fragment1/fragment2/{var2}/{var3}
>> into
>> /fragment1/fragment2/{var1}/{var2}/{var3}
>>
>> /david
>>
>> kent lai wrote:
>>> Hi,
>>>     I am wondering if Wicket supports an in-built coding strategy  
>>> where I can, given the following form
>>>     /{var1}/fragment1/fragment2/{var2}/{var3}
>>>     it can be mounted as a url to a page, passing in page  
>>> parameters var1, var2, and var3.
>>>     A more real use case of this could be a multi user site, with  
>>> each user having a publicly accessible page.
>>>     /kentlai/blog/2007/june -> BlogMonthArchivePage with page  
>>> parameters user:kentlai, year:2007, month:june
>>>     /wicket/blog/2006/may -> BlogMonthArchivePage with page  
>>> parameters user:wicket, year:2006, month:may
>>>     I looked through the available  
>>> IRequestTargetUrlCodingStrategy, but could not find anything that  
>>> is described to perform as above, so would like to check in the  
>>> mailing list if it has been done before.
>>>     Thanks
>>> Kent
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Url Coding Strategy

Posted by kent lai <ma...@virtuallyonline.net>.
Mixing MixedParamUrlCodingStrategy with urlrewrite sounds like a  
great idea. I would give it a go.

Thanks!

kent

On 03 Oct 2007, at 12:48 AM, David Bernard wrote:

> Have you try to customise (ignore fragment1 and fragment2, or  
> override matches methods) the following class:
> *  
> org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy
> * or  
> org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy
>
> Or use a filter like urlrewrite (http://tuckey.org/urlrewrite/) to  
> convert
> /{var1}/fragment1/fragment2/{var2}/{var3}
> into
> /fragment1/fragment2/{var1}/{var2}/{var3}
>
> /david
>
> kent lai wrote:
>> Hi,
>>     I am wondering if Wicket supports an in-built coding strategy  
>> where I can, given the following form
>>     /{var1}/fragment1/fragment2/{var2}/{var3}
>>     it can be mounted as a url to a page, passing in page  
>> parameters var1, var2, and var3.
>>     A more real use case of this could be a multi user site, with  
>> each user having a publicly accessible page.
>>     /kentlai/blog/2007/june -> BlogMonthArchivePage with page  
>> parameters user:kentlai, year:2007, month:june
>>     /wicket/blog/2006/may -> BlogMonthArchivePage with page  
>> parameters user:wicket, year:2006, month:may
>>     I looked through the available  
>> IRequestTargetUrlCodingStrategy, but could not find anything that  
>> is described to perform as above, so would like to check in the  
>> mailing list if it has been done before.
>>     Thanks
>> Kent
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Url Coding Strategy

Posted by David Bernard <dw...@free.fr>.
Have you try to customise (ignore fragment1 and fragment2, or override matches methods) the following class:
* org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy
* or org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy

Or use a filter like urlrewrite (http://tuckey.org/urlrewrite/) to convert
/{var1}/fragment1/fragment2/{var2}/{var3}
into
/fragment1/fragment2/{var1}/{var2}/{var3}

/david

kent lai wrote:
> Hi,
>     I am wondering if Wicket supports an in-built coding strategy where 
> I can, given the following form
> 
>     /{var1}/fragment1/fragment2/{var2}/{var3}
> 
>     it can be mounted as a url to a page, passing in page parameters 
> var1, var2, and var3.
> 
>     A more real use case of this could be a multi user site, with each 
> user having a publicly accessible page.
> 
>     /kentlai/blog/2007/june -> BlogMonthArchivePage with page parameters 
> user:kentlai, year:2007, month:june
>     /wicket/blog/2006/may -> BlogMonthArchivePage with page parameters 
> user:wicket, year:2006, month:may
> 
>     I looked through the available IRequestTargetUrlCodingStrategy, but 
> could not find anything that is described to perform as above, so would 
> like to check in the mailing list if it has been done before.
> 
>     Thanks
> 
> Kent
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org