I have been trying to a do a redirect in my action like this:

        TemplateLink tl = new TemplateLink( data );
        tl.setPage(TurbineResources.getString("my_page"));      
        data.setRedirectURI( tl.getURI() );
        data.setStatusCode( 302 );

but this just returns me to me default page. I have debugged the following section of 
Turbine.java 

        if ( data.isPageSet() && data.isOutSet() == false )
                {
      
                    // Modules can override these.
                    data.getResponse()
                        .setLocale( data.getLocale() );
                    data.getResponse()
                        .setContentType( data.getContentType() );

                    // Handle the case where a module may want to send
                    // a redirect.
                    if ( ( data.getStatusCode() == 301 ||
                           data.getStatusCode() ==  302 ) &&
                         data.getRedirectURI() != null )
                    {
                        data.getResponse()
                            .sendRedirect ( data.getRedirectURI() );
                    }

                    // Set the status code.
                    data.getResponse().setStatus ( data.getStatusCode() );
                    // Output the Page.
                    data.getPage().output (data.getOut());
                }

And found that this is never entered in my code, because data.isPageSet() always 
returns FALSE and data.isOutSet() is always TRUE.

Any ideas guys?

Gareth

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to