DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14908>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14908

Redirect creates bad url

           Summary: Redirect creates bad url
           Product: Struts
           Version: 1.1 Beta 2
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Controller
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When I set the redirect attribute to "true" of an action forward I get a bad 
url.  When I set the redirect attribute to false it works just fine.

Here is the action forward:
<forward name="success"
        path="/admin/user_account.jsp"
        redirect="true"/>

I traced the code and it appears the problem is in 
RequestProcessor.processForwardConfig(HttpServletRequest request,
                                        HttpServletResponse response,
                                        ForwardConfig forward).

If redirect is set to true then it does the following:

 response.sendRedirect
                (response.encodeRedirectURL(request.getContextPath() + uri));

The context path is always added before the uri then passed to 
endcodeRedirectURL().  The reuslting URL is 
http://localhost/project/project/admin/user_account.jsp.  The context root has 
been added twice.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to