Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA6DA9B60 for ; Fri, 3 Feb 2012 16:20:12 +0000 (UTC) Received: (qmail 33516 invoked by uid 500); 3 Feb 2012 16:20:09 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 33423 invoked by uid 500); 3 Feb 2012 16:20:08 -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 33414 invoked by uid 99); 3 Feb 2012 16:20:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 16:20:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pid@pidster.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-we0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 16:20:00 +0000 Received: by werh12 with SMTP id h12so3780026wer.18 for ; Fri, 03 Feb 2012 08:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pidster.com; s=google; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:openpgp :content-type; bh=vONSv/mwC/Hu+g7ETyvARNLAFjkMz0wMjk/XHcxk0dk=; b=LNxP41+cJCGghXgReruZDkK/7uiPNXgGF2y3Ptr0sR8029/O4NAbuYKnR2S6kvK/T+ OxMXEhhG1eu49MyjMQqX+vvtWx2IqUSsFQgbWrBD+3v5CiZUm6mjIBaZ6vDI3Lk+3WUu cb/DWQi0tF9ZLljo6gC++HaEPk/VEHXwcK6E4= Received: by 10.180.93.194 with SMTP id cw2mr12562734wib.0.1328285979414; Fri, 03 Feb 2012 08:19:39 -0800 (PST) Received: from Asura.local (host81-134-105-115.in-addr.btopenworld.com. [81.134.105.115]) by mx.google.com with ESMTPS id t15sm7600033wiv.6.2012.02.03.08.19.37 (version=SSLv3 cipher=OTHER); Fri, 03 Feb 2012 08:19:38 -0800 (PST) Message-ID: <4F2C0911.5060308@pidster.com> Date: Fri, 03 Feb 2012 16:19:29 +0000 From: Pid Organization: Pidster Inc User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: How can I access tomcat's logs using my jsp? References: In-Reply-To: X-Enigmail-Version: 1.3.5 OpenPGP: id=62590808 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig634585249458E8463604C5B4" X-Virus-Checked: Checked by ClamAV on apache.org --------------enig634585249458E8463604C5B4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/02/2012 13:53, Lev A KARATUN wrote: > Hello! >=20 > I'm administering an application running on Tomcat 6.0.0.29. OS is AIX = > 5.3.=20 >=20 > I'm trying to write a simple jsp to make some superusers able to downlo= ad=20 > tomcat logs via browser after entering a password. (In my organization = > it's not permitted to give anyone the "manager" role) So give them a different role and change the rolename in the app web.xml.= > I've already managed to get a list log-files' names (just copied someon= e's=20 > part of code and made some adjustments), but when I'm trying to make=20 > download links, I don't know how can I specify the path to=20 > /$CATALINA_BASE/logs via my web-browser. As far as I can see, I can rea= ch=20 > only folders like /$CATALINA_BASE/webapps/myapp upon entering the link = > http://myhost:port/myapp. >=20 > So, the question is - how can I access tomcat's logs using my jsp? Are you intending to allow download for logs in the same application server or a different one? I'd be wary about the security issues here. You can use a Servlet to forward a request to another resource. Or you can map a docBase to another directory. p > Thanks in advance. >=20 > Best Regards,=20 > Karatun Lev >=20 >=20 > ----------------------------------- > This message and any attachment are confidential and may be privileged = or otherwise protected from disclosure. If you are not the intended recip= ient any use, distribution, copying or disclosure is strictly prohibited.= If you have received this message in error, please notify the sender imm= ediately either by telephone or by e-mail and delete this message and any= attachment from your system. Correspondence via e-mail is for informatio= n purposes only. ZAO Raiffeisenbank neither makes nor accepts legally bin= ding statements by e-mail unless otherwise agreed.=20 > ----------------------------------- --=20 [key:62590808] --------------enig634585249458E8463604C5B4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCgAGBQJPLAkYAAoJEGoM2OGpOvr9THgP/3pocGkGP4l9emX9bVjWbDg/ Kx7+P1hMl4ZNImrn0U9rHi+TQzmoaJk1zZgK9+1XI45GyHtf7zW7hXOr2CmPEnby bM4xpCqjVf3t7t74fjL3c6LF3OZrCudRWyM541+q4A+GsgVq5ampU9qX7Gzcym6X CnqWK/rBUs/A+VwSnBCHy1zuEwGnnUSFDmoTl0ow+NJdf0w2fQE4+vV0jdiTjVDb RupX83O/UDv+k8Fig/e9Vyg/aIuNgB9VQ9hSpS+uEPmC+WNLF6UCHx6c2HD2zDzc cJDjJWvda4TjhU/hAI1yEvuKNOprpBduEo89764bdXs0EUI1id1DCApCvrFqIJxS ere6Eu2fOa2rEogYd7Ste7x4V9nXTJAF/8hyvA/Uz82bzImgXLs8oZUG3mot8t9m tiLg4ROCsLQMwV9mqh1KJlZVIXqGmFsgGRgkkI8+2EDLP/uYLOYGOiDiZ/SN+oau mC2eyGKMlP/Zsud1vH0KNH2R0T+DYCGglRIYTYkkLA7VH1IsUWCSRpNMGSDD2nY7 RDuc+dEb058VswTBeqJEx+WEzzZGi9gAh/A4YyY2DFdDEIVbpjQMRxPCv2EYKCc+ rTMiDiBZef5kmqN9Lm7ukFiOOejVFxPmnRKPufzAfAOO9C3piGFbCVS+t3LDCjFX EiODTzVxcir79LemhwIo =D3AQ -----END PGP SIGNATURE----- --------------enig634585249458E8463604C5B4--