struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohamed SIDI <mhm.s...@gmail.com>
Subject Re: Redirect & RedirectAction forwarding to localhost:8080 if no protocol mentioned in namespace
Date Thu, 20 Jan 2011 09:10:35 GMT
I think your configuration miss some parameters like "location"

you may have more details in this page
http://struts.apache.org/2.0.14/struts2-core/apidocs/org/apache/struts2/dispatcher/ServletRedirectResult.html#prependServletContext

thank

2011/1/20 Harsh Grover <harsh.grover@gmail.com>

> small correction, the request goes to
> http://localhost:8080/test/actions/loadLogin.<
> http://localhost:8080/test/actions/loadLogin.jsp>
> action.
>
> On Wed, Jan 19, 2011 at 7:33 PM, Harsh Grover <harsh.grover@gmail.com
> >wrote:
>
> > here it is.
> >
> > <action name="userLogin" class="com.UserAction" method="login">
> > <result name="success">home.jsp</result>
> >  <result name="login-failed" type="redirectAction">
> > <param name="actionName">loadLogin</param>
> >  <param name="prependServletContext">true</param>
> > <param name="loginFailed">true</param>
> >  </result>
> > </action>
> > <action name="loadLogin" class="com.UserAction" method="loadLogin">
> >  <result name="success">login.jsp</result>
> > </action>
> >
> > if login succeeds, i'm taking the user to the home page. However, if
> login
> > fails, I'm redirecting the user back to the login page with a query
> param:
> > loginFailed=true. However, it is forwarding to
> > http://localhost:8080/test/actions/loadLogin.jsp, and bypassing the
> apache
> > instance in front of it completely, even if the request comes from
> > http://abc.com/test/actions/userLogin.action.
> >
> > Thanks
> >
> > On Wed, Jan 19, 2011 at 1:49 AM, Mohamed SIDI <mhm.sidi@gmail.com>
> wrote:
> >
> >> can you put out your configuration in struts.xml?
> >>
> >>
> >>
> >> 2011/1/18 Harsh Grover <harsh.grover@gmail.com>
> >>
> >> > I'm using redirectAction to send the user to another action using
> >> > redirectAction. However, if the namespace is not provided, the request
> >> is
> >> > getting forwarded to localhost:8080 (my server instance). I'm using
> >> apache
> >> > in front of my app server, and this is breaking my flow. Is there any
> >> > configuration I need to change? I cant put the complete url in my
> >> namespace
> >> > since I have multiple environments.
> >> >
> >> > Any help on this is highly appreciated.
> >> >
> >> > Thanks.
> >> >
> >>
> >>
> >>
> >> --
> >>
> >>
> >> Cordialement
> >>
> >> Mohamed
> >>
> >
> >
>



-- 


Cordialement

Mohamed

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