3

My IntellijIdea 15 successfully reflect the changes of Java file on run time web application in Debug mode but unable to reflect changes on JSP, JavaScript.

Here is the Changes

Here is the Debug mode Hot swap option changes

Can anyone suggest what is missing something that's unable to changes in debug mode ? because I research a lot on Google but could not solve my problem.

Thanks in Advance

**Note ** I already follow https://www.mkyong.com/intellij/intellij-idea-auto-reload-a-web-application-hot-deploy/ but its does not work

Yasir Shabbir Choudhary
  • 2,458
  • 2
  • 27
  • 31

1 Answers1

0

I see a few possibilities...

The update action differs for run versus debug actions (since the debugger is attached to the VM and has to be taken into account) The IntelliJ IDEA help guide notes this difference regarding classes:

In the debug mode, the updated classes are hot-swapped. In the run mode, IntelliJ IDEA just updates the changed classes in the output folder. Whether such classes are actually reloaded in the running application, depends on the capabilities of the runtime being used.

Unfortunately it does not indicate either way if JSPs or static pages differ in their handling. If you do not have the issue when you run, but do when you debug, then that is likely the case.

Also keep in mind that JSPs are a strange beast. The Web container compiles them into Servlets. Not all web containers will see a change to the JSP page and recompile the Servlet. It's been a long time since I've worked with JSPs, but if I recall Tomcat can be configured to recognize a changed JSP page and recompile it. I do not recall the default behavior.

Finally, when the debugger is attached, the web container's behavior may differ than from when it is not attached.

You can also look at this SO answer -- https://stackoverflow.com/a/19609115/1348743 -- to see if there is anything you missed in your configuration.

Community
  • 1
  • 1
Javaru
  • 30,412
  • 11
  • 93
  • 70