jboss设置系统首页&https&websocket

一、设置系统首页

1、修改jboss4/server/default/deploy/jboss-web.deployer/conf目录下web.xml,确保有welcom-file中有index.html就行

<error-page>  
    <error-code>503</error-code>  
     <location>/error/503.htm</location>  
</error-page>  
<error-page>  
    <error-code>404</error-code>  
    <location>/error/404.htm</location>
</error-page>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

2、/usr/local/jboss4/server/default/deploy/jboss-web.deployer/ROOT.war目录下添加index.html,

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>404 Not Found</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   <link rel="StyleSheet" href="jboss.css" type="text/css"/>
</head>

<body>
<script>
window.location.href=window.location.protocol+"//"+window.location.host+'/项目名/login.jsp';

</script>
</body>
</html>

如果只想显示域名body中使用iframe

注意:这种方式进行跳转会有refer,如果有refer检测的话注意添加refer路径

二、http强制转换https

jboss/server/default/deploy/jboss-web.deployer/conf下web.xml新增

<security-constraint>
        <web-resource-collection>
            <web-resource-name>HtmlAdaptor</web-resource-name>
            <description>
                An example security config that only allows users with
                the role JBossAdmin to access the HTML JMX console web
                application
            </description>
            <url-pattern>/</url-pattern>
            <!-- <http-method>GET</http-method>
                <http-method>POST</http-method> -->
        </web-resource-collection>
        <!--<auth-constraint>
            <role-name>JBossAdmin</role-name>
            </auth-constraint> -->
        <user-data-constraint>
            <description>Protection should be CONFIDENTIAL</description>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

三、https下websocket消息推送

websocket消息推送在http下使用ws://协议,https下使用wss://协议,如果使用jboss发布服务,Tomcat发布websocket,注意使用相同ssl证书,并且使用域名连接

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

牟云飞

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值