logic:present will work for all types of objects.
logic:empty works on String 

-----Original Message-----
From: Jörg Maurer [mailto:[EMAIL PROTECTED]]
Sent: 30 January, 2003 10:53
To: Struts Users Mailing List
Subject: RE: ? on logic:empty - any hints


THAAAAAAAAANX SO MUCH? PHUHH? I am really getting a little mad for
getting my project with struts done(more my fault than struts of course
;-) )

Shortly - So what is difference/usage of logic:empty to present(despite
it doesn´t work as described in api).

GREE Jörg

-----Original Message-----
From: Míguel Ángel Mulero Martínez
[mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 30. Jänner 2003 09:44
To: Struts Users Mailing List
Subject: RE: ? on logic:empty - any hints


Use the <logic:present>

Regards,
Miguel

-----Mensaje original-----
De: Jörg Maurer [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 30 de enero de 2003 9:32
Para: Struts Users Mailing List (E-mail)
Asunto: ? on logic:empty - any hints

Hi!

I want to test in jsp if user does need to log in, e.g. if user has
already logged in and by back button is calling login.jsp for second
time.

My login.jsp has code :

<logic:empty name="<%= IAppConstants.USER_CONTAINER_KEY%>"
scope="session">

    <html:form action="/login">
        ....
    </html:form>

</logic:empty>

<logic:notEmpty name="<%= IAppConstants.USER_CONTAINER_KEY%>"
scope="session">
    <logic:notEqual name="<%= IAppConstants.USER_CONTAINER_KEY%>"
property="userViewR" value="false" scope="session">
        You are already logged in!
    </logic:notEqual>
</logic:notEmpty>

So i test for that bean named UserContainer in session scope, where it
resides when login completes.

Unfortunatly, if user not logged - it throws
"[ServletException in:/login.jsp] Cannot find bean UserContainer in
scope session'"

Reading api docu, I thought logic:empty would test bean for
null(existing or not existing)?

Can any of you help me ?

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


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
______________________________________________

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

______________________________________________

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

Reply via email to