Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 723
Tihom Avatar asked Apr 05 '11 21:04

Tihom


People also ask

How do I enable hot deployment in IntelliJ?

Go to the File –> Settings –> Debugger –> HotSwap and ensure that all checkboxes are checked and the radio button “Reload classes after compilation” is set to “Always”. As next step, click on the ” Edit Configurations…” and go to the configured server.

Can I use JSP in IntelliJ?

With Web Application support, IntelliJ IDEA: Creates a web resource directory web with index. jsp intended as a starting page of your app and, optionally, a web app deployment descriptor WEB-INF/web. xml.


1 Answers

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.

like image 114
cyanglee Avatar answered Sep 21 '22 05:09

cyanglee