You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Watters <an...@gointernet.co.uk> on 2002/12/11 15:36:53 UTC

Constructing absolute URL in struts 1.1-b2

I'm trying to create an absolute URL to redirect to. The URL is generated dynamically at runtime so I can't declare it in the config file for the module. My controller code ends with -

String url = getPaymentServerUrl(); // Returns an absolute URL
ActionForward forward = new ActionForward(url, true);
return forward;

I have tried all the different ActionForward constructors but Struts always pre-pends the web app name and module name so that it tries to redirect to

/webapp/module/http://www.etc.com/etc

instead of

http://www.etc.com/etc


Any suggestions would be greatly appreciated.
Andrew