Hello. I've a problem whit redirect and i'm really going mad. All i want to do is very simple. I've an action that sends a post to a server. The server answer with a page to which i've to redirect the client. When the server answer, i read the page in a buffer and i extract the url to which i've to redirect the client.
myAction{ .... ... do a post to a server redirectURL=read the response from the server .... } That's it, the url to which i've to redirect the user is dynamic. I want to redirect the browser of the user to this url. I let my action class implement ServletResponseAware and in setResponse i do set the responseURL correctly. Then i use: reponse.sendRedirect(redirectURL); return null; //return null to struts but the thing does not work. If the url is "https://page.jsp?param=something" and my current namespace is web/hello/ then i got an error like: The requested resource (/web/hello/PE%20HTML%20PUBLIC) is not available. If i copy and paste the url like this: reponse.sendRedirect("https://page.jsp?param=something"); return null; //return null to struts the browser is correctly redirected. Now..the redirectURL variable contains exactly the same url, but it does work only if i copy and paste the url like a constant value... It's really weird, isn't it? The same happens if I don't implement ServletResponseAware. In fact I tried even with: <result name="success" type="redirect"> ${redirectURL} </result> in struts.xml, where redirectURL is a field in my action class that was filled in with the url I got from the post to the third party server. It's really so strange to do a redirect to an url inside an action? Please help!! Thank you! -- View this message in context: http://www.nabble.com/cannot-redirect-to-an-URL-tp14335049p14335049.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]