我有一个 GWT 应用程序,我正在使用 MVP4G 框架。如果我使用 HTTP,我可以很好地启动我的应用程序。但是,当我尝试使用 HTTPS 打开它时,它不起作用。我的整个网站都可以使用我拥有的 SSL 证书正常工作。
编译 GWT 时是否需要启用特定配置?或者我需要在我的 apache 配置中做些什么?任何帮助将不胜感激,谢谢。
SSL 不应影响您的应用程序,因为 SSL 在其他层上运行。
要配置 HTTPS,您必须在 web.xml 中设置安全约束,然后连接到“https://”而不是“http://”。如果您连接到“http://”,您会收到一个空白页面。
<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>