> I tried to use following code:
>
>    public Request process(Request request, URLRewriteContext context) {
>            return new SimpleRequestWrapper(request, request.getPath());
>    }
>
> When I use this code then context of component event is even lost. I didn't
> find way how to create SimpleRequestWrapper with component even context.

This is surprising. I hate to ask, but are you really sure this is the
code that is running? What you have here should be the equivalent to
doing nothing. What version of tapestry are you using?


Josh

On Sat, Jan 30, 2010 at 2:56 PM, Jan Jirout <jir...@coroptis.com> wrote:
> Hi,
>
> thanks for answer.
>
> In my real application I change just pieces of path but it didn't work.
>
> I tried to use following code:
>
>    public Request process(Request request, URLRewriteContext context) {
>            return new SimpleRequestWrapper(request, request.getPath());
>    }
>
> When I use this code then context of component event is even lost. I didn't
> find way how to create SimpleRequestWrapper with component even context.
>
> Just in case when I call "return request;" from "process" method is
> component event context correctly passed.
>
> If you would like to see example application I can send it to conference.
>
> regards
>
> Jan
>
>
> Thiago H. de Paula Figueiredo wrote:
>>
>> On Sat, 30 Jan 2010 19:58:34 -0200, Jan Jirout <jir...@coroptis.com>
>> wrote:
>>
>>> Hi All,
>>
>> Hi!
>>
>>> I have strange problem with URL rewriting. I'm changing path name in
>>> URLRewriterRule. In following way:
>>>
>>>      public Request process(Request request, URLRewriteContext context) {
>>>              return new SimpleRequestWrapper(request, "somePath");
>>>      }
>>
>> The above rule rewrites *all* URLs to "somePath", losing any context or
>> query parameters. You should use string manipulation to extract the original
>> page name and then replace it with the new page name.
>>
>> If a request to "/original/1 arrives", your should rewrite it to "/new/1".
>> You can use path.replace("/original/", "/new/") to do that, for example.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to