zoukankan      html  css  js  c++  java
  • jboss 7.1.1 Final 的jsp热部署解决方案

    公司的网站系统使用的中间是jboss7.1.1 Final,由于有些数据和服务测试环境不具备,免不了要在测试环境调试些jsp页面,发现从jboss社区里下载的jboss应用有个问题,新增jsp页面会实时部署,修改过的jsp页面就无法正常部署。 
        最新查到了如下解决方式: 
    在jboss7standaloneconfigurationstandalone.xml文件中找到<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">做如下配置 

    Xml代码  收藏代码
    1. <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">             <configuration>                 <jsp-configuration development="true"/>             </configuration>             <connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>             <virtual-server name="default-host" enable-welcome-root="true">                 <alias name="localhost"/>                 <alias name="example.com"/>             </virtual-server>         </subsystem>   


    以打开开发模式。但是加上该代码后,发现不起作用。后面有到jboss社区里翻了无数帖子,发现了Tomaz Cerar如下描述: 
    in 7.1.1 we have included much reworked web subsystem but unfortunaly I missed a bit that coused all jsp configuration to be ignored. 
    That bug was fixed soon after 7.1.1 was released and is now part of 7.1.2 and 7.2.x development branch. 
    原味连接https://community.jboss.org/message/723813由此可见这是一个本版本的bug,说是要在后期修复的。但是为中间升级风险很大,很多业务都是基于老版本的开发的,为了稳妥,我想肯定有人不用通过升级已经解决了此问题。 
    灯火阑珊处,发现了答案: 
    1. Please make sure to add 
                <configuration> 
                    <jsp-configuration development="true"/> 
                </configuration> 
        in standalone.xml under <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">          

    2. Go to jboss-as-7.1.1.Final/modules/org/jboss/as/web/main 
       Place the jboss-as-web-7.1.1.Final-RECOMPILE.jar in there. You can download from http://www.datafilehost.com/download-2cb9ff04.html 

    3. Open module.xml (jboss-as-7.1.1.Final/modules/org/jboss/as/web/main) and add the following line 
            <!--resource-root path="jboss-as-web-7.1.1.Final.jar"/--> 
            <resource-root path="jboss-as-web-7.1.1.Final-RECOMPILE.jar"/> 
    叙述的都很简单,我就不翻译了 
    原文详见:https://community.jboss.org/message/723945#723945#723945 
    按照作者所讲的方法操作了,问题奇迹般解决了,当时由于jboss核心包被重新编译过了,是否存在什么隐患还有待深入测试。 
    另在附件中提供了解决方案提供者重新编译过的包,我测试了是没问题。 
    现与大家分享。

  • 相关阅读:
    hihoCoder #1062 : 最近公共祖先·一
    hihoCoder #1050 : 树中的最长路
    hihoCoder #1049 : 后序遍历
    108 Convert Sorted Array to Binary Search Tree 将有序数组转换为二叉搜索树
    107 Binary Tree Level Order Traversal II 二叉树的层次遍历 II
    106 Construct Binary Tree from Inorder and Postorder Traversal 从中序与后序遍历序列构造二叉树
    105 Construct Binary Tree from Preorder and Inorder Traversal 从前序与中序遍历序列构造二叉树
    104 Maximum Depth of Binary Tree 二叉树的最大深度
    102 Binary Tree Level Order Traversal 二叉树的层次遍历
    101 Symmetric Tree 判断一颗二叉树是否是镜像二叉树
  • 原文地址:https://www.cnblogs.com/martin-roger/p/5902452.html
Copyright © 2011-2022 走看看