Java Struts2从服务器重定向到外部URL

Java Struts2从服务器重定向到外部URL,java,servlets,struts2,struts,Java,Servlets,Struts2,Struts,我有一个应用程序,我正试图重定向到一个外部URl(https),但我的页面没有移动到新的URl。应用程序正在浏览器中将URL作为GET请求触发。见下的代码 行动类 public String Authorization() { HttpClient client = HttpClientBuilder.create().build(); HttpPost post = new HttpPost(); try { post.setHeader("Accept", "*/*"

我有一个应用程序,我正试图重定向到一个外部URl(https),但我的页面没有移动到新的URl。应用程序正在浏览器中将URL作为GET请求触发。见下的代码

行动类

public String Authorization() {

HttpClient client = HttpClientBuilder.create().build();
HttpPost post = new HttpPost();     

try {

    post.setHeader("Accept", "*/*");    
    post.setHeader("Allow-Origin", "*");
    post.setHeader("Cache-Control", "no-cache");
    post.setHeader("Accept-Encoding", "gzip, deflate");             
    post.setHeader("Connection", "keep-alive");
    post.setHeader("cache-control", "no-cache");
    post.setHeader("content-type", "text/xml,application/xml");

    jsonData.put("url", loginManager.Authorize());          
    HttpResponse response = client.execute(post);
    System.out.println("Response Code : " + response.getStatusLine().getStatusCode());


} catch (Exception e) {
    // TODO Auto-generated catch block
    logger.error(e.getMessage());
}
return Action.SUCCESS;
}

STRUTS.xml

<action name="AuthenticateO365" class="org.myapp.product.controller.LoginAction" method="Authorization">            
<result name="input"></result>
<result name="success" type="redirect">${jsonData.url}</result>  

${jsonData.url}

我不确定你在问什么--
成功
的结果是重定向到
jsonData
中的url,而你说的就是发生的情况(“应用程序在浏览器中作为GET请求启动url”)。但你也说了相反的话。你能更清楚一点吗?页面没有移动到新的URL,在浏览器控制台中,我看到的响应是HTML页面