This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Problem, when I change the code in the .java file, and recompile using javac to a new .class file, my browser still runs the old class code.
I am using tomcat, creating the code by editing a .java file, and compiling using javac into a .class file.
There is an associated web.xml file.
So far I have been told the following, related to how to solve the problem:
- Clear Browser Cache.
done, problem not on client side. I have tested this.
- Use a war file, because tomcat will accept the updates when exploding a war file.
I might do this later in the project, but not at this point in development
- restart the tomcat server.
Since iterative coding, where one runs the code to test what is there, followed by changes, and running the code again, is such a common practice, I find it hard to believe that there is not a much easier way to test changes.
Maybe some setting in tomcat?
Right now I either have to restart the tomcat process or test by renaming the class each time I change the code (which is tedious).
I am pretty certain it is a server side (not client side) issue, possibly tomcat cache.