How will Struts ActionForward redirect know if it has to redirect to http or https?

て烟熏妆下的殇ゞ 提交于 2020-01-02 23:34:42

问题


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.


回答1:


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

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.

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.



来源:https://stackoverflow.com/questions/32127354/how-will-struts-actionforward-redirect-know-if-it-has-to-redirect-to-http-or-htt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!