On Wed, 04 May 2011 13:29:20 -0300, Tim Koop <t...@timkoop.com> wrote:

     @Inject
     private Response response;

     public void pageAttached() {
         try {
             response.sendRedirect("http://www.timkoop.com/";);
         } catch (IOException e) {
             System.out.println("redirection exception");
             e.printStackTrace();
         }
     }


You redirect in Tapestry through the return value of onActivate(). In case of external URLs, return a java.util.URL instance:

public Object onActivate() {
        return new java.net.URL("http://www.timkoop.com/";);
}

--
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