JonnyRaa
JonnyRaa

Reputation: 8038

How do you redeploy javascript in Idea when using a Tomcat configuration

I'm working on a java/javascript webapp that runs on tomcat.

We're working with IDEA and I've managed to get debugging set up for both the client and server code at the same time, which is great. I did have hot redeployment of the javascript set up when running Tomcat manually, however I find when running Tomcat through IDEA this doesnt work as it's setting stuff up somewhere in my users folder.

I was going to just set up a deployment configuration to go to that folder but I can't see any of the javascript files in there.

Is it possible to get the best of both worlds and have debugging and automatic deployment working together?

Update

Here's my config:

I'm using maven to build a specific profile rather than using 'build war exploded'. I suspect the latter wont work to build as quite a lot of custom properties need supplying by maven at compile time.

I also now have war exploded set in start up in deployment.

enter image description here

Upvotes: 3

Views: 819

Answers (2)

JonnyRaa
JonnyRaa

Reputation: 8038

It turns out I was having problems because I had antiResourceLocking=true in my tomcat context.xml config file.

I had switched this on as I was having problems with things hanging onto the war files and stopping recompilation.

changing to use antiJARLocking="true" instead seems to have solved both problems. Redeployment is now working in idea and I'm not experiencing problems with things holding files open

Upvotes: 2

user3145373 ツ
user3145373 ツ

Reputation: 8156

In Run - >Edit Configurations -> select tomcat instance.

then on update action : restart option

and in deployment tab instead of war use war exploded.

Now click on green button for run project it will ask option then select update resources and ok then refresh your page it will show change.

Keep one thing in mind that clear the cache.

Here is a screenshot :

enter image description here

Upvotes: 3

Related Questions