struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cyanoboy <marcox872...@libero.it>
Subject Re: Store Interceptor not working with field error (using Hibernate validation)
Date Sat, 22 Dec 2012 08:46:48 GMT
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
         "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

     <constant name="struts.devMode" value="true" />
     <constant name="struts.enable.DynamicMethodInvocation" value="false" />
     <constant name="struts.custom.i18n.resources" 
value="struts-messages" />


     <package name="myStrutsSite" namespace="/" extends="hibernate-default">

         <result-types>
             <result-type name="tiles" 
class="org.apache.struts2.views.tiles.TilesResult" />
         </result-types>

         <interceptors>
             <interceptor name="SessionCheckInterceptor" 
class="myStrutsSite.util.SessionCheckInterceptor"/>
             <interceptor-stack name="mySessionValidationStack">
                 <interceptor-ref name="defaultStackHibernate" />
                 <interceptor-ref name="SessionCheckInterceptor" />
             </interceptor-stack>
         </interceptors>

         <default-interceptor-ref name="mySessionValidationStack"/>

         <global-results>
             <result name="sessionexpired" type="redirectAction" >
                 <param name="actionName">index</param>
             </result>
         </global-results>


         <action name="login" class="myStrutsSite.actions.LoginAction" >
             <result name="input" type="tiles" >baseLayout</result>
             <result name="success" type="tiles" >baseLayout</result>
             <result name="error" type="tiles" >baseLayout</result>
         </action>

         <action name="register" 
class="myStrutsSite.actions.RegisterAction" >
             <result name="input" type="tiles">registration</result>
             <result name="success" type="tiles">baseLayout</result>
             <result name="error" type="tiles">registration</result>
         </action>


         <action name="logout" class="myStrutsSite.actions.LogoutAction" >
             <result name="success" type="tiles" >baseLayout</result>
         </action>


         <action name="index" class="myStrutsSite.actions.HomeAction" >
             <interceptor-ref name="defaultStackHibernate" />
             <result name="success" type="tiles">baseLayout</result>
         </action>


         <action name="showinsertform" 
class="myStrutsSite.actions.ShowInsertFormAction" >
             <interceptor-ref name="mySessionValidationStack" />
             <interceptor-ref name="store">
                 <param name="operationMode">RETRIEVE</param>
             </interceptor-ref>
             <result name="success" type="tiles" >insert</result>
             <result name="error" type="tiles" >baseLayout</result>
         </action>

         <action name="insert" class="myStrutsSite.actions.InsertAction" >
             <interceptor-ref name="mySessionValidationStack">
                 <param name="fileUpload.allowedTypes">image/png</param>
             </interceptor-ref>
             <interceptor-ref name="store">
                 <param name="operationMode">STORE</param>
             </interceptor-ref>
             <interceptor-ref name="defaultStack" />
             <result name="success" type="tiles" >baseLayout</result>
             <result name="error" type="redirectAction" >
                 <param name="actionName">showinsertform</param>
             </result>
             <result name="input" type="redirectAction" >
                 <param name="actionName">showinsertform</param>
             </result>
         </action>


         <action name="*" >
             <result name="success" type="tiles" >{1}</result>
         </action>

     </package>
</struts>





Il 22/12/2012 04:53, mohan rao [via Struts] ha scritto:
> Can you share complete struts.xml complete configuration.
>
>
>
> On Fri, Dec 21, 2012 at 10:48 PM, cyanoboy <[hidden email] 
> </user/SendEmail.jtp?type=node&node=5711488&i=0>> wrote:
>
> > I copied wrong. The right code is this:
> >
> > <interceptors>
> >     <interceptor name="SessionCheckInterceptor"
> > class="util.SessionCheckInterceptor"/>
> >         <interceptor-stack name="mySessionValidationStack">
> >             <interceptor-ref name="defaultStackHibernate" />
> >             <interceptor-ref name="SessionCheckInterceptor" />
> >         </interceptor-stack>
> > </interceptors>
> >
> > <default-interceptor-ref name="mySessionValidationStack"/>
> >
> > <action name="insert" class="actions.InsertAction" >
> >     <interceptor-ref name="mySessionValidationStack">
> >         image/png
> >     </interceptor-ref>
> >     <interceptor-ref name="store">
> >         STORE
> >     </interceptor-ref>
> >     <interceptor-ref name="defaultStack" />
> >     <result name="success" type="tiles" >baseLayout</result>
> >     <result name="error" type="redirectAction" >
> >         showinsertform
> >     </result>
> >     <result name="input" type="redirectAction" >
> >         showinsertform
> >     </result>
> > </action>
> >
> > <action name="showinsertform" class="actions.ShowInsertFormAction" >
> >     <interceptor-ref name="mySessionValidationStack" />
> >     <interceptor-ref name="store">
> >         RETRIEVE
> >     </interceptor-ref>
> >     <result name="success" type="tiles" >insert</result>
> >     <result name="error" type="tiles" >baseLayout</result>
> > </action>
> >
> > So, where is the problem?
> >
> >
> >
> > --
> > View this message in context:
> > 
> http://struts.1045723.n5.nabble.com/Store-Interceptor-not-working-with-field-error-using-Hibernate-validation-tp5711481p5711486.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email] 
> </user/SendEmail.jtp?type=node&node=5711488&i=1>
> > For additional commands, e-mail: [hidden email] 
> </user/SendEmail.jtp?type=node&node=5711488&i=2>
> >
> >
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://struts.1045723.n5.nabble.com/Store-Interceptor-not-working-with-field-error-using-Hibernate-validation-tp5711481p5711488.html

>
> To unsubscribe from Store Interceptor not working with field error 
> (using Hibernate validation), click here 
> <http://struts.1045723.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5711481&code=bWFyY294ODcyMDAyQGxpYmVyby5pdHw1NzExNDgxfC01MDYzOTA3MzM=>.
> NAML 
> <http://struts.1045723.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

>





--
View this message in context: http://struts.1045723.n5.nabble.com/Store-Interceptor-not-working-with-field-error-using-Hibernate-validation-tp5711481p5711489.html
Sent from the Struts - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message