File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes ajp12 cannot scan servlet headers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "ajp12 cannot scan servlet headers" Watch "ajp12 cannot scan servlet headers" New topic

ajp12 cannot scan servlet headers

Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
I just installed Apache and ApacheJServ on my Win32 machine. I am able to view the page, which I believe it is a servlet itself, but when I try to open up a servlet in my mounted zone, such as :// I get these errors in mod_jserv.log:
[17/07/2001 17:35:54:034] (EMERGENCY) ajp12[1]: cannot scan servlet headers (500)
[17/07/2001 17:35:54:034] (ERROR) an error returned handling request via protocol "ajpv12"
And in my error.log I see these messages:
[Tue Jul 17 13:07:50 2001] [error] [client] Invalid method in request �
[Tue Jul 17 13:07:50 2001] [error] [client] malformed header from script. Bad header=<!DOCTYPE HTML PUBLIC "-//IETF: /servlets/IsItWorking
And in the browser I see a page entitled "500 Internal Server Error". If anyone has any clues it would be great, because I'm having the exact same problem on my linux box as well. I think it might be a problem with the JDK, or perhaps I'm failing to include a key line in my configuration files.
I'm using JDK1.1.8 from Sun, JSDK2.0, Apache 1.3.20, JServ 1.1.2
My contains
wrapper.classpath=C:\Program Files\Apache JServ 1.1.2\ApacheJServ.jar
if that means anything to anyone. Thanks for your help, whoever knows what is going on.
timothy zimmerman
Ranch Hand

Joined: Jun 26, 2001
Posts: 149
I'm not sure if I have the answer to your problem but you might consider upgrading your jdk, 1.1.8 is pretty old these days. I'll take a look at my installation and see if I get any other ideas.
[This message has been edited by timothy zimmerman (edited July 17, 2001).]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Those messages look sort of familiar. I had all sorts of grief with ajpv12 trying to do virtual hosts. Switched to ajpv13 and the wildcat became a pussycat.

An IDE is no substitute for an Intelligent Developer.
Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
I've tried upgrading my JDK before and it still gives me problems, even though I believe that my problems might be coming form the JDK.
What do I need in order to use ajpv13? Do I need to download something or just replace my "2"s with "3"s in my configuration files?
I agree. Here's the link:
subject: ajp12 cannot scan servlet headers
jQuery in Action, 3rd edition