I have overloded TextTag so that it can show a alert.gif beside the text box whoes validation fails , but even though errors are present the RequestUtils.getActionErrors() is not fetching the code is below ,can anybody tell me what is wrong. the System.out.println("errors"+errors.size()+errors.i sEmpty()); is printing 0.
public int doStartTag() throws JspException {
int returnValue = super.doStartTag();
ActionErrors errors = RequestUtils.getActionErrors(pageContext,
this.property);
System.out.println("errors"+errors.size()+errors.i sEmpty());
if ((errors != null) && (!errors.isEmpty())) {
String imageSrc = RequestUtils.message(pageContext, getBundle(),
getLocale(), this.errorImageKey);
if (imageSrc != null) {
StringBuffer imageResults = new StringBuffer();
imageResults.append("<img src=\"");
imageResults.append(imageSrc);
imageResults.append("\"");
// Print the image to the output writer
ResponseUtils.write(pageContext, imageResults.toString());
}
}
return returnValue;
}