You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Wang <er...@cls.uob.com.sg> on 2001/02/26 08:38:08 UTC

forwarding to different web pages

I am new to Struts and pardon me if this question had been answered previously.

Currently I am working on a login module. How can I forward the user to
different pages after they had successful login.
for example, system administrator route to one page. Normal user route to
another page. Error route to another page.

Thanks in advance.
Eric


form base authentication

Posted by Eric Wang <er...@cls.uob.com.sg>.
Hi,

I am trying to do a form base authentication using Weblogic 6.0 and Struts.

However, I got the following error.

<Feb 27, 2001 11:22:54 AM GMT+08:00> <Error> <HTTP> <[WebAppServletContext(82670
96,consumer)] exception raised on '/consumer/login.jsp'
javax.servlet.ServletException: runtime failure in custom tag 'form'
        at jsp_servlet._login._jspService(_login.java:241)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:208)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:244)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:1127)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1529)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Has anyone done that before? Or is there any articles that talks about it?

Thanks
Eric


Re: forwarding to different web pages

Posted by Anand Raman <an...@mymailbag.com>.
define seperate action mappings and depending on the login forward the
guy to the appropriate mapping..

if(user.isSysAdmin()) 
	return mapping.findForward("sysadmin");
else if(user.isAdmin())
	return mapping.findForward("admin");

Hope this helps
Anand Raman

On Mon, Feb 26, 2001 at 03:38:08PM +0800, Eric Wang wrote:
>I am new to Struts and pardon me if this question had been answered previously.
>
>Currently I am working on a login module. How can I forward the user to
>different pages after they had successful login.
>for example, system administrator route to one page. Normal user route to
>another page. Error route to another page.
>
>Thanks in advance.
>Eric