[Eclipse] - Integrated JBoss7 heat load and automated publishing
When using Eclipse + JBoss development, always restart the project or JBoss, annoying. The following methods can be very simple to implement Eclipse + JBoss heat load and automatically published.
My environment is JBoss 7.1.1 Final
1) Download this: jboss-as-web-7.1.1.Final-RECOMPILE.jar
http://files.cnblogs.com/HD/jboss-as-web-7.1.1.Final-RECOMPILE.jar.zip
2) put the jar package into this directory: jboss-as-7.1.1.Final \ modules \ org \ jboss \ as \ web \ main
3) In this directory edit module.xml file:
<!--<resource-root path="jboss-as-web-7.1.1.Final.jar"/>--> <resource-root path="jboss-as-web-7.1.1.Final-RECOMPILE.jar"/>
With this configuration, the original sentence comment, use the jar package.
4) Open the file: jboss-as-7.1.1.Final \ standalone \ configuration \ standalone.xml
Found this configuration:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"> : </subsystem>
Join this configuration:
<configuration> <jsp-configuration development="true"/> </configuration>
such as:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"> <configuration> <jsp-configuration development="true"/> </configuration> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> </virtual-server> </subsystem>
好了,现在jboss已经可以热加载jsp了。
接下来,eclipse的设置jboss了(eclipse集成jboss,可以看这里:http://www.cnblogs.com/HD/p/4000554.html)
1) 先修改eclipse jboss的server配置:
把publishing设置为:Automatically publish when resources change
2)禁用自动发布功能:
3) 一切就绪,运行jboss,使用debug模式运行,不要使用start
现在在项目中修改java文件、jsp文件,可以直接在浏览器看到结果了,不需要停止jboss再重新发布。