Automatic re-compilation of JSPs and tags

Hi!

Thanks guys for a great product. I have recently switched from Eclipse 3.5 to IntelliJ IDEA 9.0.2 and I'm quite impressed, especially with the comprehensive syntax support and the tight Maven/Spring/Struts integration.

One thing I haven't figured out, though:

In Eclipse (with Tomcat or Jetty) I can save a JSP template and hit the refresh button in the browser, and the IDE has silently recompiled and deployed a new JSP class, so the change is displayed immediately in the browser.
I haven't figured out how to enable this in IntelliJ. The best I have come up with:

1. Save the JSP template
2. Run -> Update "Tomcat6" application (Command + F10)
3. Refresh the page in the browser

The step I want to avoid is of course the second one. Not that big of a deal in itself, but if you have to do this "extra" step a hundred times a day, it starts to become annoying.

Cheers,
Kloper

2 comments

Actually you can avoid the first step. When you invoke 'Update' action IDEA automatically saves changed files.

Hi!

Thanks guys for a great product. I have recently switched from Eclipse 3.5 to IntelliJ IDEA 9.0.2 and I'm quite impressed, especially with the comprehensive syntax support and the tight Maven/Spring/Struts integration.

One thing I haven't figured out, though:

In Eclipse (with Tomcat or Jetty) I can save a JSP template and hit the refresh button in the browser, and the IDE has silently recompiled and deployed a new JSP class, so the change is displayed immediately in the browser.
I haven't figured out how to enable this in IntelliJ. The best I have come up with:

1. Save the JSP template
2. Run -> Update "Tomcat6" application (Command + F10)
3. Refresh the page in the browser

The step I want to avoid is of course the second one. Not that big of a deal in itself, but if you have to do this "extra" step a hundred times a day, it starts to become annoying.

Cheers,
Kloper

---
Original message URL: http://www.jetbrains.net/devnet/message/5257279#5257279



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I knew this worked fine for Weblogic but I had never tested it with Tomcat so didn't want to respond that it works until I had tested it with Tomcat. I have now tested this with Tomcat and it works fine. I can just make changes to a JSP and then leave intelliJ, refresh my browser and it is there.

1) This only works when you are running with a Debug Configuration (i.e. start the Debugger, can't just Run the app).
2) Go to File->Settings->Compiler (under Project Settings), in the "Deploy web applications to serer after compilation" make sure "Never" is selected
3) Go to File->Settings->Debugger (under IDE Settings)->HotSwap, make sure Make project before reloading calsses and reload classes in background is selected. Also for Reload classes after compilation make sure "Always" is selected.
4) In your debugger configuration there is an option called "Build on frame deactivation", select that (it is not selected by default).

Now when you switch to your browser IntelliJ will be making (it saves before the make so no need to manually save) and copying out your changed JSP's (as well as hot swapping any changed classes).

If you still have problems just post back, there are a couple of other things I can have you check.

Screen shot 2010-02-25 at 10.21.51 AM.png
Screen shot 2010-02-25 at 10.22.17 AM.png
Screen shot 2010-02-25 at 10.22.50 AM.png

0

Please sign in to leave a comment.