When using Eclipse + JBoss development, always restart the project or JBoss, annoying. The following methods can be very simple to implement Eclipse + JBoss unloading and automatic publishing.
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) Place this jar package in this directory: Jboss-as-7.1.1.final\modules\org\jboss\as\web\main
3) Edit the Module.xml file in this directory:
<!-- <resource-root path= "Jboss-as-web-7.1.1.final.jar"/> - < path= "Jboss-as-web-7.1.1.final-recompile.jar"/>
This configuration, comment the original sentence, use this jar package.
4) Open File: Jboss-as-7.1.1.final\standalone\configuration\standalone.xml
Find this configuration:
<xmlns= "urn:jboss:domain:web:1.1" default-virtual-server= " Default-host " native=" false ">:</Subsystem >
Join this configuration:
< Configuration > < Development= "true"/> </configuration >
Like what:
<Subsystemxmlns= "urn:jboss:domain:web:1.1"Default-virtual-server= "Default-host"native= "false"> <Configuration> <jsp-configurationDevelopment= "true"/> </Configuration> <connectorname= "http"Protocol= "http/1.1"Scheme= "http"socket-binding= "http"/> <Virtual-servername= "Default-host"Enable-welcome-root= "true"> <aliasname= "localhost"/> <aliasname= "example.com"/> </Virtual-server> </Subsystem>
Well, now JBoss is ready to hot-load the JSP.
Next, Eclipse's setup is JBoss (Eclipse integrated JBoss, as you can see here: http://www.cnblogs.com/HD/p/4000554.html)
1) First modify the server configuration of Eclipse JBoss:
Set Publishing to: Automatically publish when the resources change
2) Disable the Automatic publishing feature:
3) All ready, run JBoss, run with debug mode, do not use start
Now in the project to modify the Java files, JSP files, you can see the results directly in the browser, do not need to stop JBoss and re-publish.
[Eclipse]-integrated JBOSS7 unloading and auto release