Yes, I have the exact same problem.

If you look on the struts-dev mailing list it is mentioned.  It is caused by
something different between tomcat and WEbSphere when you use
response.encodeRedirectURL().  

In my case I change the class RequestProcessor.processActionForward()

from:
      if (forward.getRedirect()) {
            if (path.startsWith("/")) {
                if (forward.getContextRelative()) {
                    path = request.getContextPath() + path;
                } else {
                    path = request.getContextPath() +
                        appConfig.getPrefix() + path;
                }
            }
            response.sendRedirect(response.encodeRedirectURL(path));
        } else {

to:
.....
       if (forward.getRedirect()) {
            if (path.startsWith("/")) {
                if (forward.getContextRelative()) {
                /*************************************************8888
                 WEBSPHERE ISSUE
                    path = request.getContextPath() + path;                 
                /*************************************************/
                    path = path;
                } else {
                /*************************************************8888
                 WEBSPHERE ISSUE
                    path = request.getContextPath() +
                        appConfig.getPrefix() + path;
                /*************************************************/

                    path = appConfig.getPrefix() + path;
                }
            }
            response.sendRedirect(response.encodeRedirectURL(path));
        } else {
.....

but I guess it depends on which build you are using (I use February 6).

Search the dev mailing list you'll find more information.



David Gaulin
Tel / tél :(613) 946-9595 
Email / courriel : [EMAIL PROTECTED] 
Facsimile / télécopieur : (613) 954-6012
Industry Canada | 235 Queen Street, Ottawa, Ontario, K1A 0H5
Industry Canada | 235, rue Queen, Ottawa (Ontario)  K1A 0H5



-----Original Message-----
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 1:10 PM
To: [EMAIL PROTECTED]
Subject: Redirect problem using Struts 1.0.2 in WebSphere 4.0.2


Subject: Redirect problem using Struts 1.0.2 in WebSphere 4.0.2
From: "Don Miller" <[EMAIL PROTECTED]>
 ===
I'm developing a Struts v1.0.2 application in WebSphere v4.0.2 and have
encountered a problem with redirection.  When a forward.redirect = true,
Struts prepends the forward.path with the context path via
request.getContextPath() before it encodes the path via
response.encodeRedirectURL().  In WebSphere 4.0, encodeRedirectURL() also
prepends the given path with the context path.  The end result is a URL with
the context path duplicated.  This also occurs when using the logic:forward
and logic:redirect tags.

Has anyone also seen this behavior and created a work-around?

Thanks,
Don



--
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]>

Reply via email to