Re: Hot redeploying a WAR - HTML is not refreshed
Thanks for the information. I know it is not the browser caching. I've tried both IE and Firefox, clearing all caches and refreshing. I did look more closely at what Tomcat is doing when it hot redeploys my WAR file. I'm using an unmodified copy of Tomcat to test this issue. So Tomcat deploys the new HTML files here: C:\apache-tomcat-6.0.18\webapps\war-file-name\ But it leaves the old HTML files here: C:\apache-tomcat-6.0.18\work\Catalina\localhost\war-file-name\ And the browser is getting the old HTML files. If I shut down the server, delete C:\apache-tomcat-6.0.18\work\, and restart the server, the browser sees the new HTML files. Is deleting the work directory standard practice for completely refreshing web content? I can't do it while Tomcat is accessing the files. Or is there a configuration option that will cause Tomcat to delete and recreate the work directories when redeploying? Again, thank you. Peter Desjardins - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hot redeploying a WAR - HTML is not refreshed
Those are excellent suggestions. Thanks. The other thing is that I cant actually recall ever seeing an HTML file in the work folder... I see stuff like... basic_002darithmetic_jsp.class basic_002darithmetic_jsp.java which is what it is used for... ie to hold the compiled JSP's... if you using HTML to describe JSP's then we already have crossed lines... Maybe this is causing the problem: the HTML files are wrapped up in JAR files. This is functionality of the Eclipse help system. You can wrap up all of your documentation content (HTML files, image files, tables of contents, ...) in a JAR file. This becomes a documentation plugin that the Eclipse application knows how to unpack and serve. So my HTML content is actually in here: C:\apache-tomcat-6.0.18\webapps\war-file-name\WEB-INF\eclipse\plugins\com.my.doc.plugin.name.jar C:\apache-tomcat-6.0.18\work\Catalina\localhost\war-file-name\eclipse\plugins\com.my.doc.plugin.name.jar Does the fact that my content is in a JAR file make a difference? Is there a different way that Tomcat handles redeploying JAR files? Also, there is no development environment on my computer. I am taking the WAR files from a separate build server and just trying to deploy and redeploy locally. Thank you. Peter Desjardins - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hot redeploying a WAR - HTML is not refreshed
Exactly how are you accomplishing this hot redeployment? Does Tomcat really shut down the application and reload it? I copy the new version of the WAR file into C:\apache-tomcat-6.0.18\webapps\, overwriting the old copy. Here's the log: Aug 14, 2008 3:45:05 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 14, 2008 3:45:05 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 559 ms Aug 14, 2008 3:45:05 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 14, 2008 3:45:05 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Aug 14, 2008 3:45:05 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-admin.war Aug 14, 2008 3:45:22 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-eped.war Aug 14, 2008 3:45:32 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-ps-mon.war Aug 14, 2008 3:45:42 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Aug 14, 2008 3:45:42 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Aug 14, 2008 3:45:42 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/32 config=null Aug 14, 2008 3:45:42 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 36795 ms * New versions of WAR files copied into C:\apache-tomcat-6.0.18\webapps Aug 14, 2008 3:46:42 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/nexus-5-0-ps-mon] Aug 14, 2008 3:46:50 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/nexus-5-0-admin] Aug 14, 2008 3:46:58 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/nexus-5-0-eped] Aug 14, 2008 3:47:05 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-admin.war Aug 14, 2008 3:47:16 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-eped.war Aug 14, 2008 3:47:25 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-ps-mon.war Since you're on a Windows box, you may want to experiment with the antiResourceLocking attribute of your webapp's Context element - but watch out for the caveats mentioned in the doc: This problem is occurring on two type of Linux server also. I'm just troubleshooting the problem on my Windows computer. Thanks! Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hot redeploying a WAR - HTML is not refreshed
Hi. I have a web application that consists of an online help system. It serves HTML content using the Eclipse user assistance system. The usage I need to support is that the help system WAR is running in Tomcat, we repackage a new version of the WAR with updated content (only new HTML pages, no new application functionality), and then hot redeploy the new WAR file. The hope is that users will see the new HTML content with minimal interruption of service. I am able to hot redeploy the new WAR files by overwriting the versions in the webapps directory. In the server log I can verify that Tomcat undeploys the old version and then deploys the new version. However, the HTML files that are being served are not updated. Tomcat serves the HTML pages from the previous WAR file. If I stop the server, replace the WAR files, delete the work directory, and restart the server, the HTML pages are refreshed. Is there a way to clear all the old content from the cache during a hot redeploy? Or is there any other way to serve the new HTML content without stopping the server? I am using Apache Tomcat Version 6.0.18, jdk1.5.0_14, and Windows XP. Thanks for your help. Peter Desjardins - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]