On Fri, 17 Sep 2010 08:25:14 -0300, Duruk_Kab <durgesh.ka...@nuware.com> wrote:

Hi,

Hi!

I have migrated my application recently from Tapestry 5.0.18 to 5.1.0.5.
I was handling session in my application previously (5.0.18) as:

If (!visitExists) {
  sessionState.setSessionExpired(false);
  _reqestGlobals.getResponse().sendRedirect(pageName); // start page
}

I guess you were a Tapestry 4 user. :)

If you're in page or event handler method, the right way of doing a redirect is to return a java.net.URL instance. By the way, you can inject the Request and Response directly without usin RequestGlobals.

My requirement is if session fails, redirect it to start page where it will show the message. Please help me to resolve this issue.

This is better implemented in a RequestFilter. There you can use sendRedirect() without problems.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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

Reply via email to