Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A881FEF2 for ; Tue, 26 Mar 2013 17:29:00 +0000 (UTC) Received: (qmail 28721 invoked by uid 500); 26 Mar 2013 17:28:57 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 28683 invoked by uid 500); 26 Mar 2013 17:28:57 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 28675 invoked by uid 99); 26 Mar 2013 17:28:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 17:28:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sr.ilustre@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 17:28:51 +0000 Received: by mail-we0-f175.google.com with SMTP id t11so4444471wey.20 for ; Tue, 26 Mar 2013 10:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=ifyqXdQmRmBpLYDTYEeOPZIWLhjZxOHSm+x1lCR8Tf0=; b=suwSGAF1zhq+a/IQVNidGG9uyZ7V4loXaAo+FNXT061g7peYsB/RZoC7No4y+s8PVD bxo0ww9ckd9gVsZ1kvN7P3wTblvYIsI3X6FLBwbGcrBOq6dnyWdlEKaeRqGMLWAsz0e4 FO3RCcL1hvIBlpnwI9TYmdPPdfeB8IY5AQr5qQE0eUzQGpnmLFkUkfIWDHmxdaNKx/bz w6ouv/7vQgtYePAp/PVdSj6OozBGvVrayrp5qAlQr+9gWlZifSzITAU+wxQ6TzeLwsvU wrBojyQxQvgC5bgoX3QKx856IqlcgJKbC0NeMT6JemtXVYHQX1NTRrtkEIJCkKRdy2j0 xx4Q== MIME-Version: 1.0 X-Received: by 10.194.119.200 with SMTP id kw8mr26225843wjb.31.1364318911503; Tue, 26 Mar 2013 10:28:31 -0700 (PDT) Received: by 10.194.169.7 with HTTP; Tue, 26 Mar 2013 10:28:31 -0700 (PDT) Date: Tue, 26 Mar 2013 18:28:31 +0100 Message-ID: Subject: struts2 (2.2.1) adds field error and doesn't return input!! From: lucas owen To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=089e0117791314a93704d8d7403f X-Virus-Checked: Checked by ClamAV on apache.org --089e0117791314a93704d8d7403f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have this wierd problem when validating an action, I add field errors in the validate method but Struts2 doesn=B4t return input and continues execution. I show you my configuration (only relevant points): .jsp ------ struts.xml --------------- /WEB-INF/pages/person/person.jsp personSuccess ${person.id} ${selectedId} Action --------- public class PersonAction extends ActionSupport { Person person; PersonService personService; public void validateSave() { if(person.getSurname().equals("")){ addFieldError("person.surname", getText("mandatory",new String[]{"Surname"})); } if(person.getName().equals("")){ addFieldError("person.name", getText("mandatory",new String[]{"Name"})); } } public String save() { try { personService.save(person); addActionMessage(getText("response.save_ok")); } catch (Exception e) { ErrorHandler.add(this, e, log); } return "success"; } } if in the validate i add action errors instead of field errors everything works correctly... Any help would be so much appreciated THANKS IN ADVANCE!!! --089e0117791314a93704d8d7403f--