You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sergey Kashin <ay...@ngs.ru> on 2009/12/24 12:14:10 UTC
Tapestry URL Rewriting Support and form submit
Hello.
I have create one simple rule for url rewriting.
as described in manual
http://tapestry.apache.org/tapestry5.1/guide/url-rewriting.html
All works fine except submit action. Tapestry redirect to
rewrite page except original
if submit action occurs.
Example:
rule: rewrite /test to /testRewrited
urls looks like /test until submit action occurs
after submit it looks /testRewrited
if I'am not define return page in
onSuccess() page method.
It seems like a bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry URL Rewriting Support and form submit
Posted by Sergey Kashin <ay...@ngs.ru>.
now all clear, thx
On Sat, 26 Dec 2009 16:18:23 -0200
"Thiago H. de Paula Figueiredo" <th...@gmail.com>
wrote:
> Em Thu, 24 Dec 2009 16:03:50 -0200, Sergey Kashin
><ay...@ngs.ru> escreveu:
>
>> if i click submit button in form (name frm in page)
>> rewrite works not correctly:
>> url looks like /rewrited_tst/testpage but i expect url
>>like
>> /test/testpage
>> all other processed correctly
>> /rewrited_tst/testpage and expect /rewrited_tst/testpage
>
> You have to rewrite inbound and outbound links.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate
>consultant, developer, and instructor
> Owner, software architect and developer, Ars Machina
>Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
>users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail:
>users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry URL Rewriting Support and form submit
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 24 Dec 2009 16:03:50 -0200, Sergey Kashin <ay...@ngs.ru> escreveu:
> if i click submit button in form (name frm in page)
> rewrite works not correctly:
> url looks like /rewrited_tst/testpage but i expect url like
> /test/testpage
> all other processed correctly
> /rewrited_tst/testpage and expect /rewrited_tst/testpage
You have to rewrite inbound and outbound links.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry URL Rewriting Support and form submit
Posted by Sergey Kashin <ay...@ngs.ru>.
upss.. not solved
i have two pages
/test/testpage
and
/rewrited_tst/testpage
if i browse
/test/testpage
rewrite works correctly:
url looks like /test/testpage
and processed
/rewrited_tst/testpage
if i click submit button in form (name frm in page)
rewrite works not correctly:
url looks like /rewrited_tst/testpage but i expect url
like /test/testpage
all other processed correctly
/rewrited_tst/testpage and expect /rewrited_tst/testpage
my rewrite rule:
URLRewriterRule rule2 = new URLRewriterRule()
{
public Request process(Request request,
URLRewriteContext context)
{
final String path = request.getPath();
if (path.equalsIgnoreCase("/test/testpage"))
{
request = new
SimpleRequestWrapper(request, "/rewrited_tst/testpage");
}
if
(path.equalsIgnoreCase("/test/testpage.frm"))
{
request = new
SimpleRequestWrapper(request,
"/rewrited_tst/testpage.frm");
}
return request;
}
public RewriteRuleApplicability applicability()
{
return RewriteRuleApplicability.INBOUND;
}
};
configuration.add("rule2", rule2);
On Thu, 24 Dec 2009 23:48:01 +0600
"Sergey Kashin" <ay...@ngs.ru> wrote:
> Thanks for fast reply.
>
> You're absolutely right!
> I'am not rewrite xxxx.form.
>
> Big thanks!
>
> On Thu, 24 Dec 2009 10:01:22 -0200
> "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> wrote:
>> Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin
>><ay...@ngs.ru> escreveu:
>>
>>> Hello.
>>
>> Hi!
>>
>>> All works fine except submit action. Tapestry redirect
>>>to rewrite page
>>> except original
>>> if submit action occurs.
>>> Example:
>>> rule: rewrite /test to /testRewrited
>>
>> Are you rewriting /test.form to /testRewrited.form, for
>>example? URL rewriting is trickier than it sounds. ;)
>>
>> Please post your rule implementation here so we can take
>>a look at it. :)
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate
>>consultant, developer, and instructor
>> Owner, software architect and developer, Ars Machina
>>Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>>users-unsubscribe@tapestry.apache.org
>>For additional commands, e-mail:
>>users-help@tapestry.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
>users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail:
>users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry URL Rewriting Support and form submit
Posted by Sergey Kashin <ay...@ngs.ru>.
Thanks for fast reply.
You're absolutely right!
I'am not rewrite xxxx.form.
Big thanks!
On Thu, 24 Dec 2009 10:01:22 -0200
"Thiago H. de Paula Figueiredo" <th...@gmail.com>
wrote:
> Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin
><ay...@ngs.ru> escreveu:
>
>> Hello.
>
> Hi!
>
>> All works fine except submit action. Tapestry redirect
>>to rewrite page
>> except original
>> if submit action occurs.
>> Example:
>> rule: rewrite /test to /testRewrited
>
> Are you rewriting /test.form to /testRewrited.form, for
>example? URL rewriting is trickier than it sounds. ;)
>
> Please post your rule implementation here so we can take
>a look at it. :)
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate
>consultant, developer, and instructor
> Owner, software architect and developer, Ars Machina
>Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
>users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail:
>users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry URL Rewriting Support and form submit
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin <ay...@ngs.ru> escreveu:
> Hello.
Hi!
> All works fine except submit action. Tapestry redirect to rewrite page
> except original
> if submit action occurs.
> Example:
> rule: rewrite /test to /testRewrited
Are you rewriting /test.form to /testRewrited.form, for example? URL
rewriting is trickier than it sounds. ;)
Please post your rule implementation here so we can take a look at it. :)
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org