Tomcat auto-redeploy for all copied resources? Follow
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
Please sign in to leave a comment.
Do you have 'Update resources on frame deactivation' option enabled in your Tomcat run configuration?
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
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
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.
Sorry I only read your note about touching files on the file system, later...
'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?
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Here are the project files. I still have the problem.
-dennis
Attachment(s):
hestar.dk.ipr.zip
hestar.dk.iml.zip
Which artifact do you mark for deployment in Tomcat run configuration: exploded or war archive?
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I am deploying the "hestar.dk:war exploded" artifact.
Thanks,
-dennis
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?
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
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
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
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.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
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:
Any suggestions welcome
-dennis
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).
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"