Struts ActionForward重定向如何知道是否必须重定向到http或https? [英] How will Struts ActionForward redirect know if it has to redirect to http or https?

查看:228
本文介绍了Struts ActionForward重定向如何知道是否必须重定向到http或https?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在执行新的ActionForward时,我看到从https到http的混合内容重定向错误.我无法弄清楚ActionForward读什么,以确定它必须转到http而不是https.我有旧的Struts v1.11.

I am seeing mix content redirection error from https to http when I am doing new ActionForward. I am not able to figure out what ActionForward reads in order to determine that it has to go to http instead of https. I have old Struts v1.11.

推荐答案

我想是ActionConfig,但可以通过Struts的扩展名获得.

The ActionConfig I suppose, but it's available via extension to Struts.

1.1版的扩展名为 sslext ,有助于解决许多 HTTP/HTTPS切换问题.它扩展了ActionConfig类, RequestProcessor和Plugin类来定义框架,其中 开发人员可以为Struts指定传输协议行为 应用程序.在Struts配置文件中,开发人员指定 哪些操作请求需要HTTPS传输,哪些应使用 HTTP.开发人员还可以指定是否重定向 协议不正确"的请求将请求正确的协议.

An extension to version 1.1, named sslext, helps solve many of the HTTP/HTTPS switching issues. It extends the ActionConfig class, RequestProcessor, and Plugin classes to define a framework where developers may specify the transmission protocol behavior for Struts applications. Within the Struts configuration file, developers specify which action requests require HTTPS transmission and which should use HTTP. Developers can also specify whether to redirect "improperly-protocoled" requests to the correct protocol.

除了这些扩展名之外,<html:link><html:form>标签已扩展.在这些扩展中,Struts 分析在这两个标签中指定的动作,以确定 请求该操作时应使用的协议.的HTML 由这些标签生成的代码将指定正确的协议.一个 定义了其他自定义标签,以允许用户指定 单个JSP的传输协议.这是最常用的 用于基于表单的身份验证页面.

In addition to these extensions, the <html:link> and the <html:form> tags have been extended. In these extensions, the Struts actions specified in either of these tags are analyzed to determine the protocol that should be used in requesting that action. The HTML generated by these tags will specify the proper protocol. An additional custom tag is defined for allowing users to specify the transmission protocol for an individual JSP. This is most often used for form-based authentication pages.

这篇关于Struts ActionForward重定向如何知道是否必须重定向到http或https?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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