Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 85572 invoked from network); 4 Oct 2007 20:56:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Oct 2007 20:56:02 -0000 Received: (qmail 74785 invoked by uid 500); 4 Oct 2007 20:55:48 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 74733 invoked by uid 500); 4 Oct 2007 20:55:48 -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 74722 invoked by uid 500); 4 Oct 2007 20:55:48 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 74719 invoked by uid 99); 4 Oct 2007 20:55:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 13:55:48 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 20:55:59 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 807017141F2; Thu, 4 Oct 2007 13:55:08 -0700 (PDT) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 43557] New: - JK and servlet binary response Message-ID: X-Bugzilla-Reason: AssignedTo Date: Thu, 4 Oct 2007 13:55:08 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=43557 Summary: JK and servlet binary response Product: Tomcat 5 Version: 5.5.20 Platform: Other OS/Version: Windows XP Status: NEW Severity: major Priority: P1 Component: Native:JK AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: castocolina@gmail.com I have a servlet MyServlet mapped as /servlet/MyServlet/*, this reade a source depend relative url before /* and write out binary data, so: URL url = new URL(urlString); URLConnection urlc = url.openConnection(); String contentType = urlc.getContentType(); // write headers to response Map> headers = urlc.getHeaderFields(); Iterator it = headers.keySet().iterator(); while (it.hasNext()) { String key = it.next(); List value = headers.get(key); if (key != null && value != null) for (Iterator it2 = value.iterator(); it2.hasNext();) { String element = it2.next(); if (element != null) response.addHeader(key, element); } } response.setContentType(contentType); // write data to response stream InputStream in = urlc.getInputStream(); OutputStream out = response.getOutputStream(); int c = 0; while ((c = in.read()) != -1) { out.write(c); } in.close(); out.flush(); out.close(); I test this in tomcat with port and work successfully, I have mapped my application in apache where my jsps work fine, but when I try MyServlet from apache this send me a error (page not found). I observed putting a System.out.println(any string) in my servlet class and this print in the output. I assume the request arrive to the servlet but no return the response or Jk no wait, for why? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org