Configure Automatic Publishing from Eclipse for JBoss AS 7

By default, when you develop for JBoss 7 using Eclipse, changes to Java class and JSP don’t get automatically published. You have to right click the web module in the Servers view and select Full Publish for the changes to take effect. This can be really painful after a while. I found these steps to fix the problems.

Publish Java Class Changes

In Eclipse, double click JBoss server in the Servers view. Under Publishing select Automatically publish when resource changes. Under Application reload behavior, select Customize application reload behavior. Enter the following regular expression pattern.


Save changes and restart the server. Now, when you save a Java file, system will automatically restart the application so that the changes take effect.

Publish JSP Changes

This one takes a little more work. Essentially, JBoss 7.1.1 has a defect where changes to JSP file are not picked up by the server even in development mode.

First, we need to enable JSP debug mode. Open the server’s standalone.xml. Locate the line:

<subsystem xmlns="urn:jboss:domain:web:1.1" ...>

Below that add these lines:

 <jsp-configuration development="true"/>

Save and close the file.

Download the fixed jboss-as-web-7.1.1.Final-RECOMPILE.jar file from this web site. Save the file in jboss-as-7.1.1.Final/modules/org/jboss/as/web/main folder.

In the same folder there is a module.xml file. Open it. Comment out the buggy file and use the new file as shown below.

<resource-root path="jboss-as-web-7.1.1.Final.jar"/>
<resource-root path="jboss-as-web-7.1.1.Final-RECOMPILE.jar"/>

Save and close the file.

Restart the server. Now, changes to JSP will take effect immediately.





4 thoughts on “Configure Automatic Publishing from Eclipse for JBoss AS 7

  1. I’m using WildFly-8.1.0.CR2 and I tried the “development=true” trick and it worked perfectly. Thanks so much! I really appreciate tip. I cannot believe that in 2014 the topic of hot-deployment / republishing is still an issue. Anyway, below is exactly what I did:
    1) Edit the standalone\configuration\standalone.xml file
    2) Search for the following section of code:


    The only line which needs to be changed is:

    And now I can change a JSP file and immediately go back to my browser and refresh and the change is displayed.

    Note: I also tried the “.jar$|.jsp$ tip, this did work, but the problem is that the entire WAR file gets re-deployed which takes a few seconds (and is completely unnecessary) .

    ….. I also never thought in 2014 I’d be working with JSP pages, but one of our other developers quit and I got stuck with an old Struts 1 legacy app

  2. By the way, in JBoss EAP 6.2+, there isn’t a “<jsp-configuration development…" element, so this trick doesn't work. However, EAP 6 seems to be pretty good at auto publish.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.