Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6039865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:25:54+00:00 2026-05-23T06:25:54+00:00

I want to be able to deploy code changes to Tomcat (near instantly), while

  • 0

I want to be able to deploy code changes to Tomcat (near instantly), while I’m developing in Eclipse.

So far, I have my output from Eclipse placing the built classes in the WEB-INF/classes folder of my web application.

I also have a reloadable context, with the web.xml as a watched resource. Any edit / save to this file does reload my web app, taking just over one second – much quicker than building a new war file and deploying it in full.

However, what I’d like to do is trigger the redeploy when I edit any source file. As the .class files are being modified in Tomcat, it seems I just need to monitor any changes in the WEB-INF/classes folder and it’s children.

I’ve read that I can add additional watched resources in Tomcat’s context.xml but this doesn’t seem to be quite what I need – unless it’s possible to specify a directory that will be watched (including recursively monitoring sub folders and files)?

<Context>
  <WatchedResource>WEB-INF/web.xml</WatchedResource>
  <WatchedResource>WEB-INF/someother.file</WatchedResource>
  <Manager pathname=""/>
</Context>

So essentially, my question is can I watch the entire classes folder (without including each WatchedResource explicitly) to trigger a redeploy in Tomcat?

If not, can I configure Eclipse to touch the web.xml file, whenever I save a source file in that project? I’m developing on a Windows system. 🙁


PS I’m not interested in the JRebel product. Any answer should be a free solution.


Update

According to the Tomcat documentation, the classes folder should be monitored by setting the context to reloadable:

Set to true if you want Catalina to
monitor classes in /WEB-INF/classes/
and /WEB-INF/lib for changes, and
automatically reload the web
application if a change is detected.

Only changes to the web.xml seem to trigger a reload. Is this a bug or is my setup incorrect?

Also, I’ve read about setting the docBase attribute for a given context:

docBase="webapps/someExample"

This appears to be close to what I need, as I could then republish in Eclipse quickly. My only problem is that I require several web apps / servlets to be running in Tomcat concurrently, on the same port etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:25:55+00:00Added an answer on May 23, 2026 at 6:25 am

    For these cases I set the eclipse build output to WEB-INF/classes as you have done and create a context file with the docBase set to the webapp folder (parent of WEB-INF) in the project. This is manually placed in conf/Catalina/localhost (assuming default configs for some elements of server.xml). End result is tomcat ends up serving from the development directory. So, change a servlet or other class and it is updated to the classes folder. Save a jsp and it is immediately available.

    If project structured like:

    src
    |-main
      |-webapp
        |-images
        |-js
        |-WEB-INF
          |-jsp
          |-classes
    

    Then context would be like:

    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/path" reloadable="true" 
        docBase="<pathtoproject>/src/main/webapp" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to generate PDF output from my (native) C++ Windows
I want to be able to get an estimate of how much code &
I want to be able to get an estimate of how much code &
I want to be able to build a war file and deploy it in
I want to be able to quickly deploy updates to a site that is
If all tables I want to delete from have the column gamer_id can i
I am developing a web app and want to be able to stagger the
We want to be able to deploy our project using Hudson, but the build
I want to be able to capture the exception that is thrown when a
I want to be able to do: For Each thing In things End For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.