• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logic Empty Tag Struts1.2

 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I developed a sample struts module using struts1.2. I am trying to implement logicEmpty and logic:notEmpty tags. Below is my code for action and success page.

But as a output, i will always get

User ID is Not Empty
User ID is Empty

Only one of these should be resulted. Please let me know if I have done something wrong here. Actionform is correctly populated and I am able to set the attribute in action class also.

LoginAction.java



success.jsp


 
Bhagat Singh Rawat
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change your JSP like:


Note: name will be used for Form Name.
 
Jesus Mireles
Ranch Hand
Posts: 122
IntelliJ IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried doing:

<logic:empty name="LoginActionForm" property="userID">
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I tried both the ways mentioned below and still the problem remains.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic