| Author |
logic:present not validating as it was supposed to. where did i got it wrong ?
|
Mel Cen
Greenhorn
Joined: Apr 23, 2011
Posts: 7
|
|
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
Joined: Jan 10, 2002
Posts: 56191
|
|
|
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: logic:present not validating as it was supposed to. where did i got it wrong ?
|
|
|