You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Karol Borkowski <kb...@homplex.pl> on 2011/03/28 12:17:57 UTC
Handling dynamic urls in Click
Hi,
Is it possible to handle dynamic URLs in Click? I would like to handle
urls like below by one Page class :
[number]_[string]_[string]_[string](...).htm
for example :
12312_attr1_attr2_attr3_attr4.htm
99123_attr1_attr2.htm
As I inspected XmlServiceConfig.class I don't think thats currently
possible, but maybe I'm wrong ? Is is possible to enter regular
expressions for page path attributes in click config file (after comma
for example, so first name in list wille be default, returned by
getContext().getPagePath() method) ?
Apart from this problem, thank you very much for great work with Click.
We've been using it for about 9 months now and we love it!
Greetings,
Karol Borkowski
Re: Handling dynamic urls in Click
Posted by Karol Borkowski <kb...@homplex.pl>.
Exactly that's what I needed, thanks a lot.
Regards
Karol
W dniu 2011-03-28 12:51, Bob Schellink pisze:
> Hi Karol,
>
> Click itself doesn't provide dynamic URLs, however Click URLS are predictable so you can use a URL
> Rewrite Filter[1] to map URLs to different paths.
>
> You can also plug in your own ConfigService implementation but that would be quite a bit of work I'd
> imagine.
>
> Hope this helps.
>
> regards
>
> Bob
>
> [1]: http://www.tuckey.org/urlrewrite/
>
>
> On 2011/03/28 12:17 PM, Karol Borkowski wrote:
>> Hi,
>> Is it possible to handle dynamic URLs in Click? I would like to handle urls like below by one Page
>> class :
>> [number]_[string]_[string]_[string](...).htm
>> for example :
>> 12312_attr1_attr2_attr3_attr4.htm
>> 99123_attr1_attr2.htm
>>
>> As I inspected XmlServiceConfig.class I don't think thats currently possible, but maybe I'm wrong ?
>> Is is possible to enter regular expressions for page path attributes in click config file (after
>> comma for example, so first name in list wille be default, returned by getContext().getPagePath()
>> method) ?
>>
>>
>> Apart from this problem, thank you very much for great work with Click. We've been using it for
>> about 9 months now and we love it!
>> Greetings,
>> Karol Borkowski
>>
Re: Handling dynamic urls in Click
Posted by Bob Schellink <sa...@gmail.com>.
Hi Karol,
Click itself doesn't provide dynamic URLs, however Click URLS are predictable so you can use a URL
Rewrite Filter[1] to map URLs to different paths.
You can also plug in your own ConfigService implementation but that would be quite a bit of work I'd
imagine.
Hope this helps.
regards
Bob
[1]: http://www.tuckey.org/urlrewrite/
On 2011/03/28 12:17 PM, Karol Borkowski wrote:
> Hi,
> Is it possible to handle dynamic URLs in Click? I would like to handle urls like below by one Page
> class :
> [number]_[string]_[string]_[string](...).htm
> for example :
> 12312_attr1_attr2_attr3_attr4.htm
> 99123_attr1_attr2.htm
>
> As I inspected XmlServiceConfig.class I don't think thats currently possible, but maybe I'm wrong ?
> Is is possible to enter regular expressions for page path attributes in click config file (after
> comma for example, so first name in list wille be default, returned by getContext().getPagePath()
> method) ?
>
>
> Apart from this problem, thank you very much for great work with Click. We've been using it for
> about 9 months now and we love it!
> Greetings,
> Karol Borkowski
>