tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Jelger <docsbao...@gmail.com>
Subject Problem with ComponentEventLinkEncoder and PageRenderLinkTransformer
Date Wed, 04 Mar 2015 15:29:21 GMT
[I'm very sorry, I wrongly pressed CTRL-N while typing my previous email
and it was sent my mistake]


I am using Tapestry 5.3.8 and have a weird problem: I am decorating
ComponentEventLinkEncoder because I need to remove and add a country-code
prefix from/to my urls. It's pretty much the same than was is being done

This works fine, until the request is dispatched to my
PageRenderLinkTransformer  where I do my url rewriting and encoding.

Basically in my decorator class for ComponentEventLinkEncoder, I use a
DelegatingRequest object to override the getPath() method and return the
new path. As I said, this works fine.

However, when the request is passed to my PageRenderLinkTransformer class,
I sometimes get the DelegatingRequest object via the Request parameter in
decodePageRenderRequest(Request request), or sometimes the RequestImpl
standard implementation. This is like that with the built-in
jetty-mavem-plugin (sometimes it works, sometimes it doesn't work), but
with Tomcat I never get the DelegatingRequest class but always the
RequestImpl class.

I of course triple-checked that my ComponentEventLinkEncoder class is
always properly called and that the DelegatingRequest object is
instantiated when I call delegate.decodePageRenderRequest(Request request).
Of course if I'm not wrong, the delegate class is then
ComponentEventLinkEncoderImpl, but I thought that the overriden Request
would be also passed to the PageRenderLinkTransformer class --> this seems
to be the case sometimes with Jetty, but never with Tomcat.

What am I doing wrong? Or is there a better way to remove/add a url prefix?

Thanks in advance, and sorry once again for the previous cut-off email

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message