I am developing an application with SpringMVC and Tomcat using Eclipse. The problem is: the server does not update the changes I am making.
One example:
@RequestMapping(value = "test", method = RequestMethod.GET)
public ModelAndView test(){
ModelAndView mv = new ModelAndView("test");
System.out.println("test");
return mv;
}
Every time I hit the mapped url, Eclipse prints test in my console. If I comment out the println
, I get the same result.
Attempts to fix the problem:
All to no effect. It just looks like Tomcat is not updating any changes I make in the code.
To make Eclipse Tomcat update automatically or hot deploy you have to make certain changes in server configuration:
Below are the steps:
Double clicks on the Tomcat Server
, refer to "publishing"
tab in the "Overview"
view, make sure "Automatically publish when resources change"
is selected. This should be the default option, to support “hot deploy”
resources, for example : JSP, XML and properties files.
In the Tomcat Plugin page, click on the "Modules"
view, Select the Module then click on Edit button and make sure "Auto Reload"
is "Disabled"
. Default is enabled.
Start Project in DEBUG
mode. Hot Deploy is supported in DEBUG mode only.
Two more things to check:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With