Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 92538 invoked from network); 17 Jun 2009 12:58:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jun 2009 12:58:00 -0000 Received: (qmail 90758 invoked by uid 500); 17 Jun 2009 12:58:08 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 90688 invoked by uid 500); 17 Jun 2009 12:58:08 -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 90678 invoked by uid 99); 17 Jun 2009 12:58:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 12:58:08 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.222.191] (HELO mail-pz0-f191.google.com) (209.85.222.191) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 12:57:58 +0000 Received: by pzk29 with SMTP id 29so352721pzk.23 for ; Wed, 17 Jun 2009 05:57:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.115.18.3 with SMTP id v3mr214492wai.0.1245243456923; Wed, 17 Jun 2009 05:57:36 -0700 (PDT) In-Reply-To: <574e8ad80906170315j7e9f2193oce40230b411ee08c@mail.gmail.com> References: <574e8ad80906160042i6c92194aw381950f95959dfc4@mail.gmail.com> <4A3782EB.80709@yahoo.com> <574e8ad80906162039k7b4612b3k4c731a7a92ee0eac@mail.gmail.com> <574e8ad80906170315j7e9f2193oce40230b411ee08c@mail.gmail.com> Date: Wed, 17 Jun 2009 08:57:36 -0400 Message-ID: Subject: Re: Interceptor issue in Struts 2.1.6 From: Wes Wannemacher To: Struts Users Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org All of the themes "work" with validation, it just depends on what you are expecting out of validation. The validation workflow interceptors will stop processing if validation fails and then indicate to the framework that the "input" result should be rendered. Whether and how you show the validation errors is a function of the view. The simple theme does not display validation/action errors without the help of tags such as s:fielderror and s:actionerror. The xhtml and css themes will show the errors, but you do not have as much freedom, as far as placement. The ajax theme is pretty much like xhtml. -Wes On Wed, Jun 17, 2009 at 6:15 AM, Yanto wrote: > Finally we found the issue is actually with the theme, > > we need to stop using simple theme....and the validation and interceptor > will work. > > http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td= 23127366.html > > just wondering, is there any other theme that working with validation ? > > Regards > Yanto > > On Wed, Jun 17, 2009 at 11:39 AM, Yanto wrote: > >> Hi Dave, >> >> after following your note, we are able to run our sample interceptor, >> however now we have another issue the sample interceptor will always >> looping, >> >> since we have the following code in the sample interceptor, >> *return* invocation.invoke(); >> >> but the sample interceptor will not run, if we are not include this code= . >> >> >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> >> >> =A0 =A0 =A0 =A0 =A0 =A0 > "com.obs.ssts.framework.interceptor.InterceptorSample"*/> >> >> >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 *<**interceptor-ref** na= me=3D"**sample"**/>*** >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> >> =A0 =A0 =A0 =A0 =A0> "loginAction"*> >> >> =A0 =A0 =A0 =A0 =A0 =A0 main.*jsp* >> >> =A0 =A0 =A0 >> >> >> >> Now my action calls going in loop and after added the myinterceptostack >> >> >> >> *public* *class* *InterceptorSample* *extends* AbstractInterceptor { >> >> >> >> =A0 =A0 =A0 @Override >> >> =A0 =A0 =A0 *public* String intercept(ActionInvocation invocation) *thro= ws*Exception { >> >> =A0 =A0 =A0 =A0 =A0 =A0 // *TODO* Auto-generated method stub >> >> =A0 =A0 =A0 =A0 =A0 =A0 System.*out*.println("Testing the interceptor fl= ow from TEST:" >> ); >> >> =A0 =A0 =A0 =A0 =A0 =A0 System.*out*.println("Testing the interceptor fl= ow from TEST >> &&&&&:"); >> >> =A0 =A0 =A0 =A0 =A0 =A0 *return* invocation.invoke(); >> >> =A0 =A0 =A0 } >> >> >> >> } >> >> >> Thanks >> Yanto >> >> >> >> On Tue, Jun 16, 2009 at 7:32 PM, Dave Newton wrot= e: >> >>> Yanto wrote: >>> >>>> >>>> =A0 >>>> >>>> >>> >>> This will configure *only* the "sample" interceptor. >>> >>> If you specify *any* interceptors on a per-action basis you must config= ure >>> *all* interceptors. This can be done in several ways. >>> >>> - specify all interceptors in the action's configuration (you can speci= fy >>> interceptor stacks as well as single interceptors) >>> - creating a new stack including your custom interceptor and using that >>> stack in your action configuration >>> - same, but define the new stack and using it as the default stack >>> >>> Dave >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >>> For additional commands, e-mail: user-help@struts.apache.org >>> >>> >> > --=20 Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org