struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Brown <adrianjonbr...@yahoo.com.au>
Subject Re: How to use logic:present
Date Tue, 10 Sep 2002 03:56:36 GMT
Hi Keven,

A trick for young players is that you may not have put
in the line for the logic tags at the top of your jsp.
Check you have this:


<%@ taglib uri="/WEB-INF/struts-logic.tld"
prefix="logic" %>

If you do in fact have this, and you have the ability
to set break points in your Struts code, I'd put one
in the PresentTag.condition(boolean) method and see if
it is getting hit, and whether it is evaluating
properly.

Also make sure that your String User does actually
equal "user" if you intend to look it up in the
session.

That's all I can think of.

Adrian



 --- Keven <hinbsls@yahoo.ca> wrote: > Hi, all:
> 
> I want to use logic:present to check if user has
> logon.
> 
> If I use <%
> if(request.getSession().getAttribute(User) != null)
> { %> .....
> it works fine. but I change it to use logic:present.
> I changed it to
> <logic:present name="User" scope="session">...
> </logic:present>. But it
> never evaluate <logic:present...> as true. Am I
> doing somethig wrong here?
> How to use logic:present.Could some one give me an
> example?
> 
> Thanks,
> 
> Keven
> 
>
______________________________________________________________________
> 
> Post your ad for free now! http://personals.yahoo.ca
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>  

http://mobile.yahoo.com.au - Yahoo! Messenger for SMS
- Now send & receive IMs on your mobile via SMS

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message