2012-05-16 35 views
1

環境:WebSphere App Server/WebSphere Portal 7,由IBM IHS/Apache httpd使用was_ap20_module/mod_was_ap20_http作爲前端。WebSphere,sendRedirect和HTTPS

我有一個servlet或JSP頁面一個重定向像

response.sendRedirect("/wps/myportal/....") 

生成的HTTP與正確的主機和端口IHS/Apache的端點,但錯誤的協議結束。它是http而不是https。例如,如果IHS/Apache正在偵聽https://myserver.com並且WAS位於http://192.168.12.34:12345(所有端口/主機僞造),則我的重定向返回爲http://myserver.com - 正確的主機和端口但錯誤的協議。

WebSphere如何找出使用正確的主機/端口而不是協議?我如何強制所需的行爲?

回答

1

添加mod_headers中的Apache添加自定義首部前的請求轉發到WebSphere,在WebSphere,設置httpsIndicatorHeader到該自定義首部,然後websphere的會知道切換到https

http://www.ibmconnections.org/wordpress/index.php/tag/was-ssl-http-https/ HTTP:// PIC .dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic =%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Frweb_custom_props.html