You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by János Jarecsni <ja...@gmail.com> on 2008/04/15 10:10:04 UTC

forwarding to Tapestry page

Hi,

I cannot forward to a Tapestry page from a javax.servlet.Filter with

request.getRequestDispatcher("/Start").forward(request, response);

however,

request.getRequestDispatcher("/test.jsp").forward(request, response);

works fine.

This is baaadly needed for what I'd like to do. Any help is welcome!

Thanks,
Have a fine day

Janos

Re: forwarding to Tapestry page

Posted by János Jarecsni <ja...@gmail.com>.
Hi Juhan!

A BIG BIG thanks! This in deed works (the tag is only available from 2.4
servlet spec.).
You made my day! :)

Cheers,
Janos


On 15/04/2008, Juhan Kundla <ju...@juku.obfuscated.net> wrote:
>
> János Jarecsni kirjutas:
>
> > some news. I tried this with T4.1.5, where the Tapestry frontend is
> > implemented as a servlet, and it WORKS THERE. So, it is now obvious,
> that
> > the forward does not work, because with T5 Tapestry frontend is a
> filter.
> >
> > My questions:
> >
> > 1) why it is a filter?
> > 2) how this situation could be worked around?
>
>
> You have to configure the Servlet container to add the Tapestry filter
> to the forward chain. Add <dispatcher>FORWARD</dispatcher> to the
> Tapestry's filter mapping in the web.xml.
>
>
> -- Juhan
>
> s/obfuscated/kicks-ass/ in e-mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: forwarding to Tapestry page

Posted by Howard Lewis Ship <hl...@gmail.com>.
Very cool!  I was going to suggest sending a client-side redirect
rather than performing a server-side forward.

On Tue, Apr 15, 2008 at 5:54 AM, Juhan Kundla <ju...@juku.obfuscated.net> wrote:
> János Jarecsni kirjutas:
>
> > some news. I tried this with T4.1.5, where the Tapestry frontend is
>  > implemented as a servlet, and it WORKS THERE. So, it is now obvious, that
>  > the forward does not work, because with T5 Tapestry frontend is a filter.
>  >
>  > My questions:
>  >
>  > 1) why it is a filter?
>  > 2) how this situation could be worked around?
>
>  You have to configure the Servlet container to add the Tapestry filter
>  to the forward chain. Add <dispatcher>FORWARD</dispatcher> to the
>  Tapestry's filter mapping in the web.xml.
>
>
>  -- Juhan
>
>  s/obfuscated/kicks-ass/ in e-mail
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: forwarding to Tapestry page

Posted by Juhan Kundla <ju...@juku.obfuscated.net>.
János Jarecsni kirjutas:
> some news. I tried this with T4.1.5, where the Tapestry frontend is
> implemented as a servlet, and it WORKS THERE. So, it is now obvious, that
> the forward does not work, because with T5 Tapestry frontend is a filter.
> 
> My questions:
> 
> 1) why it is a filter?
> 2) how this situation could be worked around?

You have to configure the Servlet container to add the Tapestry filter
to the forward chain. Add <dispatcher>FORWARD</dispatcher> to the
Tapestry's filter mapping in the web.xml.


-- Juhan

s/obfuscated/kicks-ass/ in e-mail

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


Re: forwarding to Tapestry page

Posted by János Jarecsni <ja...@gmail.com>.
Hi All,

some news. I tried this with T4.1.5, where the Tapestry frontend is
implemented as a servlet, and it WORKS THERE. So, it is now obvious, that
the forward does not work, because with T5 Tapestry frontend is a filter.

My questions:

1) why it is a filter?
2) how this situation could be worked around?

Thanks!
Janos

On 15/04/2008, János Jarecsni <ja...@gmail.com> wrote:
>
> I tested the same thing with a servlet as well, and it does not work. I
> can't imagine what can be a problem :(
>
> thanks in advance,
> janos
>
> On 15/04/2008, János Jarecsni <ja...@gmail.com> wrote:
> >
> > Hi,
> >
> > I cannot forward to a Tapestry page from a javax.servlet.Filter with
> >
> > request.getRequestDispatcher("/Start").forward(request, response);
> >
> > however,
> >
> > request.getRequestDispatcher("/test.jsp").forward(request, response);
> >
> > works fine.
> >
> > This is baaadly needed for what I'd like to do. Any help is welcome!
> >
> > Thanks,
> > Have a fine day
> >
> > Janos
> >
>
>

Re: forwarding to Tapestry page

Posted by János Jarecsni <ja...@gmail.com>.
I tested the same thing with a servlet as well, and it does not work. I
can't imagine what can be a problem :(

thanks in advance,
janos

On 15/04/2008, János Jarecsni <ja...@gmail.com> wrote:
>
> Hi,
>
> I cannot forward to a Tapestry page from a javax.servlet.Filter with
>
> request.getRequestDispatcher("/Start").forward(request, response);
>
> however,
>
> request.getRequestDispatcher("/test.jsp").forward(request, response);
>
> works fine.
>
> This is baaadly needed for what I'd like to do. Any help is welcome!
>
> Thanks,
> Have a fine day
>
> Janos
>