users@glassfish.java.net

Re: Rewriting URLs to change servlets?

From: Robin Sheat <robin_at_kallisti.net.nz>
Date: Tue, 7 Aug 2007 15:08:23 +1200

On Tuesday 07 August 2007 07:36:41 glassfish_at_javadesktop.org wrote:
> Yes, this is exactly what has happened. The container has already decided
> what to do before it invokes your filter. (That's why it knows to invoke
> your filter, in fact -- it's kind of a catch-22.)
Yeah, it does make sense.

> The hot tip to get around this is to FORWARD to your new URL, and then it
> will work as expected.
How do you forward to a new URL? I can't do a browser redirect or anything,
because that would lose the information I need. Is there an internal way to
forward requests? I guess it would be like passing it in to the dispatch
system again or something.

Cheers,
-- 
Robin <robin_at_kallisti.net.nz> JabberID: <eythian_at_jabber.kallisti.net.nz>
Hostes alienigeni me abduxerunt. Qui annus est?
PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D