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" <[email protected]> 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" <[email protected]>
wrote:
Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin
<[email protected]> 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:
[email protected]
For additional commands, e-mail:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[email protected]
For additional commands, e-mail:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]