That depends on how you are maintain session state.

The struts-example uses a User bean in the session.

Therefore putting <app:checkLogon/> in every jsp (except index) would run
this code....

org.apache.struts.webapp.example.CheckLogonTag.java
...
...
(line 176)
        HttpSession session = pageContext.getSession();
        if ((session != null) && (session.getAttribute(name) != null))
            valid = true;

        // Forward control based on the results
        if (valid)
            return (EVAL_PAGE);
        else {
            try {
                pageContext.forward(page);
            } catch (Exception e) {
                throw new JspException(e.toString());
            }
            return (SKIP_PAGE);
        }

....which checks to see if the user's session is still valid.
If its not, then the request if forwarded to the login page (which has a
hard-coded default value of "/logon.jsp").


I hope this helps.

JM



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Jefferson Rodrigues de Oliveira e Silva
> Sent: Monday, May 06, 2002 7:09 AM
> To: 'Struts Users Mailing List'
> Subject: changing menu option in JSP
>
>
> Hi guys,
>
> I have the following situation: when the user enters the site,
> there is a menu page (JSP) which displays some menu options.
> After logging, the login menu option is not displayed anymore, and
> a logoff option has to be displayed.
>
> What's the best way to do that ?
>
> Thanks in advance
> Jefferson
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to