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 1591C17D3B for ; Wed, 1 Oct 2014 07:15:18 +0000 (UTC) Received: (qmail 96210 invoked by uid 500); 1 Oct 2014 07:15:13 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 96137 invoked by uid 500); 1 Oct 2014 07:15:13 -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 96126 invoked by uid 99); 1 Oct 2014 07:15:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 07:15:13 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gadi.sastiel@gmail.com designates 209.85.223.179 as permitted sender) Received: from [209.85.223.179] (HELO mail-ie0-f179.google.com) (209.85.223.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 07:15:09 +0000 Received: by mail-ie0-f179.google.com with SMTP id ar1so210084iec.38 for ; Wed, 01 Oct 2014 00:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0PRdLQSqKu2u5WLOyS+/PrVKk9vv3Se5nh8hiWbY1d0=; b=rpPFwSghuyru34WaDmxChX0Z32qkLaKERqeLt+n/fX6GmY/rdu81k7dx/qENdXGdse Bus6cxejSjc16oRaRwxu1I/KT8dIOAw88/bfOC4jTqrgeVWBGSNzXX/M95EF2pT4xMKy 8DQXR9lRLJzFb+UzcfFaoLSg/fPZ3nOm/xWkB+kFtkJXrVTJnBbhIWrEPIu/+PXnTELz xVszx7ZLqHr+mID++OepKohYKMQhUe223kXkrcRmE4IHFjP0y9WPo48KIyX1aAUFDRaa /OHbHmBbp7q9IQT35Uuixys1z9vsORrv7tKATivdo1ZssY82miKAJN1aFGmdlMjtJ+jY 50Kw== MIME-Version: 1.0 X-Received: by 10.42.120.72 with SMTP id e8mr61463743icr.64.1412147688635; Wed, 01 Oct 2014 00:14:48 -0700 (PDT) Received: by 10.107.128.10 with HTTP; Wed, 1 Oct 2014 00:14:48 -0700 (PDT) In-Reply-To: <542AFF20.3060909@ice-sa.com> References: <542AFF20.3060909@ice-sa.com> Date: Wed, 1 Oct 2014 10:14:48 +0300 Message-ID: Subject: Re: Tomcat returns Jsp source code as text/plain to the browser From: Gadi Sastiel To: Tomcat Users List Content-Type: multipart/alternative; boundary=90e6ba614f0a5a00a80504574151 X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba614f0a5a00a80504574151 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, the request is seen on the tomcat access log ( i've changed the path deliberately) [01/Oct/2014:10:01:27 +0300] "GET /xxxxx/yyyyyy/zzzzz/aaaaPage.jsp%22 HTTP/1.1" 200 30223 Thanks Gadi On Tue, Sep 30, 2014 at 10:06 PM, Andr=C3=A9 Warnier wrote: > Gadi Sastiel wrote: > >> I have in httpd.conf: >> >> LoadModule proxy_module modules/mod_proxy.so >> LoadModule proxy_http_module modules/mod_proxy_http.so >> >> # Configure mod_proxy_html to understand HTML4/XHTML1 >> >> Include conf/extra/proxy-html.conf >> >> >> LoadModule jk_module modules/mod_jk.so >> >> Gadi >> > > Maybe to gain some time, let me point you to the explanation of what both > Konstantin and Daniel are looking for : > https://tomcat.apache.org/connectors-doc/reference/apache.html > See the text in red ? > > In more words : a frequent configuration error in such cases (where Apach= e > httpd in a front-end for Tomcat, and both are on the same machine), is to > allow Apache httpd to "see" the contents of the Tomcat application > directories (/webapps/*). > Tomcat "knows" that a JSP page is something which has to be processed, an= d > that it is the result that should be returned to the client, not the sour= ce. > But httpd doesn't know that, and for him a JSP page is just text, and it > returns it as is. > > So if the URL of the request is such, that Apache does not think that thi= s > request has to be forwarded to Tomcat, it will try to process this reques= t > itself. And if it can do that (aka it sees the directory where this file > is located, and the file in it), then it will return that page itself to > the client, as text. > > And that seems to be what you are seeing. From there comes the suspicion > of Konstantin and Daniel, because Tomcat, correctly configured, wouldn't = do > that. > > Except that you mention somwhere else that the request is visible in the > Tomcat access log. That would normally mean that httpd /is/ forwarding > this request to Tomcat, and that the error is on the Tomcat side. So > before going any further, make absolutely sure that that is the case, and > that it is really /this/ request that you are seeing in the tomcat logs. > Otherwise everyone is going to lose a lot of time searching in the wrong > places. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --90e6ba614f0a5a00a80504574151--