Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 39627 invoked from network); 18 Oct 2005 16:29:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2005 16:29:50 -0000 Received: (qmail 80839 invoked by uid 500); 18 Oct 2005 16:29:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 80815 invoked by uid 500); 18 Oct 2005 16:29:33 -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 80804 invoked by uid 99); 18 Oct 2005 16:29:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2005 09:29:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.186.64.158] (HELO mail03c.hostcenter.com) (195.186.64.158) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 Oct 2005 09:29:33 -0700 Received: from www.numcom.com (195.186.65.73) by mail03c.hostcenter.com (RS ver 1.0.95vs) with SMTP id 4-0453392774 for ; Tue, 18 Oct 2005 18:26:14 +0200 (CEST) From: "Lukas Mathis" To: Subject: Problem writing Webdav Servlet for Tomcat Date: Tue, 18 Oct 2005 18:26:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcXUAKgEWALWf3aJQYi57I8gyY8YjA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: <20051018182614.GA45339@mail03c.hostcenter.com> X-Loop-Detect: 1 X-DistLoop-Detect: 1 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I'm trying to write a Webdav Servlet for Tomcat (based on Tomcat example code). Basically, I've written a first, very simple version which simply serves an empty directory. Unfortunately, Windows can't open it: When I try to open a Web Folder in Windows, it tells me that it "Cannot connect to the Web server http://localhost:8080/webdav. The server could not be located, or may be too busy to respond. Please check your typing or check to make sure the Web server is available". Calling System.out.println() in my Webdav Servlet tells me that it got a PROPFIND request at path /webdav, but somehow, Windows either doesn't get an answer or doesn't understand it. Here are the relevant parts of my code: (...) public class WebDavServlet extends HttpServlet { (...) protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (method.equals(METHOD_PROPFIND)) { doPropfind(req, resp); } (...) } protected void doPropfind(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setStatus(SC_MULTI_STATUS); resp.setContentType("text/xml; charset=UTF-8"); StringBuffer buffer = new StringBuffer(); buffer.append("\n"); buffer.append("\n" + "\n" ); java.io.PrintWriter resp_writer = resp.getWriter(); resp_writer.write(buffer.toString()); } (...) } If anyone could shed any light on this, I would be extremely grateful. I really am stumped. Thanks for your time! lukas --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org