JSP hot deploy to exploded directory

Apologies in advance if this is already answered somewhere, but I havent yet found an answer.

I'm working on a medium-sized enterprise web application (Servlet 2.5, JSP 2.1, Java 1.5, Spring/MVC, Tomcat 6) and have been pleasantly surprised by how much more productive the environment is compared to Eclipse. I have one nagging issue, however, and I haven't been able to track down a fix.

I'm running IDEA 7.0M1a on a Mac Pro.

I previously used eclipse with the MyEclipse IDE plugin for development. In that environment, when I made a change to a JSP and saved it, the JSP would be automatically copied over to the exploded app directory. With IDEA, I find myself having to manually copy files over when I've changed them, which (obviously) slows things down. The re-deploy button is not acceptable in my case, as the container takes some time to re-load (for various reasons I run with verbose logging while debugging).

Is there a way to configure IDEA to automatically copy JSPs over to the exploded directory when they are saved? This would help a great deal.

3 comments

In IDEA you never have to save yourself. Files are saved automatically
when they have to. What you need in your case is to 'compile' the file,
which means it gets copied into the correct location (after being saved
automatically). So your workflow should be: edit, Ctrl+F9, test.

Steve Davidson wrote:

Apologies in advance if this is already answered somewhere, but I havent yet found an answer.

I'm working on a medium-sized enterprise web application (Servlet 2.5, JSP 2.1, Java 1.5, Spring/MVC, Tomcat 6) and have been pleasantly surprised by how much more productive the environment is compared to Eclipse. I have one nagging issue, however, and I haven't been able to track down a fix.

I'm running IDEA 7.0M1a on a Mac Pro.

I previously used eclipse with the MyEclipse IDE plugin for development. In that environment, when I made a change to a JSP and saved it, the JSP would be automatically copied over to the exploded app directory. With IDEA, I find myself having to manually copy files over when I've changed them, which (obviously) slows things down. The re-deploy button is not acceptable in my case, as the container takes some time to re-load (for various reasons I run with verbose logging while debugging).

Is there a way to configure IDEA to automatically copy JSPs over to the exploded directory when they are saved? This would help a great deal.

0


Hello Martin,

Your reply is correct. To be clear, message below is about a potential new
feature.

Recent versions of Tomcat (>=5.5) and Jetty (>=5) can be configured to load
classes, jsps and libs from custom locations.
(See for exampes the Maven Jetty task, and for Tomcat, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=124914)

I don't know what the ratio of Jetty/Tomcat users is vs WS/WL/JB, but I think
getting rid of exploded directory (and all the copying) would be very nice.
What do you think?

Regards,

Taras


0

I found a plugin that accomplishes what I was looking for. The "Auto Package" plugin copies JSPs and other web artifacts to the exploded directory in the background without any manual intervention. Just what I wanted.

For posterity's sake, the plugin info page is here: http://www.intellij.org/twiki/bin/view/Main/AutoPackage

Wouldn't compile potentially update web.xml forcing a container reload? I'd definitely want to avoid that - reloads take a good deal of time in this project (at least with debug logging enabled)

Thanks for the reply. I'm just getting back into IDEA after being forced to use eclipse for several years, and it's extremely nice though I'm having to un-learn some "bad" eclipse habits.

0

Please sign in to leave a comment.