Santiago Gala wrote:
> 
> Raphaël Luta escribió:
> >
> >
> > BTW, the example code breaks the URL session handling that may be
> > configured on the servlet container.
> >
> > The code should be:
> >
> > response.sendRedirect(response.encodeRedirectURL(<whateverURL>));
> >
> 
> Just a small thing: we should use the rundata methods for doing that.
> There may be code inside turbine (I'm quite sure there IS) handling
> redirects, so we should handle it through it.
> 
> I think it is
> 
> data.declareRedirectResponse();
> data.setStatusCode( 3XX ... );
> data.setRedirectURI( url );
> data.getResponse().sendRedirect( ... );
> 

If you want to do it with Turbine methods, either you do:

data.declareRedirectResponse();
data.getResponse().sendRedirect(<myURI>);

the first line is only useful if you use an ECS Document as output 
( through data.getPage() ) so it's basically a call to the standard
servlet API method.

or

data.setStatusCode( 301 or 302 );
data.setRedirectURI(<myURI>);

and let org.apache.turbine.Turbine handle sending the redirect.

--
Raphaël Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Services Manager / Paris


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?:          [EMAIL PROTECTED]

Reply via email to