在https上使用struts2 redirect-action [英] Using struts2 redirect-action over https

查看:321
本文介绍了在https上使用struts2 redirect-action的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

struts2和https上的redirect-action有问题。

I have a problem with struts2 and redirect-action over https.

基本上我从https请求回来的重定向响应有一个不安全的位置(即http:// ...)。

Basically the redirect response I get back from my https request has a non-secure location (i.e. http://...).

这意味着浏览器从安全会话进入非安全会话。

So that means the browser goes from a secure session to a non-secure session.

知道可能导致这种情况的原因吗?

Any idea what could cause this?

干杯,

Stuart。

推荐答案

Struts 2本身默认不支持SSL切换
如果从HTTPS模式切换到HTTP,反之亦然最好的办法是使用Struts2-ssl插件。
此插件将根据方法注释或您提供的配置来处理切换。

Struts 2 itself does not support SSL switching by default If you are switching from HTTPS mode to HTTP and vice-versa my best bet is to use Struts2-ssl plugin. This plugin will take care of the switching based on the method annotation or the configuration you have provides.

这里是详细信息
Struts2-SSL插件

这篇关于在https上使用struts2 redirect-action的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