struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Pratt" <thechrispr...@gmail.com>
Subject Re: Global result of type redirect
Date Mon, 22 Sep 2008 23:56:35 GMT
What is the message you're receiving?  From what you've provided I can't
tell if it's that it can't find the redirect result type, or the
/homeSecure.action to redirect to.
  (*Chris*)

On Mon, Sep 22, 2008 at 4:03 PM, Gianluca Musella <
gianluca.musella@gmail.com> wrote:

> Hello Chris. Thank you.
>
> > Are you saying you want to set the default result type to "redirect"
> > globally or that you just want a global result type of "redirect" to be
> > available to your actions?
>
> The second. I wrote this:
>
> <package name="almayer" namespace="/" extends="struts-default">
>
>        <global-results>
>            <result name="login">/component/login.jsp</result>
>            <result type="redirect"
> name="homeSecure">/homeSecure.action</result>
>            <result type="redirect"
> name="homeUnsecure">/homeUnsecure.action</result>
>        </global-results>
>
> Te problem is that the struts.xml is validated in the startup phase,
> but if some action returns "homeSecure",  I receive an error because
> the forward isn't defined.
>
> That's all. Where is my fault?
>
> Gianluca
>
>
>
>
>
> 2008/9/22 Chris Pratt <thechrispratt@gmail.com>:
> > Are you saying you want to set the default result type to "redirect"
> > globally or that you just want a global result type of "redirect" to be
> > available to your actions?
> >
> > If the former, just redefine the "redirect" result type in your package
> and
> > set it to default="true", like:
> >
> >          <result-types>
> >            <result-type name="redirect"
> > class="org.apache.struts2.dispatcher.ServletRedirectResult"
> default="true"/>
> >          </result-types>
> >
> > If the latter, make sure your package extends "struts-default"  that's
> where
> > all the standard result types get defined.
> >  (*Chris*)
> >
> >
> > On Mon, Sep 22, 2008 at 9:25 AM, gianluca.musella@gmail.com <
> > gianluca.musella@gmail.com> wrote:
> >
> >>
> >> Ho all.
> >>
> >> I'm il train!
> >>
> >> It is possible in struts.xml to have global result of type redirect?
> >>
> >> My struts.xml doesn't give validation errors, but results or type
> redirect
> >> aren't visible ho the controller.
> >>
> >> Please help
> >>
> >> Gianluca
> >>
> >>
> >>
> >> Inviato da iPhone
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message