IDEA +tomcat, won't update the changes on javaFile when tomcat was restarted

83 views Asked by At

My question is that recently I have started a web project in IDEA, with some servlet filter. At first it was ok ,but today I've found my idea's hot deploy dosen't work again.

For example,when I changed servlet , I need to hit ctrl+shift+F9 to recompile and it will work automaticlly. Now it just run like I didn't change it, even restarted tomcat doesn't help.

Now the only way to update changes is to restart the IDEA whenever I alter java file, servlet, filter, listener, java bean,etc.

I have checked the output path, the class file did changed, the last modification date shows correctly,and I only had one output path.
I figure it is some thing to do with the project setting?

Here are some pictures of my project settings:
enter image description here

And also, whenever I creat a servlet or listener, it shows this weird thing in the Web windows below the Project explorer, like it was loading, sometimes it literally shows loading..., like this: enter image description here

When I recompile the Module,it shows
Warning: Output path D:\IDEADevelop\LittleBBS\web intersects with a source root. Only files that were created by build will be cleaned.

1

There are 1 answers

1
JimHawkins On

On the Project tab, replace
D:\IDEADevelop\LittleBBS\web\WEB-INF\classes with
D:\IDEADevelop\LittleBBS\out.

On the Modules tab, click the option Inherit project compile output path.

On the other tabs, ensure that the output directories are consistent to D:\IDEADevelop\LittleBBS\out