Author |
|
olafkb
Joined: 13 Sep 2006 Posts: 5 Location: Germany
|
Posted: Wed 13 Sep '06 16:43 Post subject: Apache 2 and tomcat 5 |
|
|
Hello,
on a win 2000 server runs apache 2 and tomcat 5.
In the generated html-pages are hex-chars where in the jsp-template were the <include>-tags.
On an other win 2000 server with IIS and tomcat 5 are no problems.
When I'm looking at the URI with a client behind a proxy, the characters are filtered out. When I look direct outside our net to the URI I see the hex-chars.
Have anybody seen this before?
Thanks
Olaf |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7377 Location: Germany, Next to Hamburg
|
Posted: Thu 14 Sep '06 14:35 Post subject: |
|
|
How did you configure the proxy? |
|
Back to top |
|
olafkb
Joined: 13 Sep 2006 Posts: 5 Location: Germany
|
Posted: Mon 18 Sep '06 14:51 Post subject: it seems to be chunked encoding |
|
|
when I look around this error, it looks like a problem with chunked encoding (I never heard this before). Now I'm looking for how to turn chunked encoding on or off. Who can help me?
The Proxyconfiguration is not important, because the result is the same with different proxy server. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Mon 18 Sep '06 16:24 Post subject: |
|
|
There is no config directive to turn chunked encoding on or off in Apache.
Your problem is unlikely to be chunked encoding, because the chunked-encoding filter should not know where your jsp tags were located.
Tomcat should process the <jsp:include> tags, and Apache should only see the resulting HTML as one continuous string of characters.
It sounds like it might be a charset problem.
Could your main page be in one charset, but your <jsp:include>'d pages be in another charset?
Sometimes it helps to use Telnet to retrieve the page and examine the characters, like this:
Quote: | telnet {servername} 80
GET /{your_tomcat_page} HTTP/1.1
Host: {servername}
| Be sure to type an extra blank line after the Host: header.
Also, when you type the input to telnet it does not echo what you type - so type carefully.
Hope this helps,
-tom- |
|
Back to top |
|
olafkb
Joined: 13 Sep 2006 Posts: 5 Location: Germany
|
Posted: Wed 20 Sep '06 14:42 Post subject: Response Header has the only information "200 OK" |
|
|
now I installed php on the system.
If I open a simple phpinfo.php I get the answer as html source code and there inside are hex values.
If I look with the firefox extension WebDeveloper in "Information - View Response Header" I get the answer
Code: | Response Headers - http://www.xxxxxx.xx/phpinfo.php
200 OK |
But where are all the other Response header informations? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7377 Location: Germany, Next to Hamburg
|
Posted: Wed 20 Sep '06 14:50 Post subject: |
|
|
Which header you wanted to get too? |
|
Back to top |
|
olafkb
Joined: 13 Sep 2006 Posts: 5 Location: Germany
|
Posted: Wed 20 Sep '06 16:11 Post subject: |
|
|
A header looks like this.
Code: |
Response Headers - http://www.xxxxxx.xx/phpinfo.php
Content-Type: text/html
Date: Wed, 20 Sep 2006 14:09:06 GMT
Keep-Alive: timeout=5, max=100
Proxy-Connection: keep-alive
Server: Apache/2.2.3 (Win32) PHP/5.1.6 DAV/2
Transfer-Encoding: chunked
X-Powered-By: PHP/5.1.4
200 OK
|
|
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Wed 20 Sep '06 19:24 Post subject: |
|
|
try:
start->run->telnet yourserver 80
HEAD / HTTP1/1<return><return>
I get:
Code: |
Date: Wed, 20 Sep 2006 17:23:48 GMT
Server: Apache/2.2.3 (Win32) PHP/5.1.6 DAV/2 mod_perl/2.0.2 Perl/v5.8.6
X-Powered-By: PHP/5.1.6
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 454
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/html
Content-Language: en
200 OK |
|
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Wed 20 Sep '06 21:23 Post subject: |
|
|
For PHP - I noticed that your Server header says PHP/5.1.6, but your X-Powered-By header says PHP/5.1.4.
Are you using a mis-matched php5apache2.dll and PHP installation?
The Proxy-Connection header in your last post indicates that you are connecting through a proxy instead of connecting directly to your Apache server.
Does the problem only occur when you go through the proxy?
If so - maybe you are right about chunked-encoding. Perhaps your proxy doesn't handle it well.
It would be useful to try the 'telnet' test both ways - from a browser which can connect directly to your Apache server, and then from a browser which goes through the proxy.
Be sure to use GET instead of HEAD so you can examine the entire response for hex characters. HEAD will only show you the response headers.
If you change HTTP/1.1 to HTTP/1.0 when you try the telnet test - this will prevent chunked-encoding from being applied. If your responses do not contain hex characters with HTTP/1.0, this would seem to confirm your suspicion about the proxy and chunked encoding.
-tom- |
|
Back to top |
|
olafkb
Joined: 13 Sep 2006 Posts: 5 Location: Germany
|
Posted: Tue 26 Sep '06 13:34 Post subject: The answer to this problem was our firewall |
|
|
There were no problem with the proxy or apache/tomcat settings, the problem was our firewall.
In the watchguard-firewall we aktivate that following settings and it works:
Rule name: Java Bytecode
Rule Settings: Pattern Match - %0xcafebabe%*
Rule Actions: Deny
But what I not understand is, before we run the same application on a IIS with win2000 server and had no problems. We only change from IIS to Apache.
I don't understand that, but I'am happy to solved the problem.
Thanks for your help
Olaf |
|
Back to top |
|