Hi,

I have seen a how-to on tapestry's wiki that describes how to implement a 
RedirectException which, when thrown from any part of your code, will perform a 
redirect (similar to the RedirectException that used to exist in Tapestry 4):

http://wiki.apache.org/tapestry/Tapestry5RedirectException

I have never really tried this, but could fulfill your needs.

Cheers,
Vassilis


On Feb 24, 2010, at 21:11 , Algirdas wrote:

> 
> Hello,
> 
> Is there any way to do a redirect from any method?
> 
> For example I have EnsureUserLoggedIn() which should redirect to Login page,
> but this is called not in onActivate() method.
> 
> I used response.sendRedirect(link), but since upgrage to 5.1.0.5 it throws
> NPE
> 
> 
> 
> org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl.isCompressable(ResponseCompressionAnalyzerImpl.java:65)
> 
> $ResponseCompressionAnalyzer_126fd51477a.isCompressable($ResponseCompressionAnalyzer_126fd51477a.java)
> 
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.openResponseOutputStream(BufferedGZipOutputStream.java:77)
> 
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.checkForCutover(BufferedGZipOutputStream.java:70)
> 
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.write(BufferedGZipOutputStream.java:116)
> 
> Algirdas
> -- 
> View this message in context: 
> http://n2.nabble.com/Redirect-not-from-onActivate-tp4627871p4627871.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org


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

Reply via email to