Automatic jsp recompile on Jboss AS 7

Most of the applications I work on are based on jsp's and usually run on Jboss AS of various versions. And even though the newer applications are maven based and run on Jboss AS 7, almost nothing have changed in a matter of development. At least I thought that nothing have changed, but that was only because my carelessness.
When you are developing web tier, there is no compiler telling you what is wrong in the real time, you depend on syntax validation only. And that enables you to do a lot of small mistakes that usually end up with error 500 and a need to redeploy the application.
But this is the case only until you discover the right configuration!
We are currently using Jboss AS 7.1.1.Final as our target runtime, but as soon as I have searched for automatic jsp recompiling, I found a known issue which affects the very same version.
This leaves you with a handful of solutions. These are the ones I find viable.
  • use the version 7.1.0.Final for development
  • use the version 6.1.0 Alpha (EAP alpha built from AS7)
  • modify your Jboss 7.1.1.Final according to this post
I personally chose to use EAP 6.1.0 Alpha, mostly because I did not wanted to use older version (7.1.0.Final) and I prefer not to tamper with core server libraries. And I generally assume that newer is better. EAP 6.1.0 Alpha corresponds to Jboss AS version 7.2.0.Alpha and I have not found any compatibility issues yet. And if you are wondering why I have not chosen the version 6.1.0 Final, it is because only the Alpha is easily downloadable (without registration).

Now the configuration itself. You can either edit standalone.xml or you can use the server's web console.

Manual standalone.xml edit. You just need to insert these three lines into subsystem "urn:jboss:domain:web". This configuration is nearly the same whether you chose Jboss AS 7.1.x or EAP 6.1.0 (the only difference is the version of the subsystem: EAP 6.1 runs 1.4 while AS 7.1.x runs 1.1).
<!-- the next line already exists -->
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">
<configuration>
   <jsp-configuration development="true" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/>
</configuration>

Web console approach is a bit easier and more transparent. The only thing you need is an user with web-console access. Than is is only a matter of a few steps.
  1. select the Profile tab on top
  2. select the Web in the menu on the right
  3. select Servlet/HTTP
  4. click Edit button
  5. check the Development? checkbox
  6. (optional) under the Advanced choose a custom Check Interval
  7. click Save button
  8. restart/reload the server

That's it! All you need to do now is to start up the server and modify your jsp's all you want without the need for the redeployment. Cheers!

