RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
It isn't beyond the realm of possibility that I am doing something stupid. This is what I did. Whilst looking into bug11682 I created a very simple web app (just index.jsp) made a war and then tried to deploy it via ant. I modified the build.xml from the manager how-to and added the task below. When using the deploy target, the results were as described previously. The root cause of the problem is that ExpandWar.expand doesn't do anything if the context path is an empty string. Hope this clarifies things. Mark target name=deploy description=Deploy web application deploy url=${url} username=${username} password=${password} path= war=file:///C:\\javadev\\bugsopen\\bug11682\\build\\bug11682.war / /target On Wednesday, January 07, 2004 5:35 AM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Mark Thomas wrote: When I tested the deploy task, the behaviour I saw was that the original codedocBase = ExpandWar.expand(host, war, contextPath)code; failed to create any files at all in the webapp directory. The root context _was_ displayed in the manager app but when I tried to access it all I saw was a directory listing for the webapp directory. Hmmm, maybe, I still don't quite see the problem. Can I get an example of a deploy command which would fail ? Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
Mark Thomas wrote: It isn't beyond the realm of possibility that I am doing something stupid. This is what I did. Whilst looking into bug11682 I created a very simple web app (just index.jsp) made a war and then tried to deploy it via ant. I modified the build.xml from the manager how-to and added the task below. When using the deploy target, the results were as described previously. The root cause of the problem is that ExpandWar.expand doesn't do anything if the context path is an empty string. Hope this clarifies things. Mark target name=deploy description=Deploy web application deploy url=${url} username=${username} password=${password} path= war=file:///C:\\javadev\\bugsopen\\bug11682\\build\\bug11682.war / /target The idea is that when uploading a WAR, you'd have a .war with the right name, and no path attribute. Otherwise, you may have trouble after restarting. Maybe a context file gets saved in that case (this would avoid some of the trouble). I believe your war will get uploaded to webapps/bug11682.war, right ? The manager servlet should IMO be smart and rename your war to webapps/ROOT.war (this is simpler, and consistent with everything else, this way). I think I'll need to try it. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
What I found was the .war was uploaded to work\Standalone\localhost\bug11682 and then expanded to webapps. If I used a path of xyz then the .war was expanded to webapps\xyz regardless of the name of the .war Mark On Wednesday, January 07, 2004 8:41 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Mark Thomas wrote: It isn't beyond the realm of possibility that I am doing something stupid. This is what I did. Whilst looking into bug11682 I created a very simple web app (just index.jsp) made a war and then tried to deploy it via ant. I modified the build.xml from the manager how-to and added the task below. When using the deploy target, the results were as described previously. The root cause of the problem is that ExpandWar.expand doesn't do anything if the context path is an empty string. Hope this clarifies things. Mark target name=deploy description=Deploy web application deploy url=${url} username=${username} password=${password} path= war=file:///C:\\javadev\\bugsopen\\bug11682\\build\\bug11682.war / /target The idea is that when uploading a WAR, you'd have a .war with the right name, and no path attribute. Otherwise, you may have trouble after restarting. Maybe a context file gets saved in that case (this would avoid some of the trouble). I believe your war will get uploaded to webapps/bug11682.war, right ? The manager servlet should IMO be smart and rename your war to webapps/ROOT.war (this is simpler, and consistent with everything else, this way). I think I'll need to try it. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
Mark Thomas wrote: What I found was the .war was uploaded to work\Standalone\localhost\bug11682 and then expanded to webapps. If I used a path of xyz then the .war was expanded to webapps\xyz regardless of the name of the .war Ah ok. Nice :) (I didn't remember, but I did code that :) ) I think your patch is fine then. There is a second ExpandWar.expand which could use the same patch as well. I don't know if it's actually used, but it would be good to fix it anyway. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
OK, will do. Mark On Wednesday, January 07, 2004 9:52 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Mark Thomas wrote: What I found was the .war was uploaded to work\Standalone\localhost\bug11682 and then expanded to webapps. If I used a path of xyz then the .war was expanded to webapps\xyz regardless of the name of the .war Ah ok. Nice :) (I didn't remember, but I did code that :) ) I think your patch is fine then. There is a second ExpandWar.expand which could use the same patch as well. I don't know if it's actually used, but it would be good to fix it anyway. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
[EMAIL PROTECTED] wrote: markt 2004/01/06 14:31:18 Modified:catalina/src/share/org/apache/catalina/core StandardHostDeployer.java Log: - Fix bug11682. Deploying a webapp to the root context via an Ant task when unpackWARs is true now behaves correctly. Are you sure this was actually broken ? Note that the install task is deprecated (deploy should be used instead), so no fix is needed for that. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
When I tested the deploy task, the behaviour I saw was that the original codedocBase = ExpandWar.expand(host, war, contextPath)code; failed to create any files at all in the webapp directory. The root context _was_ displayed in the manager app but when I tried to access it all I saw was a directory listing for the webapp directory. It was on this basis that I wrote the fix. Mark On Tuesday, January 06, 2004 10:41 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: markt 2004/01/06 14:31:18 Modified:catalina/src/share/org/apache/catalina/core StandardHostDeployer.java Log: - Fix bug11682. Deploying a webapp to the root context via an Ant task when unpackWARs is true now behaves correctly. Are you sure this was actually broken ? Note that the install task is deprecated (deploy should be used instead), so no fix is needed for that. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
Mark Thomas wrote: When I tested the deploy task, the behaviour I saw was that the original codedocBase = ExpandWar.expand(host, war, contextPath)code; failed to create any files at all in the webapp directory. The root context _was_ displayed in the manager app but when I tried to access it all I saw was a directory listing for the webapp directory. Hmmm, maybe, I still don't quite see the problem. Can I get an example of a deploy command which would fail ? Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]