Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Placing error message near text field  RSS feed

Sandeep Ghosh
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friend ,
I am trying to place error message in side of the text field .For this near to the text field I have this code

<logic present name= "%=org.apache.struts.action.Action.ERROR_KEY% >" property="userName" >
<td align="left">
<html:errors property="userName"/>
</td >
</logic resent>
In the form class I have added this line
if ( userName == null )
errors.add ( "userName" ,new ActionError ( "errors.username.required" ) ) ;

Unfortunately nothing is showing up .When I am using <html:errors/> then message is showing .

Could you please tell me where I am going wrong. Is there any better way to do this. I am using struts 1.1
Thanks in adv
[ April 28, 2005: Message edited by: Nataraj Ramesh ]
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!