you need to use tags s:fielderror and s:actionerror to display error if you use simple theme....
Regards Yanto On Sat, Jun 20, 2009 at 9:06 AM, Thomas Rene Vervik <thomas.ver...@gmail.com > wrote: > > I manage to do input validation when I have one of the default themes > selected (xhtml, css_xhtml, etc). But what if I dont want to use > Freemarker, > I want to build the whole HTML in my Jsp, how do I "extract" the error > messages the validation framework generate. > Example, see the code in the code paragraph > > > > How do I extract the error messages in the Jsp when I have the theme set to > simple? > > > public class Person{ > private String name; > Private String email; > } > > I have the following validation xml file: > <validators> > <field name="name"> > <field-validator type="requiredstring"> > <message>You must enter a name</message> > </field-validator> > </field> > <field name="email"> > <field-validator type="requiredstring"> > <message>You must enter a email address</message> > </field-validator> > </field> > </validators> > > And this form: > <s:form action="contact" theme="simple"> > <s:textfield accesskey="name" label="Navn" key="name" > value="%{name}"/> > <s:textfield accesskey="email" label="Epost" key="email" > value="%{email}"/> > <s:submit value="Send" /> > </s:form> > > Thanks for all help > -- > View this message in context: > http://www.nabble.com/Input-validation-in-Struts-2-and-extrating-the-errors-in-jsp-tp24120894p24120894.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >