Hot Deploy JSP after modification with Intellij 10.X and tomcat 6.X

Tihom picture Tihom · Apr 5, 2011 · Viewed 25k times · Source

I have a Hello-World application with one java class and one jsp. The JSP prints out some text that is embedded in the JSP and from the java class. (It prints out two things)

I followed the directions here to create and deploy my application and it (mostly) WORKS! I am able to invoke the JSP and it properly displays the page. I am also able to hotswap changes in the java class after I press the Intellij reload button.

Problem: If I change the JSP, it does not get reflected in the browswer.

I have verified the following:

  • web.xml in the Tomcat/conf directory does not override the "development" value. The default is true.
  • context.xml in both the HelloWorld\web\META-INF\context.xml and Tomcat\conf\context.xml has reloadable=true
  • That the JSP is copied from C:\code\HelloWorld\web\index.jsp to C:\code\HelloWorld\out\artifacts\HelloWorld_war_exploded\index.jsp on any change immediately
  • Its not a browser cache issue

any thoughts?

Answer

cyanglee picture cyanglee · May 3, 2011

I am using Intellij IDEA 10.0.3 and ran into the same issue. I resolved it by checking a setting - "Update resources on frame deactivation" in you tomcat server setting under the Run/Debug Configuration section. Hope this helps.