jboss 4.2.3
在[jboss home]\server\default\deploy\jboss-web.deployer下找到server.xml
<Host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
>
之中加入
<Context path="/upload" docBase="D:/uploadfile" reloadable="true" override="true" crossContext="true"/>
另外,若想在tomcat中创建虚拟目录:
在[tomcat home]\conf\Catalina\localhost下创建一个upload.xml,内容为:
<?xml version="1.0" encoding="UTF-8"?>
<Context
docBase="D:/uploadfile"
reloadable="true"
debug="0">
</Context>
jboss 设置system property
在[jboss home]\server\default\deploy\properties-service.xml
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss:type=Service,name=SystemProperties">
<attribute name="Properties">
MY_DIR=c:/xxxxxx
</attribute>
</mbean>