Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 79973 invoked from network); 10 Dec 2001 16:11:57 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 10 Dec 2001 16:11:57 -0000 Received: (qmail 3250 invoked by uid 97); 10 Dec 2001 16:11:49 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 3234 invoked by uid 97); 10 Dec 2001 16:11:48 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 3220 invoked from network); 10 Dec 2001 16:11:48 -0000 Date: Mon, 10 Dec 2001 17:02:37 +0100 From: Incze Lajos To: Tomcat Developers List Subject: Re: AJP Todo Message-ID: <20011210170237.A15899@incze.incze.hu> References: <20011202161358.L71669-100000@localhost> <000c01c18132$93698ac0$1b7d0304@vz.dsl.genuity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <000c01c18132$93698ac0$1b7d0304@vz.dsl.genuity.net>; from wbarker@wilshire.com on Sun, Dec 09, 2001 at 08:24:35PM -0800 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sun, Dec 09, 2001 at 08:24:35PM -0800, Bill Barker wrote: ... > (b) For a context defined in the server.xml, there seems to be no public way > to determine the document base as an absolute path. This may just be my > lack of familiarity with Catalina however. On a related note, I wasn't able > to find any way to determine if a Context even has a document base (as > opposed to a war file). > What's wrong with this? (ServletContext method javadoc both 2.2 and 2.3) ---- getRealPath public java.lang.String getRealPath(java.lang.String path) Returns a String containing the real path for a given virtual path. For example, the path "/index.html" returns the absolute file path on the server's filesystem would be served by a request for "http://host/contextPath/index.html", where contextPath is the context path of this ServletContext.. The real path returned will be in a form appropriate to the computer and operating system on which the servlet container is running, including the proper path separators. This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive). ----- So, getServletContext().getRealPath( "/" ) incze -- To unsubscribe, e-mail: For additional commands, e-mail: