JBoss配置

                          JBOSS6入门配置

公司项目中使用了jboss,具体版本 jboss6.1.0.Final

 

  1. 设置端口 

      修改 jbossweb.sar/server.xml;将默认的8080端口 修改成自己需要的端口

          <Connector protocol="HTTP/1.1" port="8080" address="0.0.0.0" 
         redirectPort="${jboss.web.https.port}" URIEncoding="UTF-8"/>

    2.支持中文 

           在上面的配置信息中添加 URIEncoding="UTF-8"(蓝色部分),即可支持URL中出现中文

     3. 设置 URL 大小不敏感 。

        修改 jbossweb.sar/context.xml 文件,增加如下着色部分,即可实现对图片和其他静态资源的不区分大小写的访问,但是jsp的访问还是严格需要区分大小写。

<Context cookies="true" crossContext="true"  allowLinking="true"  caseSensitive="true">

   4.设置默认项目

       第一步:在需要设置的项目中的web-inf 下面添加文件jboss-web.xml

        主要内容如下:

            <jboss-web>
               <context-root>/</context-root>
               <virtual-host></virtual-host>
            </jboss-web>

        第二步: 将server\default\deploy\下的ROOT.war 改为小写的root.war

        第三步:启动或重启JBOSS

 

 

 JBOSS的配置信息最好还是去jboss官方网站查询

In JBoss AS 5, allowLinking="true" as <Context cookies="true" crossContext="true" allowLinking="true"> in context.xml placed at  jboss-5.0.0.GA\server\default\deploy\jbossweb.sar.




caseSensitive 
If the value of this flag is true, all case sensitivity checks will be disabled. If not specified, the default value of the flag is true.


NOTE: This flag MUST NOT be set to false on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.


allowLinking 
If the value of this flag is true, symlinks will be allowed inside the web application, pointing to resources outside the web application base path. If not specified, the default value of the flag is false.


NOTE: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems. 

                                                       JBoss端口修改

Jboss6端口修改

推荐方式:

1.进入 %JBOSS_HOME%\server\default\conf\bindingservice.beans\META-INF

2. 编辑 bindings-jboss-beans.xml

3. 搜索 “8080″ ,格式如下:

<bean class=”org.jboss.services.binding.ServiceBindingMetadata”>
<property name=”serviceName”>jboss.web:service=WebServer</property>
<property>HttpConnector</property>
<property>8080</property>
<property>JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets</property>
</bean>

简易方式:

1.进入 boss-6.0.0.Final\server\default\deploy\jbossweb.sar

2. 编辑 server.xml

3. 搜索 “8080″ ,格式如下:

<Connector protocol=”HTTP/1.1″ port=”${jboss.web.http.port}” address=”${jboss.bind.address}”

redirectPort=”${jboss.web.https.port}” />

address默认为127.0.0.1,局域网不能访问,或指定-b 0.0.0.0,或在这里修改为0.0.0.0就能访问了。

最后都需要重启jboss服务器

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值