You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by chubi <ch...@hotmail.com> on 2008/03/27 21:01:38 UTC

Message surviving redirect

Hello, 
----I have posted the same problem in a previous thread, yet got no reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature without error messages lost. 
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come to
solve my problem. 
Here is my struts actions: 
pst: the store interceptor tags do not show correctly in this thread. 

 <action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit"> 
                        <interceptor-ref name="defaultStack" /> 
                        <interceptor-ref name="store"> 
                                RETRIEVE
                        </interceptor-ref> 
            <result>/WEB-INF/pages/featureForm.jsp</result> 
            <result name="error">/WEB-INF/pages/featureList.jsp</result> 
        </action> 
        <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save"> 
                        <interceptor-ref name="defaultStack" /> 
                        <interceptor-ref name="store"> 
                                STORE
                        </interceptor-ref> 
            <result name="success" type="redirect">features.html</result> 
            <result name="input" type="redirect-action"> 
                                editFeature.html
                                true
                                ${feature.dkey}
                        </result> 
        </action> 

Please help me figure out where the problem exists. 
Thank you for your support. 
Best regards.
-- 
View this message in context: http://www.nabble.com/Message-surviving-redirect-tp16332404p16332404.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Message surviving redirect

Posted by chubi <ch...@hotmail.com>.
Hey guys,

I'm really greatful u made a great deal responding to my problem :handshake:
I am using the message store interceptor, very correctly :confused:... I
also mentioned that the xml tag is not showing correclty in this thread: 
<interceptor-ref name="store"> 
  STORE 
</interceptor-ref> 

Plz. read my xml block thouroughly, there is nothing wrong with logic flow,
yet error message are not showing after validation.
Any hint or tip would save my torture :-(
-- 
View this message in context: http://www.nabble.com/Message-surviving-redirect-tp16332404p16362268.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Message surviving redirect

Posted by st...@gmail.com.
Sorry about that!  My config specified the interceptor as:

<interceptor-ref name="store">
  <param name="operationMode">STORE</param>
</interceptor-ref>

Also, I think you can specify store/retrieve as a request parameter as an
alternative to the XML

On Fri, Mar 28, 2008 at 12:30 AM, Laurie Harper <la...@holoweb.net> wrote:

> He *is* using the store interceptor :-), though apparently it's not
> working. I haven't used it myself but perhaps you can see what's wrong
> in the configuration he posted?
>
> L.
>
> stanlick@gmail.com wrote:
> > Since "chain" can be a bad design practice, you might want to look at
> the store
> > <http://struts.apache.org/2.x/docs/message-store-interceptor.html
> >interceptor.
> > I have used it successfully.
> >
> > On Thu, Mar 27, 2008 at 4:02 PM, Jiang, Jane (NIH/NCI) [C] <
> > jiangja@mail.nih.gov> wrote:
> >
> >> Instead of type="redirect-action", did you try "chain"?
> >>
> >> -----Original Message-----
> >> From: chubi [mailto:chubi-shuki@hotmail.com]
> >> Sent: Thursday, March 27, 2008 4:05 PM
> >> To: user@struts.apache.org
> >> Subject: Message surviving redirect
> >>
> >>
> >> Hello,
> >> ----I have posted the same problem in a previous thread, yet got no
> >> reply,
> >> but I'm really stuck with it and spending days trying to solve it, in
> >> vain... ----
> >>
> >> I have two actions: editFeature and saveFeature. Whereas editFeature
> >> should
> >> submit successfuly to saveFeature the latter performs and redirects
> >> transparently to editFeature again. This is ok using redirect-action.
> >>
> >> But in case when validation fails after submission, I get back to
> >> editFeature with all error messages lost.
> >> I read a previous thread talkin about the same problem and giving a
> >> satisfying solution with the store interceptor, though I could not come
> >> to
> >> solve my problem.
> >> Here is my struts actions:
> >> pst: the store interceptor tags do not show correctly in this thread.
> >>
> >>  <action name="editFeature"
> >> class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
> >>                        <interceptor-ref name="defaultStack" />
> >>                        <interceptor-ref name="store">
> >>                                RETRIEVE
> >>                        </interceptor-ref>
> >>            <result>/WEB-INF/pages/featureForm.jsp</result>
> >>            <result name="error">/WEB-INF/pages/featureList.jsp</result>
> >>
> >>        </action>
> >>
> >>        <action name="saveFeature"
> >> class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
> >>                        <interceptor-ref name="defaultStack" />
> >>                        <interceptor-ref name="store">
> >>                                STORE
> >>                        </interceptor-ref>
> >>            <result name="success"
> >> type="redirect">features.html</result>
> >>            <result name="input" type="redirect-action">
> >>                                editFeature.html
> >>                                true
> >>                                ${feature.dkey}
> >>                        </result>
> >>        </action>
> >>
> >> Please help me figure out where the problem exists.
> >> Thank you for your support.
> >> Best regards.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Message-surviving-redirect-tp16332404p16332404.htm
> >> l
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Scott
stanlick@gmail.com