Comments

  1. I am using jboss-as-7.1.1 and after making the changes it is not working.

    ReplyDelete
    Replies
    1. Hey, are you sure you have done what http://mobiarch.wordpress.com/2013/02/22/configure-automatic-publishing-from-eclipse-for-jboss-as-7/ suggests? Modifications in my post apply only to EAP 6.1.0 Alpha. If you want to use jboss-as-7.1.1, you have to replace one library as mobiarch propose.

      Delete
  2. Great Article on JSP recompile. DO you have any article on JSF compilation process please

    Java EE online training | Java Training in Chennai

    ReplyDelete
  3. Nice Info Regarding Automatic jsp recompile on Jboss AS 7 My sincere thanks for sharing this post Please Continue to share this post
    Java Training in Chennai

    ReplyDelete
  4. I am really happy to found such a helpful and fascinating post that is written in a good manner. Thanks for sharing such an informative post.
    Java Training in Chennai
    Best Java Training Center in Chennai

    ReplyDelete
  5. Hi, I am a big follower of your blog. Really very informative post you shared here. Keep sharing this type of informative blog. Waiting for your next update. If anyone wants to become a Java professional learn Java Training in Bangalore. Nowadays Java has tons of job opportunities for all professionals.

    ReplyDelete
  6. Great Article… I love to read your articles because your writing style is too good, it is very very helpful for all of us and I never get bored while reading your article because,
    Java Training in Chennai
    Devops Training in Bangalore

    ReplyDelete
  7. The share you really give us excitement. Thanks for your sharing. If you feel tired at work or study try to participate in our games to bring the most exciting feeling. Thank you!Python Online Training | Learn Python Online

    ReplyDelete
  8. Automatic jsp recompile on Jboss AS 7 : This Blog is Just Awesome with rare details thank you For sharing the details.
    Devops Training in Bangalore

    ReplyDelete
  9. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.

    Best AWS training in bangalore

    ReplyDelete
  10. Hi
    I dont find this line <subsystem xmlns="urn:jboss:domain:web:1.4" on jboss7.0. can any one pls point out where can i find that tag in standalone.xml


    Thanks
    Ravi S.P

    ReplyDelete

  11. Best Solidworks training institute in noida

    SolidWorks is a solid modeling computer-aided design (CAD) and computer-aided engineering (CAE) computer program that runs on Microsoft Windows. SolidWorks is published by Dassault Systems. Solid Works: well, it is purely a product to design machines. But, of course, there are other applications, like aerospace, automobile, consumer products, etc. Much user friendly than the former one, in terms of modeling, editing designs, creating mechanisms, etc.
    Solid Works is a Middle level, Main stream software with focus on Product development & this software is aimed at Small scale & Middle level Companies whose interest is to have a reasonably priced CAD system which can support their product development needs and at the same time helps them get their product market faster.

    Company Address:

    WEBTRACKKER TECHNOLOGY (P) LTD.
    C-67,Sector-63,Noida,India.

    E-mail: info@webtracker.com

    Phone No: 0120-4330760 ,+91-880-282-0025


    http://webtrackker.com/solidworks-training-Course-institute-in-noida-delhi.php

    Best Solidworks training institute in noida

    ReplyDelete
  12. Artificial intelligence Training in noida
    Artificial intelligence Training in noida-Artificial Intelligence Training in Noida, Artificial Intelligence Training classes in Noida, Artificial Intelligence Training classes in Noida, Artificial Intelligence Training

    by Real time ARTIFICIAL INTELLIGENCE Experts, Big-Data and ARTIFICIAL INTELLIGENCE Certification Training in Noida



    WEBTRACKKER TECHNOLOGY (P) LTD.
    C - 67, sector- 63, Noida, India.
    F -1 Sector 3 (Near Sector 16 metro station) Noida, India.

    +91 - 8802820025
    0120-433-0760
    0120-4204716
    EMAIL: info@webtrackker.com
    Website: www.webtrackker.com



    Our Other Courses:


    artificial intelligence Training in noida

    SAS Training Institute in Delhi

    SAS Training in Delhi

    SAS Training center in Delhi

    Sap Training Institute in delhi

    Sap Training in delhi

    Best Sap Training center in delhi

    Best Software Testing Training Institute in delhi

    Software Testing Training in delhi

    Software Testing Training center in delhi

    Best Salesforce Training Institute in delhi

    Salesforce Training in delhi

    Salesforce Training center in delhi

    Best Python Training Institute in delhi



    Python Training in delhi


    Best Android Training Institute In delhi


    Best Python Training center in delhi


    Android Training In delhi


    best Android Training center In delhi

    ReplyDelete
  13. Data science Training Institute in Noida

    Webtrackker Data science Training Institute in Noida Accelerate your career in data science by starting from basics in Statistics, Data Management and Analytics to advanced topics like Neural Networks, Machine Learning and Big Data.



    http://webtrackker.com/Best-Data-Science-Training-Institute-in-Noida.php



    Data science Training Institute in Noida






    Our Other Courses:

    SAS Training Institute in Delhi
    SAS Training in Delhi

    SAS Training center in Delhi
    Sap Training Institute in delhi
    Best Sap Training center in delhi
    Sap Training in delhi
    Best Software Testing Training Institute in delhi
    Software Testing Training in delhi

    Software Testing Training center in delhi


    Best Salesforce Training Institute in delhi
    Salesforce Training in delhi
    Salesforce Training center in delhi
    Best Python Training Institute in delhi
    Python Training in delhi
    Best Python Training center in delhi
    Best Android Training Institute In delhi
    Android Training In delhi
    best Android Training center In delhi


    ReplyDelete
  14. 3D Animation and Multimedia Training in Noida
    Best institute for 3d Animation and Multimedia Course training Classes in Noida- webtrackker Is providing the 3d Animation and
    Multimedia training in noida with 100% placement supports. for more call - 8802820025.
    3D Animation and Multimedia Training in Noida
    Company Address:
    Webtrackker Technology
    C- 67, Sector- 63, Noida
    Phone: 01204330760, 8802820025
    Email: info@webtrackker.com
    Website: http://webtrackker.com/Best-institute-3dAnimation-Multimedia-Course-training-Classes-in-Noida.php

    ReplyDelete
  15. Graphics designing training institute in Noida
    Best Graphics training institute in Noida, Graphic Designing Course, classes in Noida- webtrackker is providing the graphics training in Noida with 100% placement supports. If you are looking for the Best Graphics designing training institute in Noida For more call - 8802820025.

    Graphics designing training institute in Noida, Graphics designing training in Noida, Graphics designing course in Noida, Graphics designing training center in Noida

    Company address:
    Webtrackker Technology
    C- 67, Sector- 63, Noida
    Phone: 01204330760, 8802820025
    Email: info@webtrackker.com
    Website: http://webtrackker.com/Best-institute-for-Graphic-Designing-training-course-in-noida.php

    ReplyDelete
  16. Webtrackker Technology is IT Company and
    also providing the Solidwork training in
    Noida at running project by the real time
    Webtrackker Technology
    C- 67, Sector- 63 (Noida)
    Phone: 0120-4330760, 8802820025
    8802820025
    http://webtrackker.com/solidworks-training-Course-institute-in-noida-delhi.php

    ReplyDelete

Post a Comment

Popular posts from this blog

Ldap security for Jenkins CI

Simple EJB Arquillian test based on JUnit running on managed JBoss AS 7