tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat returns Jsp source code as text/plain to the browser
Date Wed, 01 Oct 2014 14:55:46 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Gadi,

On 10/1/14 9:32 AM, Gadi Sastiel wrote:
> Probably it happens since our JSP's are not under the WEB-INF
> folder. Should be moved there.

That's unlikely to be the problem.

> Problem solved temporary by adding rewrite rule to the apache 
> httpd-ssl.conf:
> 
> RewriteRule ^.*\.jsp/*".*$ - [F]

If the above helped, I think you are badly misconfigured somewhere.
You probably have something to the effect of:

  Alias /context /path/to/tomcat/webapps/context

This will allow httpd to serve your static content out of Tomcat's
deployment directory.

Try making a request to:

http://host/context/WEB-INF/web.xml and see if you get the deployment
descriptor. If you do, then your httpd is badly misconfigured.

> Thanks for everyone who tried to help.

Since you don't know why the JSP source was being displayed, I think
you've just put a band-aid on the problem. You aren't done, yet...

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJULBXyAAoJEBzwKT+lPKRYUWoQAL2hPqNlGOcTKf5yqZTqkZqO
nxxlU3G5EzQ7rbhsuEuaqLopIN5G3OcSHufmOWaJVjAfhkkEtiqupvmhhMjX/cSm
wys8Mgp71eSVTJ/LwjnHTztFI2XqeBvgD93SQFac1EZ76+A6mSffgFN6p0hriw7J
ZUTEKhYeSHWtSOLqfyeFHtoTjy0XERKQpt6/HlW/X8k/5Cw6HdXyPa7RaRwhoav+
VEA4lxY+bGZxrA97dkIAgKvMTtPq/OEC+G+YZK0sR6Fo5Ot7aEIQN/91UHnaChnV
3+clc/WzDbT2J+aaZ8aX5DYkwujssTr4fF7YGzpQv8rYJxDJlE9oFSQqhRkAvfMb
ukw2IkmdPG6UKXWwi/EXGmT6r7uJhoQyzTKs/VFXQ0ChE6/HPYMbVn9uK21+s+md
FjnWzR0k3WVyc6/HYtBhzob/7/s/l2bY2x/k7UL/dS9pmCQNPfva2j602+BtXI08
pzTwU51UySLsST7SOQdipVrXjEDYrnd03k/vQm9/KSJ9de9AlxKKAAQ3eplEjuwP
CBhH1ZMUgswi5f/jdwC/iMun1YnnXMkJzZfQdPIfhe+S3HgRfJRvkVJDC4rp398T
AXv6LvrD/52lOp+1tLHOEx/QymPNO9JJK7o3UpvxyIFiMm7LFlURQR3D/VJVKR3X
8bGA/eiofWv0qlQAwe7n
=A0Ay
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message