Christopher Schultz wrote:

>
> On 5/31/2011 2:09 PM, Lentes, Bernd wrote:
> > box. I configured a httpd (apache
> > 2.2.10) in front of the tomcat, which communicates with
> tomcat using
> > AJP.
>
> Do you actually require httpd for your setup? If Tomcat works
> fine on it's own, maybe that's how you should run it...
>

A lot of people recommended that. It's likely that we will deploy more webapps 
later.

> > When i open one link, i don't see the desired web page, but
> the source
> > code of it.
>
> Do you see the HTML source code, or the JSP source code
> (obviously, only if you are requesting a .jsp file)?
>

I see HTML code.

> If the former, it's likely to be a Content-Type issue as you
> have guessed. Look for broken "Header" directives in
> httpd.conf, especially for the VirtualHost you are using and
> especially in any <Location> sections that you use for your
> JkMount directives.

There are not Header directives.

>
> If the latter, you are probably missing JkMount (or they are
> broken) directives and you are probably either setting
> DocumentRoot to the webapp's root (which is often considered
> very dangerous) or using "Alias" to achieve the same effect.
>

I use JKMount, and DocumentRoot of httpd and webapps of tomcat are not 
overlapping.

> If you choose to use DocumentRoot = webapp root or a similar "Alias"
> setup, /make sure you know what you are doing/. If you aren't
> careful, you can end up making your "secret" passwords and
> stuff available to any remote user (oops).
>
> > Using tcpdump shows me that the content type in the http-header is
> > text/plain. Ok, that's the reason why i see the source code. Can i
> > configure the content-type which is delivered by tomcat ? I tried
> > using mod_mime_magic on httpd, but this module just helps
> specifying
> > the content-type of static files. Our content is dynamic.
>
> First, let's make sure that the .jsp files are being
> executed. If not, you are chasing the wrong problem.

We don't use jsp, we have servlets.

>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3lSDkACgkQ9CaO5/Lv0PCzEwCeO1UbGc1WL3QjlpGUWB+jnIA7
> NzcAnRUvspPSP7dRy5imscTvRQcqf/FJ
> =Zyac
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

Reply via email to