{"id":2252,"date":"2015-05-19T21:30:41","date_gmt":"2015-05-19T09:30:41","guid":{"rendered":"http:\/\/www.zoyinc.com\/?p=2252"},"modified":"2015-05-19T21:30:41","modified_gmt":"2015-05-19T09:30:41","slug":"live-editing-of-a-war-in-jboss","status":"publish","type":"post","link":"http:\/\/www.zoyinc.com\/?p=2252","title":{"rendered":"Live editing of a war in JBoss"},"content":{"rendered":"<p>When I am writing some JSP or web app or similar I am a real fan of being able to edit a file and the changes get picked up by the application server immediately and I can see my changes quickly. Tomcat has done this for ages but now I need to develop in JBoss EAP and it didn&#8217;t seem to allow this.<\/p>\n<p>To deploy to a standalone instance of JBoss one way is to place your war file in:<\/p>\n<p style=\"padding-left: 30px;\">\\jboss-eap-6.1\\standalone\\deployments<\/p>\n<figure id=\"attachment_2256\" aria-describedby=\"caption-attachment-2256\" style=\"width: 238px\" class=\"wp-caption aligncenter\"><a  href=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit02.jpg\" class=\"thickbox no_icon\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2256 size-full\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit02.jpg\" alt=\"\" width=\"238\" height=\"361\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit02.jpg 238w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit02-99x150.jpg 99w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit02-198x300.jpg 198w\" sizes=\"auto, (max-width: 238px) 100vw, 238px\" \/><\/a><figcaption id=\"caption-attachment-2256\" class=\"wp-caption-text\">+ to enlarge<\/figcaption><\/figure>\n<p>Another is to create a directory which contains your exploded war, so something likeBut to make this deploy create a text file in the deployments directory called &#8220;myapp.war.deployed&#8221;. This will make JBoss realize it is an exploded deploy.<\/p>\n<p>Finally you need to start up JBoss and go to the management console and look for &#8220;Deployment Scanners&#8221;:<\/p>\n<figure id=\"attachment_2253\" aria-describedby=\"caption-attachment-2253\" style=\"width: 572px\" class=\"wp-caption aligncenter\"><a  href=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit01.jpg\" class=\"thickbox no_icon\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2253\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2015\/05\/jbossliveedit01.jpg\" alt=\"\" width=\"572\" height=\"452\" \/><\/a><figcaption id=\"caption-attachment-2253\" class=\"wp-caption-text\">+ to enlarge<\/figcaption><\/figure>\n<p>Once you have got to the above screen click on the &#8220;Edit&#8221; button in &#8220;Deployment Scanners&#8221; and enable &#8220;Auto-deploy exploded&#8221;, it is disabled by default. The &#8220;Scan interval (ms)&#8221; is how many milliseconds you need to wait until JBoss notices you have changed the file.<\/p>\n<p>Now you can edit files in &#8220;\\standalone\\deployments\\myapp.war&#8221; and almost instantly they will be live.<\/p>\n<p>One advantage of this is that the directory &#8220;myapp.war&#8221; can then be zipped up to a file called &#8220;myapp.war&#8221; and deployed as a genuine war file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I am writing some JSP or web app or similar I am a real fan of being able to edit a file and the changes get picked up by the application server immediately and I can see my changes quickly. Tomcat has done this for ages but now I need to develop in JBoss [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2259,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155],"tags":[294,292,291,293,309,290,157],"class_list":["post-2252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-application-server","tag-develop","tag-eap","tag-exploded-deploy","tag-java","tag-jboss","tag-jsp"],"_links":{"self":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2252"}],"version-history":[{"count":4,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2252\/revisions"}],"predecessor-version":[{"id":2258,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2252\/revisions\/2258"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/media\/2259"}],"wp:attachment":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2252"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}