You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "VEDRE, RANAPRATAP REDDY" <VE...@engr.sc.edu> on 2002/01/15 16:47:34 UTC
Help using Struts Logic tags.
What is the best way to write the following scriptlet code using Logic Tags.
I tried to do it with present and notEmpty but couldn't get it to work.
<% if(session.getAttribute("KEY") != null){ %>
if(session.getAttribute("KEY").equals("True"))
{
// Some HTML goes here.
}
<% } %>
-Thanks
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Help using Struts Logic tags.
Posted by Keith Bacon <ke...@yahoo.com>.
<logic:equal name="KEY" scope="session" value="True" >
</logic:equal>
not tested - done my best......watch the capitalisation!
K.
--- Andrew B Forman <an...@wcom.com> wrote:
> I've been using the session taglib
> http://jakarta.apache.org/taglibs/doc/session-doc/intro.html
>
> which would end up looking something like...
>
> <session:existsAttribute name="KEY" value="true">
> <session:equalsAttribute name="KEY" match"True" value="true">
> // Some HTML goes here.
> </session:equalsAttribute>
> </session:existsAttribute>
>
> _\|/_______________________________
> generation-d development
> andrew b forman
>
> > -----Original Message-----
> > From: VEDRE, RANAPRATAP REDDY [mailto:VEDRE@engr.sc.edu]
> > Sent: Tuesday, January 15, 2002 9:48 AM
> > To: 'struts-user@jakarta.apache.org'
> > Subject: Help using Struts Logic tags.
> >
> >
> > What is the best way to write the following scriptlet code using
> > Logic Tags.
> >
> > I tried to do it with present and notEmpty but couldn't get it to work.
> >
> > <% if(session.getAttribute("KEY") != null){ %>
> >
> > if(session.getAttribute("KEY").equals("True"))
> > {
> > // Some HTML goes here.
> > }
> >
> > <% } %>
> >
> > -Thanks
> >
> > --
> > 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>
>
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Help using Struts Logic tags.
Posted by Andrew B Forman <an...@wcom.com>.
I've been using the session taglib
http://jakarta.apache.org/taglibs/doc/session-doc/intro.html
which would end up looking something like...
<session:existsAttribute name="KEY" value="true">
<session:equalsAttribute name="KEY" match"True" value="true">
// Some HTML goes here.
</session:equalsAttribute>
</session:existsAttribute>
_\|/_______________________________
generation-d development
andrew b forman
> -----Original Message-----
> From: VEDRE, RANAPRATAP REDDY [mailto:VEDRE@engr.sc.edu]
> Sent: Tuesday, January 15, 2002 9:48 AM
> To: 'struts-user@jakarta.apache.org'
> Subject: Help using Struts Logic tags.
>
>
> What is the best way to write the following scriptlet code using
> Logic Tags.
>
> I tried to do it with present and notEmpty but couldn't get it to work.
>
> <% if(session.getAttribute("KEY") != null){ %>
>
> if(session.getAttribute("KEY").equals("True"))
> {
> // Some HTML goes here.
> }
>
> <% } %>
>
> -Thanks
>
> --
> 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>