Thanks for the response Doug. Can you describe how to do this remotely? I tried renaming 'context.xml' to 'servlet#myservlet.xml' in the WAR file, but as I expected the deployer did not find the file. I'm not sure where this is described in the documentation, the only significant item I could find was...
"You may define as many Context elements as you wish. Each such Context MUST have a unique context path, which is defined by the path attribute." ...and... "Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file." ...but neither mention the usage of the '#' character or that the 'path' attribute is ignored and the name of the WAR file is used instead as the context path. I am pretty sure this is the case because I just changed my 'context.xml' file to... ... <Context path="/something-other-than-myservlet" reloadable="true"> ... ...and when I deployed the servlet 'myservlet.war' Tomcat simply created a 'myservlet.xml' file and used 'myservlet' as the context path. To me it seems like a problem when the documentation discourages the inclusion of a <context> in the 'server.xml' file and yet does not respect the 'path' attribute in the <context> element. So my question remains... Is there a workaround for this problem that will allow me to deploy my web application using the deployer when my web application context path needs to be '/servlet/myservlet'? Yes, the context NEEDS to be '/servlet/myservlet'! Bernard Durfee -----Original Message----- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 6:17 PM To: Tomcat Users List Subject: Re: Major bug in deployer!! This is the default action of the 5.5 path and is noted on the context documentation. The way to fix this is to name the context.xml as servlet#myservlet.xml Doug ----- Original Message ----- From: "Durfee, Bernard" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[email protected]> Sent: Thursday, January 20, 2005 10:48 AM Subject: Major bug in deployer!! I am trying to use the Tomcat manager to deploy a web application packed in a WAR file. In my WAR file I have a directory named 'META-INF' and in that directory I have a file named 'context.xml'. The 'context.xml' file looks like... <?xml version="1.0" encoding="UTF-8"?> <Context path="/servlet/myservlet" reloadable="true"> ... </Context> ...so I am telling Tomcat to send all URLs ending with '/servlet/myservlet' to the web application being deployed. I do a browse, point to the WAR file and then press 'Deploy'. Tomcat then copies the WAR file to '/webapps' and copies the 'context.xml' file to 'conf/.../myservlet.xml'. So far so good. Now when I go to the manager listing the web applications I see '/myservlet' in the 'Applications' column. Uh oh! Seems that the 'path' attribute in the 'context.xml' file is being completely ignored! So right now I am forced to put the <Context> element in the 'server.xml' file directly, in which Tomcat respects the 'path' attribute. So my question is... Is there a workaround for this problem that will allow me to deploy my web application using the deployer when my web application context path needs to be '/servlet/myservlet'? Yes, the context NEEDS to be '/servlet/myservlet'! I have tried this in 5.5.4, 5.5.6 and 5.5.7 with the same results. The deployer would make life on our network admin MUCH easier because I would be able to deploy new versions of the web application without bugging him to install them manually. Thanks in advance!! Bernard Durfee --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
