Tomcat auto-redeploy for all copied resources?

Hi,

I am running a local tomcat instance with the Intellij 9 plugin. Whenever I copy a resource like a JSP or .js file (Command+Shift+F9 'Package file').

This is not necesarry, takes time and looses the websession.

It seems to be caused by intellij, since I can go to the filesystem and touch a JSP file without any redeployment occuring.

Can this behaviour be disabled?

Thanks,

-dennis

14 comments

Do you have 'Update resources on frame deactivation' option enabled in your Tomcat run configuration?

Hi,

I am running a local tomcat instance with the Intellij 9 plugin. Whenever I copy a resource like a JSP or .js file (CommandShiftF9 'Package file').

This is not necesarry, takes time and looses the websession.

It seems to be caused by intellij, since I can go to the filesystem and touch a JSP file without any redeployment occuring.

Can this behaviour be disabled?

Thanks,

-dennis

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



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

0

No, this setting is not enabled. And "Perform on update action" is set to update resources (not redeploy).

It must be possible to instruct intellij to not redeploy when files are packaged?

Thanks,

-dennis

0

Works fine for me (in bot Tomcat 5 and 6).
How does your context.xml look like? Do you have by chance set the context to "reloadable"?
IIRC in that case Tomcat automatically redeployes the app.

0

Sorry I only read your note about touching files on the file system, later...


0

'Package File' action just copies selected file to the corresponding output folder. IDEA doesn't invoke redeployment on this action. Could you please
attach your project files?

No, this setting is not enabled. And "Perform on update action" is set to update resources (not redeploy).

It must be possible to instruct intellij to not redeploy when files are packaged?

Thanks,

-dennis

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



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

0

Here are the project files. I still have the problem.

-dennis



Attachment(s):
hestar.dk.ipr.zip
hestar.dk.iml.zip
0

Which artifact do you mark for deployment in Tomcat run configuration: exploded or war archive?

Here are the project files. I still have the problem.

-dennis

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



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

0

I am deploying the "hestar.dk:war exploded" artifact.

Thanks,

-dennis

0

May be you have installed some third-party packaging plugin? What message is shown at the status bar after you invoke 'Package File' action: 'File has
been packaged' or something else?

I am deploying the "hestar.dk:war exploded" artifact.

Thanks,

-dennis

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



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

0

Status bay displays:

File 'index.jsp' has been packaged at 12:11:38 PM.

I don't think I have any special plugins that should affect tomcat deployment. It seems that something is infact asking tomcat to redeploy?

-dennis

0

Hi,

I now researched further and found the following in caches/tomcat/Unnamed_webapp_xxxxx directory:

conf/server.xml has autoDeploy="true"
conf/server.xml.0 has autoDeploy="false"

Where do these files come from, and/or how are they modified from my standard tomcat configuration?

Thanks,

-dennis

0

server.xml file is copied from Tomcat installation and patched by IDEA. server.xml.0 file is a backup copy.
IDEA indeed set 'autoDeploy' attribute to 'true'. However it shouldn't cause redeployment unless you modify web.xml or context.xml file.

Hi,

I now researched further and found the following in caches/tomcat/Unnamed_webapp_xxxxx directory:

conf/server.xml has autoDeploy="true"
conf/server.xml.0 has autoDeploy="false"

Where do these files come from, and/or how are they modified from my standard tomcat configuration?

Thanks,

-dennis

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



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

0

I found the problem:

When I package files they are copied to my maven target directory. Both in the webapp folder and in the webapp war file.

The war file then changes timestamp, en even though it is not deployed, tomcat is watching it:

Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources FINE: Checking context[] redeploy resource /Users/dth/Library/Caches/IntelliJIdea90/tomcat/Unnamed_hestar_dk36dabba9/conf/Catalina/localhost/ROOT.xml Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources FINE: Checking context[] redeploy resource /projects/hestar/target/hestar.dk-1.0-SNAPSHOT Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources FINE: Checking context[] redeploy resource /projects/hestar/target/hestar.dk-1.0-SNAPSHOT.war Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context []



Any suggestions welcome

-dennis
0

Looks like Tomcat watches war file because its name matches to the deployed exploded directory name. Try to change output path for the war artifact
(e.g. put it into some subfolder).

I found the problem:

When I package files they are copied to my maven target directory. Both in the webapp folder and in the webapp war file.

The war file then changes timestamp, en even though it is not deployed, tomcat is watching it:

 FINE: Checking context[] redeploy resource /Users/dth/Library/Caches/IntelliJIdea90/tomcat/Unnamed_hestar_dk36dabba9/conf/Catalina/localhost/ROOT.xml
> Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources
> FINE: Checking context[] redeploy resource /projects/hestar/target/hestar.dk-1.0-SNAPSHOT
> Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources
> FINE: Checking context[] redeploy resource /projects/hestar/target/hestar.dk-1.0-SNAPSHOT.war
> Apr 21, 2010 4:07:10 PM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context []
> 
>  ]]>


Any suggestions welcome

-dennis

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



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

0

Please sign in to leave a comment.