Developers, I saw this on the user list and thought it may be a bug. I couldn't find it in bugzilla. Basically, when you define a forward that should redirect struts prefixes your url with the context-path. What if you want to redirect to a page outside of your app? Example: http://www.google.com turns into /context-path/http://www.google.com.
Is this a bug or are redirects not supported in this way? David >From: Iris <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: Struts Users Mailing List <[EMAIL PROTECTED]> >Subject: Re: (struts1.1b2) redirect problem >Date: Wed, 16 Oct 2002 17:02:37 +0200 > >I've nothing more in the server log. >I pass by jsp1.do but in this action I redirect to jsp2 that is not in the >same webapp. > >I see in struts source and I find that in >org.apache.action.RequestProcessor.processForwardConfig (l. 414) >the redirect is did with the contextPath. >And in org.apache.util.RequestUtils.forwardURL there's nothing particular >if the forward is redirected. >I think that the problem become from there. >Do you think I must add that in the bug list ? >Or I'm not watching in the good way ? > >Iris > >David Graham wrote: > >>Do any errors show up in your server log? I'm also wondering why you're >>redirecting to the jsp directly instead of *.do? >> >>David >> >> >> >> >> >> >>>From: Iris <[EMAIL PROTECTED]> >>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >>>To: [EMAIL PROTECTED] >>>Subject: (struts1.1b2) redirect problem >>>Date: Wed, 16 Oct 2002 16:26:16 +0200 >>> >>>Hello, >>> >>>I just change from struts1.1b1 to struts1.1b2 and I have a redirect >>>problem. >>>In my struts-config I have a forward redirected: (to change from >>>context-path1 to context-path2) >>><global-forwards type="org.apache.struts.action.ActionForward"> >>><forward name="getlist" >>> path="http://machine:8080/context-path2/jsp2.jsp" >>> redirect="true"/> >>></global-forwards> >>> >>>This works fine with struts1.1b1 but with struts1.1b2 there is a problem: >>>In my Action class I get the ActionForward and trace it: >>>ActionForward af = mapping.findForward("getlist") ; >>>System.out.println(af) ; >>> >>>The result is: >>>[STDOUT] >>>ForwardConfig[name=getlist,path=http://machine:8080/context-path2/jsp2.jsp,redirect=true] >>> >>> >>>but in the browser: >>>_The requested resource >>>(/context-path1/http:/machine:8080/context-path2/jsp2.jsp) is not >>>available._ >>> >>>Is this a bug in struts1.1b2 or have I to change something in my >>>struts-config ? >>> >>>Iris >>> >>> >>>-- >>>To unsubscribe, e-mail: >>><mailto:[EMAIL PROTECTED]> >>>For additional commands, e-mail: >>><mailto:[EMAIL PROTECTED]> >> >> >> >>_________________________________________________________________ >>Internet access plans that fit your lifestyle -- join MSN. >>http://resourcecenter.msn.com/access/plans/default.asp >> >> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> > > > > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> _________________________________________________________________ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>