You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jefferson Rodrigues de Oliveira e Silva <je...@edb.ericsson.se> on 2002/05/06 13:08:37 UTC
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: struts 1.1 already in use?
Posted by Emerson Cargnin - MSA <em...@sicredi.com.br>.
what kind of issues, bugs???
With dynabeans, u don't have to create a form for each jsp, right?
----- Original Message -----
From: "Frederico Schuh" <fr...@yahoo.com.br>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, May 06, 2002 5:11 PM
Subject: Re: struts 1.1 already in use?
> I don't know if everybody is using it, but it's
> definetly worth checking the new features out... vale
> a pena mesmo :)
>
> I personally like the DispatchAction and find myself
> using it more often than the normal Action.
> There are some issues with the DynaBeans, if you are
> going to use it, but you can always fix them when
> needed, LOL.
>
> --- Emerson Cargnin - MSA <em...@sicredi.com.br>
> escreveu: > Are everybody using already the 1.1
> version, with
> > DispatchAction and
> > DynaForms???
> >
> > I was using 1.0.2, but it looks that 1.1 has a lot
> > of enhancements.
> >
> > Emerson Cargnin - MSA
> > Ramal 861
> > ----- Original Message -----
> > From: "Eddie Bush" <ek...@swbell.net>
> > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > Sent: Monday, May 06, 2002 2:40 PM
> > Subject: Re: changing menu option in JSP
> >
> >
> > > Correction - I copied and pasted and did not
> > modify my pasted section
> > My
> > > appologies. It should read as:
> > >
> > > <logic:present name='loggedInUser'>
> > > <%-- This will be evaluated if the bean IS
> > there --%>
> > > </logic:present>
> > >
> > > <logic:notPresent name='loggedInUser'>
> > > <%-- This will be evaluated if the bean IS NOT
> > there --%>
> > > </logic:present>
> > >
> > > ... now it should actually do what you want =)
> > >
> > > ----- Original Message -----
> > > From: "Eddie Bush" <ek...@swbell.net>
> > > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > > Sent: Monday, May 06, 2002 12:34 PM
> > > Subject: Re: changing menu option in JSP
> > >
> > >
> > > > Assuming you put some bean in session scope that
> > identifies a logged-in
> > > > user:
> > > >
> > > > <logic:present name='loggedInUser'>
> > > > <%-- This will be evaluated if the bean IS
> > there --%>
> > > > </logic:present>
> > > >
> > > > <logic:present name='loggedInUser'>
> > > > <%-- This will be evaluated if the bean IS
> > NOT there --%>
> > > > </logic:present>
> > > >
> > > > HTH,
> > > >
> > > > Eddie
> > > >
> > > > ----- Original Message -----
> > > > From: "Jefferson Rodrigues de Oliveira e Silva"
> > > > <je...@edb.ericsson.se>
> > > > To: "'Struts Users Mailing List'"
> > <st...@jakarta.apache.org>
> > > > Sent: Monday, May 06, 2002 6:08 AM
> > > > 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:
> > > >
> > <ma...@jakarta.apache.org>
> > > > > For additional commands, e-mail:
> > > > <ma...@jakarta.apache.org>
> > > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
> =====
> ----------------------------------------
> Frederico Ferro Schuh
> fred_schuh@yahoo.com.br
> ICQ: 20486081
>
> _______________________________________________________________________
> Yahoo! Encontros
> O lugar certo para você encontrar aquela pessoa que falta na sua vida.
Cadastre-se hoje mesmo!
> http://br.encontros.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: struts 1.1 already in use?
Posted by Emerson Cargnin - MSA <em...@sicredi.com.br>.
dai cara
seguinte , qdo usa dispatchAction, ele vai chamar o perform antes de delegar
para o método específico?
----- Original Message -----
From: "Frederico Schuh" <fr...@yahoo.com.br>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, May 06, 2002 5:11 PM
Subject: Re: struts 1.1 already in use?
> I don't know if everybody is using it, but it's
> definetly worth checking the new features out... vale
> a pena mesmo :)
>
> I personally like the DispatchAction and find myself
> using it more often than the normal Action.
> There are some issues with the DynaBeans, if you are
> going to use it, but you can always fix them when
> needed, LOL.
>
> --- Emerson Cargnin - MSA <em...@sicredi.com.br>
> escreveu: > Are everybody using already the 1.1
> version, with
> > DispatchAction and
> > DynaForms???
> >
> > I was using 1.0.2, but it looks that 1.1 has a lot
> > of enhancements.
> >
> > Emerson Cargnin - MSA
> > Ramal 861
> > ----- Original Message -----
> > From: "Eddie Bush" <ek...@swbell.net>
> > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > Sent: Monday, May 06, 2002 2:40 PM
> > Subject: Re: changing menu option in JSP
> >
> >
> > > Correction - I copied and pasted and did not
> > modify my pasted section
> > My
> > > appologies. It should read as:
> > >
> > > <logic:present name='loggedInUser'>
> > > <%-- This will be evaluated if the bean IS
> > there --%>
> > > </logic:present>
> > >
> > > <logic:notPresent name='loggedInUser'>
> > > <%-- This will be evaluated if the bean IS NOT
> > there --%>
> > > </logic:present>
> > >
> > > ... now it should actually do what you want =)
> > >
> > > ----- Original Message -----
> > > From: "Eddie Bush" <ek...@swbell.net>
> > > To: "Struts Users Mailing List"
> > <st...@jakarta.apache.org>
> > > Sent: Monday, May 06, 2002 12:34 PM
> > > Subject: Re: changing menu option in JSP
> > >
> > >
> > > > Assuming you put some bean in session scope that
> > identifies a logged-in
> > > > user:
> > > >
> > > > <logic:present name='loggedInUser'>
> > > > <%-- This will be evaluated if the bean IS
> > there --%>
> > > > </logic:present>
> > > >
> > > > <logic:present name='loggedInUser'>
> > > > <%-- This will be evaluated if the bean IS
> > NOT there --%>
> > > > </logic:present>
> > > >
> > > > HTH,
> > > >
> > > > Eddie
> > > >
> > > > ----- Original Message -----
> > > > From: "Jefferson Rodrigues de Oliveira e Silva"
> > > > <je...@edb.ericsson.se>
> > > > To: "'Struts Users Mailing List'"
> > <st...@jakarta.apache.org>
> > > > Sent: Monday, May 06, 2002 6:08 AM
> > > > 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:
> > > >
> > <ma...@jakarta.apache.org>
> > > > > For additional commands, e-mail:
> > > > <ma...@jakarta.apache.org>
> > > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
> =====
> ----------------------------------------
> Frederico Ferro Schuh
> fred_schuh@yahoo.com.br
> ICQ: 20486081
>
> _______________________________________________________________________
> Yahoo! Encontros
> O lugar certo para você encontrar aquela pessoa que falta na sua vida.
Cadastre-se hoje mesmo!
> http://br.encontros.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: struts 1.1 already in use?
Posted by Frederico Schuh <fr...@yahoo.com.br>.
I don't know if everybody is using it, but it's
definetly worth checking the new features out... vale
a pena mesmo :)
I personally like the DispatchAction and find myself
using it more often than the normal Action.
There are some issues with the DynaBeans, if you are
going to use it, but you can always fix them when
needed, LOL.
--- Emerson Cargnin - MSA <em...@sicredi.com.br>
escreveu: > Are everybody using already the 1.1
version, with
> DispatchAction and
> DynaForms???
>
> I was using 1.0.2, but it looks that 1.1 has a lot
> of enhancements.
>
> Emerson Cargnin - MSA
> Ramal 861
> ----- Original Message -----
> From: "Eddie Bush" <ek...@swbell.net>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> Sent: Monday, May 06, 2002 2:40 PM
> Subject: Re: changing menu option in JSP
>
>
> > Correction - I copied and pasted and did not
> modify my pasted section
> My
> > appologies. It should read as:
> >
> > <logic:present name='loggedInUser'>
> > <%-- This will be evaluated if the bean IS
> there --%>
> > </logic:present>
> >
> > <logic:notPresent name='loggedInUser'>
> > <%-- This will be evaluated if the bean IS NOT
> there --%>
> > </logic:present>
> >
> > ... now it should actually do what you want =)
> >
> > ----- Original Message -----
> > From: "Eddie Bush" <ek...@swbell.net>
> > To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> > Sent: Monday, May 06, 2002 12:34 PM
> > Subject: Re: changing menu option in JSP
> >
> >
> > > Assuming you put some bean in session scope that
> identifies a logged-in
> > > user:
> > >
> > > <logic:present name='loggedInUser'>
> > > <%-- This will be evaluated if the bean IS
> there --%>
> > > </logic:present>
> > >
> > > <logic:present name='loggedInUser'>
> > > <%-- This will be evaluated if the bean IS
> NOT there --%>
> > > </logic:present>
> > >
> > > HTH,
> > >
> > > Eddie
> > >
> > > ----- Original Message -----
> > > From: "Jefferson Rodrigues de Oliveira e Silva"
> > > <je...@edb.ericsson.se>
> > > To: "'Struts Users Mailing List'"
> <st...@jakarta.apache.org>
> > > Sent: Monday, May 06, 2002 6:08 AM
> > > 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:
> > >
> <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
=====
----------------------------------------
Frederico Ferro Schuh
fred_schuh@yahoo.com.br
ICQ: 20486081
_______________________________________________________________________
Yahoo! Encontros
O lugar certo para você encontrar aquela pessoa que falta na sua vida. Cadastre-se hoje mesmo!
http://br.encontros.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
struts 1.1 already in use?
Posted by Emerson Cargnin - MSA <em...@sicredi.com.br>.
Are everybody using already the 1.1 version, with DispatchAction and
DynaForms???
I was using 1.0.2, but it looks that 1.1 has a lot of enhancements.
Emerson Cargnin - MSA
Ramal 861
----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, May 06, 2002 2:40 PM
Subject: Re: changing menu option in JSP
> Correction - I copied and pasted and did not modify my pasted section
My
> appologies. It should read as:
>
> <logic:present name='loggedInUser'>
> <%-- This will be evaluated if the bean IS there --%>
> </logic:present>
>
> <logic:notPresent name='loggedInUser'>
> <%-- This will be evaluated if the bean IS NOT there --%>
> </logic:present>
>
> ... now it should actually do what you want =)
>
> ----- Original Message -----
> From: "Eddie Bush" <ek...@swbell.net>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, May 06, 2002 12:34 PM
> Subject: Re: changing menu option in JSP
>
>
> > Assuming you put some bean in session scope that identifies a logged-in
> > user:
> >
> > <logic:present name='loggedInUser'>
> > <%-- This will be evaluated if the bean IS there --%>
> > </logic:present>
> >
> > <logic:present name='loggedInUser'>
> > <%-- This will be evaluated if the bean IS NOT there --%>
> > </logic:present>
> >
> > HTH,
> >
> > Eddie
> >
> > ----- Original Message -----
> > From: "Jefferson Rodrigues de Oliveira e Silva"
> > <je...@edb.ericsson.se>
> > To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
> > Sent: Monday, May 06, 2002 6:08 AM
> > 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:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: changing menu option in JSP
Posted by Eddie Bush <ek...@swbell.net>.
Correction - I copied and pasted and did not modify my pasted section =( My
appologies. It should read as:
<logic:present name='loggedInUser'>
<%-- This will be evaluated if the bean IS there --%>
</logic:present>
<logic:notPresent name='loggedInUser'>
<%-- This will be evaluated if the bean IS NOT there --%>
</logic:present>
... now it should actually do what you want =)
----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, May 06, 2002 12:34 PM
Subject: Re: changing menu option in JSP
> Assuming you put some bean in session scope that identifies a logged-in
> user:
>
> <logic:present name='loggedInUser'>
> <%-- This will be evaluated if the bean IS there --%>
> </logic:present>
>
> <logic:present name='loggedInUser'>
> <%-- This will be evaluated if the bean IS NOT there --%>
> </logic:present>
>
> HTH,
>
> Eddie
>
> ----- Original Message -----
> From: "Jefferson Rodrigues de Oliveira e Silva"
> <je...@edb.ericsson.se>
> To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
> Sent: Monday, May 06, 2002 6:08 AM
> 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:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: changing menu option in JSP
Posted by Eddie Bush <ek...@swbell.net>.
Assuming you put some bean in session scope that identifies a logged-in
user:
<logic:present name='loggedInUser'>
<%-- This will be evaluated if the bean IS there --%>
</logic:present>
<logic:present name='loggedInUser'>
<%-- This will be evaluated if the bean IS NOT there --%>
</logic:present>
HTH,
Eddie
----- Original Message -----
From: "Jefferson Rodrigues de Oliveira e Silva"
<je...@edb.ericsson.se>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, May 06, 2002 6:08 AM
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:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: changing menu option in JSP
Posted by Eddie Bush <ek...@swbell.net>.
Take a tour of the taglibs provided by Struts. Look at the JavaDocs ...
look over the example application.
... it really is worth the time.
Regards,
Eddie
----- Original Message -----
From: "Jefferson Rodrigues de Oliveira e Silva"
<je...@edb.ericsson.se>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, May 06, 2002 6:08 AM
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:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: changing menu option in JSP
Posted by James Mitchell <jm...@telocity.com>.
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: edbjros@mr7att.ericy.com [mailto:edbjros@mr7att.ericy.com]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:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>