You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by manish <ma...@npi.stpn.soft.net> on 2002/05/29 06:19:10 UTC
How to redirect Using Redirector....?
Hello,
I am trying to redirect the user to some url in "act" function, it
execute the related xsp page, but don't display any thing on browser.
your help will be highly appriciatable
Thanks and regards,
Manish Jain
The code is like...
if
(((String)request.getAttribute("PermissionDenied")).equals("true"))
{
request.setAttribute("PermissionDenied","false");
redirector.redirect(false,"showerror");
}
catch(IOException io)
{
System.out.println("can not do rediect"+io);
}
return ;
}
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: How to redirect Using Redirector....?
Posted by Nicola Ken Barozzi <ni...@apache.org>.
I would suggest you don't redirect in the Action.
Make the Action return null, and what is in the Act tag will be skipped.
<map:act type="check-auth">
<map:generate type="serverpages" src="hello.xsp"/>
<map:serialize type="html"/>
<!-- after serialize the processing stops, like in "return" in
java -->
</map:act>
<map:generate src="showerror.html"/>
<map:serialize type="html"/>
----- Original Message -----
From: "manish" <ma...@npi.stpn.soft.net>
To: <co...@xml.apache.org>
Sent: Wednesday, May 29, 2002 6:19 AM
Subject: How to redirect Using Redirector....?
> Hello,
> I am trying to redirect the user to some url in "act" function, it
> execute the related xsp page, but don't display any thing on browser.
> your help will be highly appriciatable
>
> Thanks and regards,
> Manish Jain
>
> The code is like...
>
> if
> (((String)request.getAttribute("PermissionDenied")).equals("true"))
> {
> request.setAttribute("PermissionDenied","false");
>
>
> redirector.redirect(false,"showerror");
> }
> catch(IOException io)
> {
> System.out.println("can not do rediect"+io);
> }
> return ;
> }
>
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>