• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic:present not validating as it was supposed to. where did i got it wrong ?

 
Mel Cen
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
regarding the problem ,

i cant get this piece of code to work.



<logic:present name="error" property="ErrorMessage">
Error: <bean:write name="error" property="ErrorMessage"/>
</logic:present>


If i am not mistaken, during the first time this page(Login.jsp) was load, this part of code will not be evaulated becoz error bean object is not present.

However, during submit, and i have debugged,

request.getSession().setAttribute("error", error);

gets executed and with mapping, the control was forwarded back to Login.jsp.

however, the code above was skipped again..

during object lookup, the object error is present but i am clueless on why it will not show the error?
==============================================================================

this are my tag lib(s)

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="Login" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

this is my ErrorClass class :



and this is my code



Update : got it working with a little google seach..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic