Security GLassfish SSL配置页面级别

Security GLassfish SSL配置页面级别,security,ssl,jakarta-ee,glassfish,Security,Ssl,Jakarta Ee,Glassfish,如何仅保护运行在glassfish V3上的web应用程序的部分页面?在web.xml中: <security-constraint> <display-name>Security Settings</display-name> <web-resource-collection> <web-resource-name>SSL Pages</web-resource-name>

如何仅保护运行在glassfish V3上的web应用程序的部分页面?

在web.xml中:

<security-constraint>
    <display-name>Security Settings</display-name>
    <web-resource-collection>
        <web-resource-name>SSL Pages</web-resource-name>
        <description/>
        <url-pattern>/*.jsp</url-pattern>
        <http-method>GET</http-method>
        <http-method>POST</http-method>
    </web-resource-collection>
    <user-data-constraint>
        <description>CONFIDENTIAL requires SSL</description>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

安全设置
SSL页面
/*.jsp
收到
邮递
机密需要SSL
保密的

将url模式更改为您需要的任何模式。

我们需要在配置中进一步添加筛选器。

我想,当服务器提供secure.html页面时,我希望协议从http自动“https”我已为https配置glassfish,并在web.xml中添加了上述配置,但它仅在http中检索页面。此外,使用http用户应无法访问该安全页面我的SSL端口为8181普通端口为8080添加重定向端口=8181在http-listener1中仍然没有重定向到HTTPSWe需要在配置中进一步添加过滤器。但只有一个危险。我用它来对付richFaces。一旦它转到HTTPS,它就不会改变页面,我的意思是,如果我执行post操作,它实际上不会发生。但是,如果我在本地的bmachine浏览器上运行它,它在远程浏览器上运行得非常完美,它使用HTTPS进行绑定,此后不会改变