Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 22299 invoked from network); 23 Sep 2009 09:56:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Sep 2009 09:56:00 -0000 Received: (qmail 19129 invoked by uid 500); 23 Sep 2009 09:55:59 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 19033 invoked by uid 500); 23 Sep 2009 09:55:59 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 19012 invoked by uid 99); 23 Sep 2009 09:55:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2009 09:55:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2009 09:55:56 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 03A4B234C48D; Wed, 23 Sep 2009 02:55:36 -0700 (PDT) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 47467] Deployment of the war file by URL when contextpath is not specified in Manager Application. X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 6 X-Bugzilla-Component: Manager application X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: uwe@cscc.de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: default X-Bugzilla-Changed-Fields: Platform OS/Version In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Message-Id: <20090923095536.03A4B234C48D@brutus.apache.org> Date: Wed, 23 Sep 2009 02:55:36 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=3D47467 Uwe G=C3=BCnther changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|PC |All OS/Version|Windows XP |All --- Comment #1 from Uwe G=C3=BCnther 2009-09-23 02:55:30 PDT = --- I just investigated a bit in this one and IMHO this bug is realy odd because the documentation in html-manager-howto.xml and o.a.catalina.manager.ManagerServlet is not in sync with what the code does = or is designed for. Let me point that out in detail: 1. The docs are talking about JarURLConnection like syntax for the 'WAR or Directory URL' field in the 'Deploy' section of HTMLManagerServlet* (aka kn= own as war parameter there): jar:file:/c:/myWebapp.war!/ ** If you look in the code - you will find out - it can only handle java.io.Fi= le like file names (with an optional 'file:' prefix):=20 file:C:/myWebapp.war file://C:/myWebapp.war file:///C:/myWebapp.war file:////C:/myWebapp.war file://///C:/myWebapp.war file://////C:/myWebapp.war file:C:/myWebapp file://C:/myWebapp file:///C:/myWebapp file:////C:/myWebapp file://///C:/myWebapp file://////C:/myWebapp C:/myWebapp.war C:\myWebapp.war C:/myWebapp C:\myWebapp Every other filename not ending with '.war' is handled by the code as alrea= dy exploded directory and gets deployed as such! Back to the point: The existing code in HTMLManagerServlet and ManagerServl= et is unable to handle JarURLConnection like syntax like following one mention= ed above: jar:file:/c:/myWebapp.war!/ To make it crystal clear here, the only = type of URL they can handle are 'file:' URLs based on java.io.File(String) at al= l. * Note: HTMLManagerServlet is a sub class of ManagerServlet which gets used= by the Ant DeployTask as well. So there are common implications. 2.) On the one hand if you deploy a war file remote via the 'Select WAR fil= e to upload' field in the 'Deploy' section of HTMLManagerServlet the 'Context Pa= th' gets derived from the war file name. So you don't need a 'Context Path' to deploy a *.war file. For example if your war file is callled 'myWebapp.war', your 'Context Path' will be '/myWebapp'. On the other hand if you try to deploy a webapp as a *.war or a directory locally via 'WAR or Directory URL' you have to provide a 'Context Path', bu= t it would be possible to derive the 'Context Path' as well from the 'WAR or Directory URL' name like it is done for remote deployments. Proposed Solution: - Fix the documentaion and the HTMLManagerServlet UI to get number 1.) fixe= d. Especially remove the word 'URL' from the HTMLManagerServlet UI field descriptors and the jar:file:.... Urls from the javadoc and the html-manager-howto.xml - Enhance ManagerServlet to derive the 'Context Path' (aka 'path' parameter) from an already given 'WAR or Directory' (aka 'war' parameter). For example= if you have no 'Context Path' and the 'WAR or Directory' filed contains 'C:\myWebapp' or 'C:\myWebapp.war' the 'Context Path' will be '/myWebapp'. I start to work on this from now on in the trunk and will append the patch = as soon as I am finished (probably this week) to this bug, so it can merged in= by one of the commiter. Would be nice to get some feedback if the probosed solution fits or not. --=20 Kind Regards Uwe G=C3=BCnther --=20 Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=3De= mail ------- You are receiving this mail because: ------- You are the assignee for the bug.= --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org