Re: Message surviving redirect

Posted by Laurie Harper <la...@holoweb.net>.
He *is* using the store interceptor :-), though apparently it's not 
working. I haven't used it myself but perhaps you can see what's wrong 
in the configuration he posted?

L.

stanlick@gmail.com wrote:
> Since "chain" can be a bad design practice, you might want to look at the store
> <http://struts.apache.org/2.x/docs/message-store-interceptor.html>interceptor.
> I have used it successfully.
> 
> On Thu, Mar 27, 2008 at 4:02 PM, Jiang, Jane (NIH/NCI) [C] <
> jiangja@mail.nih.gov> wrote:
> 
>> Instead of type="redirect-action", did you try "chain"?
>>
>> -----Original Message-----
>> From: chubi [mailto:chubi-shuki@hotmail.com]
>> Sent: Thursday, March 27, 2008 4:05 PM
>> To: user@struts.apache.org
>> Subject: Message surviving redirect
>>
>>
>> Hello,
>> ----I have posted the same problem in a previous thread, yet got no
>> reply,
>> but I'm really stuck with it and spending days trying to solve it, in
>> vain... ----
>>
>> I have two actions: editFeature and saveFeature. Whereas editFeature
>> should
>> submit successfuly to saveFeature the latter performs and redirects
>> transparently to editFeature again. This is ok using redirect-action.
>>
>> But in case when validation fails after submission, I get back to
>> editFeature with all error messages lost.
>> I read a previous thread talkin about the same problem and giving a
>> satisfying solution with the store interceptor, though I could not come
>> to
>> solve my problem.
>> Here is my struts actions:
>> pst: the store interceptor tags do not show correctly in this thread.
>>
>>  <action name="editFeature"
>> class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
>>                        <interceptor-ref name="defaultStack" />
>>                        <interceptor-ref name="store">
>>                                RETRIEVE
>>                        </interceptor-ref>
>>            <result>/WEB-INF/pages/featureForm.jsp</result>
>>            <result name="error">/WEB-INF/pages/featureList.jsp</result>
>>
>>        </action>
>>
>>        <action name="saveFeature"
>> class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
>>                        <interceptor-ref name="defaultStack" />
>>                        <interceptor-ref name="store">
>>                                STORE
>>                        </interceptor-ref>
>>            <result name="success"
>> type="redirect">features.html</result>
>>            <result name="input" type="redirect-action">
>>                                editFeature.html
>>                                true
>>                                ${feature.dkey}
>>                        </result>
>>        </action>
>>
>> Please help me figure out where the problem exists.
>> Thank you for your support.
>> Best regards.
>> --
>> View this message in context:
>> http://www.nabble.com/Message-surviving-redirect-tp16332404p16332404.htm
>> l
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Message surviving redirect

Posted by st...@gmail.com.
Since "chain" can be a bad design practice, you might want to look at the store
<http://struts.apache.org/2.x/docs/message-store-interceptor.html>interceptor.
I have used it successfully.

On Thu, Mar 27, 2008 at 4:02 PM, Jiang, Jane (NIH/NCI) [C] <
jiangja@mail.nih.gov> wrote:

> Instead of type="redirect-action", did you try "chain"?
>
> -----Original Message-----
> From: chubi [mailto:chubi-shuki@hotmail.com]
> Sent: Thursday, March 27, 2008 4:05 PM
> To: user@struts.apache.org
> Subject: Message surviving redirect
>
>
> Hello,
> ----I have posted the same problem in a previous thread, yet got no
> reply,
> but I'm really stuck with it and spending days trying to solve it, in
> vain... ----
>
> I have two actions: editFeature and saveFeature. Whereas editFeature
> should
> submit successfuly to saveFeature the latter performs and redirects
> transparently to editFeature again. This is ok using redirect-action.
>
> But in case when validation fails after submission, I get back to
> editFeature with all error messages lost.
> I read a previous thread talkin about the same problem and giving a
> satisfying solution with the store interceptor, though I could not come
> to
> solve my problem.
> Here is my struts actions:
> pst: the store interceptor tags do not show correctly in this thread.
>
>  <action name="editFeature"
> class="com.intelligile.lms.webapp.action.FeatureAction" method="edit">
>                        <interceptor-ref name="defaultStack" />
>                        <interceptor-ref name="store">
>                                RETRIEVE
>                        </interceptor-ref>
>            <result>/WEB-INF/pages/featureForm.jsp</result>
>            <result name="error">/WEB-INF/pages/featureList.jsp</result>
>
>        </action>
>
>        <action name="saveFeature"
> class="com.intelligile.lms.webapp.action.FeatureAction" method="save">
>                        <interceptor-ref name="defaultStack" />
>                        <interceptor-ref name="store">
>                                STORE
>                        </interceptor-ref>
>            <result name="success"
> type="redirect">features.html</result>
>            <result name="input" type="redirect-action">
>                                editFeature.html
>                                true
>                                ${feature.dkey}
>                        </result>
>        </action>
>
> Please help me figure out where the problem exists.
> Thank you for your support.
> Best regards.
> --
> View this message in context:
> http://www.nabble.com/Message-surviving-redirect-tp16332404p16332404.htm
> l
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Scott
stanlick@gmail.com

RE: Message surviving redirect

Posted by "Jiang, Jane (NIH/NCI) [C]" <ji...@mail.nih.gov>.
Instead of type="redirect-action", did you try "chain"?  

-----Original Message-----
From: chubi [mailto:chubi-shuki@hotmail.com] 
Sent: Thursday, March 27, 2008 4:05 PM
To: user@struts.apache.org
Subject: Message surviving redirect


Hello, 
----I have posted the same problem in a previous thread, yet got no
reply,
but I'm really stuck with it and spending days trying to solve it, in
vain... ----

I have two actions: editFeature and saveFeature. Whereas editFeature
should
submit successfuly to saveFeature the latter performs and redirects
transparently to editFeature again. This is ok using redirect-action.

But in case when validation fails after submission, I get back to
editFeature with all error messages lost. 
I read a previous thread talkin about the same problem and giving a
satisfying solution with the store interceptor, though I could not come
to
solve my problem. 
Here is my struts actions: 
pst: the store interceptor tags do not show correctly in this thread. 

 <action name="editFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="edit"> 
                        <interceptor-ref name="defaultStack" /> 
                        <interceptor-ref name="store"> 
                                RETRIEVE
                        </interceptor-ref> 
            <result>/WEB-INF/pages/featureForm.jsp</result> 
            <result name="error">/WEB-INF/pages/featureList.jsp</result>

        </action> 

        <action name="saveFeature"
class="com.intelligile.lms.webapp.action.FeatureAction" method="save"> 
                        <interceptor-ref name="defaultStack" /> 
                        <interceptor-ref name="store"> 
                                STORE
                        </interceptor-ref> 
            <result name="success"
type="redirect">features.html</result> 
            <result name="input" type="redirect-action"> 
                                editFeature.html
                                true
                                ${feature.dkey}
                        </result> 
        </action> 

Please help me figure out where the problem exists. 
Thank you for your support. 
Best regards.
-- 
View this message in context:
http://www.nabble.com/Message-surviving-redirect-tp16332404p16332404.htm
l
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org