[jboss-user] [JBoss Portal] - PortletFilter: how to redirect in a Error Portlet
Raffaele Shmith
do-not-reply at jboss.com
Fri Mar 19 11:39:59 EDT 2010
Raffaele Shmith [http://community.jboss.org/people/marcelloBoss] created the discussion
"PortletFilter: how to redirect in a Error Portlet"
To view the discussion, visit: http://community.jboss.org/message/533042#533042
--------------------------------------------------------------
Hello,
I'm using PortletFilter to incercept some PortletRequests and verify authorization. If the user isn't authorized i want redirect to an Errore (public) Portlet.
my code now is this:
public class AuthFilter implements RenderFilter, ActionFilter {
private FilterConfig filterConfig = null;
public void init(FilterConfig filterConfig) throws PortletException {
this.filterConfig = filterConfig;
}
public void doFilter(RenderRequest req, RenderResponse resp, FilterChain filterChain) throws IOException, PortletException {
if (filterConfig == null)
return;
boolean auth=AuthManager.auth(req, resp); //check if the user is authotized
if(!auth) {
??? //redirect to another portlet
}
filterChain.doFilter(req, resp);
}
I hope that you can help me
Thanks
RM
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533042#533042]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2011]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100319/dd6a8bad/attachment.html
More information about the jboss-user
mailing list