> request = ServletActionContext.getRequest();
> String tmp = "";
> try {
> tmp = request.getParameter("cardNo");
> Integer i = this.getCardNo();
> if (tmp != null && tmp.length() > 0) {
> int tmpInt = Integer.parseInt(tmp);
Remove this part above
> this.setCardNo(tmpInt);
You don't have to do this, it will be done by Struts2
> System.out.println("Card no (validation) = " +
> cardNo);
> if (cardNo < 1 || cardNo > 999999) {
> addFieldError("cardNo", "Must be int");
> System.out.println("INPUT...");
> }
That's all you have to have in your validate() method (if cardNo has
getter and setter defined in action class)
Remove also validate=true from your form, because you don't use client
side validation.
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]