The documentation covers using images in submit buttons. http://struts.apache.org/2.0.11/docs/submit.html
* input: renders as html <input type="submit"...> * image: renders as html <input type="image"...> * button: renders as html <button type="submit"...> <s:submit type="image" src="whatever.gif"/> Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: Johnson nickel <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <user@struts.apache.org> > Date: Tue, 29 Jan 2008 23:28:42 -0800 (PST) > To: <user@struts.apache.org> > Subject: Re: Error messages is repeated Using Struts 2 Annotation validation > > > Thanks for your quick response, > > In my Login.jsp, > <s:textfield name="username" label="UserName" /> > <s:password name="spassword" label="Password" /> > <input type="image" src="../images/Login.gif" value="Login"> > > Instead of using <s:submit value="Login"/>, I used html image tag . > If i used <s:submit> it works fine. > > > > > > newton.dave wrote: >> >> --- Johnson nickel <[EMAIL PROTECTED]> wrote: >>> >> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",messag >> e="UserName >>> is required") >> >> For a string field you'll probably want to use the >> @RequiredStringValidator: >> a text field will return an empty string, whereas @RequiredFieldValidator >> only checks for null-ness (different from blank-ness). >> >>> Same as For password also , >> >> *Exactly* the same? (You put the right "fieldName" for the password field, >> right?) >> >>> When i have submit the Login button, the Error messages is displaying >> Repeated. >> >> You'll need to provide some JSP and possibly configuration in order to >> help >> diagnose the problem. >> >> Where are the duplicated messages appearing? >> >> Dave >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-val > idation-tp15157319p15176802.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]