Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 87120 invoked from network); 13 Feb 2009 22:49:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 22:49:50 -0000 Received: (qmail 98507 invoked by uid 500); 13 Feb 2009 22:49:37 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 98478 invoked by uid 500); 13 Feb 2009 22:49:37 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 98467 invoked by uid 99); 13 Feb 2009 22:49:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 14:49:37 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [62.179.121.34] (HELO viefep14-int.chello.at) (62.179.121.34) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 22:49:27 +0000 Received: from edge04.upc.biz ([192.168.13.239]) by viefep14-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20090213224905.NFDX7428.viefep14-int.chello.at@edge04.upc.biz> for ; Fri, 13 Feb 2009 23:49:05 +0100 Received: from mail.winnall.net ([84.74.135.203]) by edge04.upc.biz with edge id Fap31b0114PUXTG04ap4bD; Fri, 13 Feb 2009 23:49:05 +0100 X-SourceIP: 84.74.135.203 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.winnall.net (Postfix) with ESMTP id 4BCB4DE8A1F for ; Fri, 13 Feb 2009 23:49:03 +0100 (CET) X-Virus-Scanned: amavisd-new at winnall.net Received: from mail.winnall.net ([127.0.0.1]) by localhost (mail.winnall.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v9WrimtbJw4p for ; Fri, 13 Feb 2009 23:49:02 +0100 (CET) Received: from d-mx-s-l.winnall.ch (d-mx-s-l.winnall.ch [192.168.0.124]) by mail.winnall.net (Postfix) with ESMTP id 90F72DE8404 for ; Fri, 13 Feb 2009 23:49:02 +0100 (CET) Message-Id: <64048CE7-4AFA-4D7F-A2C0-2C237A2DEE3C@winnall.ch> From: Stephen Winnall To: "Tomcat Users List" In-Reply-To: <91C505E7-13E7-4526-98F8-37A98D02C9FE@winnall.ch> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: WebdavServlet + custom DirContext = unexpected behaviour Date: Fri, 13 Feb 2009 23:49:02 +0100 References: <5C9E336B-DDA2-44F3-9EDC-788C208339C1@winnall.ch> <0AAE5AB84B013E45A7B61CB66943C17215B77F59CD@USEA-EXCH7.na.uis.unisys.com> <91C505E7-13E7-4526-98F8-37A98D02C9FE@winnall.ch> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org Can anyone help me with this? I'm completely stuck! I have a Tomcat 6.0.18 installation with WebdavServlet enabled. If I use the following file, WebDAV works OK: However, I want to use WebDAV to access a database, so I've written my own DirContext. I declare the DirContext as a handler in the file as follows: But when I do this, WebdavServlet is ignored and HTTP sessions are created with HttpServlet / DefaultServlet, which fail, of course, because they know nothing about WebDAV. The handler seems effectively to make WebdavServlet invisible... I've googled for just about every combination of dirContext, classloader, Tomcat 6, resources, context.xml, WebdavServlet. There are 2 people who have asked before about how to access a database from WebdavServlet, but no answers. I guess I'm missing something dead simple, but I don't know what to look for. Steve On 13 Feb 2009, at 13:33, Stephen Winnall wrote: > Thanks for your feedback. > > On 13 Feb 2009, at 05:04, Caldarale, Charles R wrote: > >>> From: Stephen Winnall [mailto:steve@winnall.ch] >>> Subject: WebdavServlet + custom DirContext = unexpected behaviour >>> >>> My Tomcat is as installed by NetBeans 6.5, that is >>> with a separate CATALINA_HOME and CATALINA_BASE. >> >> I'd strongly recommend that you first learn how to run Tomcat >> directly, outside of any IDE, before muddying the picture with an >> extra layer of obfuscation. Problem solving will be much simpler. > > Fair comment. So I have now installed Tomcat 6.0.18 from scratch. > >> >> >>> I modified $CATALINA_BASE/conf/catalina.properties to make >>> common.loader look also in $CATALINA_BASE/common/lib and I >>> put DBDirContext and supporting cast into there. >> >> Now you've already gone off the deep end; that's not something you >> should have to (or want to) do. By default, there is no common/lib >> in Tomcat 6.0, and you don't need to resurrect the past. Any jars >> or classes Tomcat needs access to should be in Tomcat's lib >> directory, nowhere else. If you provide a replacement for the >> default handler, it must go into Tomcat's lib >> directory, since it's used by Tomcat, not the webapp. > > I did originally put everything into $CATALINA_HOME/lib. However, I > like to keep my stuff separate from the base product, which is why I > had created a separate folder. > > However, with my new installation I put DBDirContext and friends > into $CATALINA_HOME/lib as you suggest. > > When I started up the new installation, I got exactly the same > behaviour as before. > >> >> >>> The Tomcat documentation suggests that changing the >>> to something other than the filesystem >>> results in Tomcat not being able to read files it needs: >> >> Not true - it says the *webapp* won't be able to access the file >> system; it says nothing about Tomcat's ability to do so. > > Thanks, that has cleared up an uncertainty for me. > >> >> >>> do I have to make a hybrid DBDirContext that gets the >>> files Tomcat needs from the filesystem and the data I >>> want from the database? >> >> I don't think so. Start over with a clean Tomat install (not the >> one bundled with the IDE) and go from there. > > Done that and there's no change in behaviour. When I switch on the > handler, the OPTIONS request is apparently handled out > of HttpServlet; when I switch it off, it is handled out of > WebdavServlet. > > Steve > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org