You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Haselbach <ch...@tngtech.com> on 2007/05/08 11:08:29 UTC

[T-4.0] LinkFactoryImpl caches context path

Hi,

LinkFactoryImpl seems to cache the context path from the first request.
This causes EngineServiceLink to have the context path of the first
request and not of the current request.

Is there an easy way to have the current context path in
EngineServiceLink?

I know it is a bit unusual to have different context paths for different
requests.

Regards,
Christian

-- 
Christian Haselbach - christian.haselbach@tngtech.com - +49 176 2082 5804
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel
Amtsgericht München, HRB 135082

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


Re: [T-4.0] LinkFactoryImpl caches context path

Posted by Christian Haselbach <ch...@tngtech.com>.
On Tue, May 08, 2007 at 11:24:33AM +0200, Christian Haselbach wrote:
> Oh, got that wrong. Tapestry uses the servlet path, not the context
> path, to create the url.

On a closer look, I had it right the first time. The context path is
cached and used.

I guess I have to use a custom LinkFactory implementation.

How do I override the used LinkFactory implementation in the
hivemind configuration?

Regards,
Christian

-- 
Christian Haselbach - christian.haselbach@tngtech.com - +49 176 2082 5804
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel
Amtsgericht München, HRB 135082

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


Re: [T-4.0] LinkFactoryImpl caches context path

Posted by Christian Haselbach <ch...@tngtech.com>.
On Tue, May 08, 2007 at 11:08:29AM +0200, Christian Haselbach wrote:
> LinkFactoryImpl seems to cache the context path from the first request.
> This causes EngineServiceLink to have the context path of the first
> request and not of the current request.
> 
> Is there an easy way to have the current context path in
> EngineServiceLink?

Oh, got that wrong. Tapestry uses the servlet path, not the context
path, to create the url.

However, regardless of that I need a mechanism to construct different
urls for different requests. The request object is manipulated to
reflect the true origin it comes from. Hence, the context path (or the
servlet path) is set accordingly.

But this does not work, because tapestry caches the servlet path, which
is then used to create the url.

Any ideas how to let Tapestry create the urls depending on the current
context path?

Thanks.

Regards,
Christian
-- 
Christian Haselbach - christian.haselbach@tngtech.com - +49 176 2082 5804
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel
Amtsgericht München, HRB 135082

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