tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob S." <rsli...@home.com>
Subject RE: HANDLER THREAD PROBLEM
Date Mon, 03 Jul 2000 20:12:13 GMT
Maurizio,

As a supplement to Ed's very-well-put replies on this thread...

The form of a URL is:  protocol://hostname:portnumber/path

When you talk to a webserver, like Apache, with your browser, you are using
the HTTP protocol, which is why you type in:

http://www.RobSlifka.com/GodFatherOfSoul/

Here, protocol = http, hostname = www.RobSlifka.com, port = 80 ("well-known"
/ default for the HTTP protocol), and path = /GodFatherOfSoul/

What you're telling your browser to do is to use the HTTP protocol to carry
out communications with the host www.RobSlifka.com on port 80, and you are
requesting the contents of the path /GodFatherOfSoul.

Now, think about what you're attemping with Netscape.  From your web
browser, you're trying to talk to Tomcat on port 8007 by using the AJPV12
protocol.  ***This protocol is not used for communication from a web browser
to a web server***.  This is a protocol used by Tomcat/JServ/Apache for
internal communication ***ONLY***.  The *only only only* time you need deal
with AJP is making sure that Tomcat has an AJP listen port (8007 by default,
and is obviously working with your setup or else Tomcat wouldn't be giving
you the HANDLER THREAD exceptions) and that Apache is set to communicate
with it.  Other than that, you never ever ever need to even think about
AJPV12, let alone type it in anywhere.

Hope this helps!

- r


 -----Original Message-----
From: Ed [mailto:ed@jsq.co.uk]
Sent: July 3, 2000 9:38 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: HANDLER THREAD PROBLEM


  The mistake is the http://localhost:8007 bit.  You don't talk to the
tomcat servlet engine directly, you must go through a web server.  In stand
alone mode, Tomcat creates it's own web-server which you must go through (by
default it is 8080), however when you combine it with apache, you MUST go
through the apache webserver process - you have no choice (unless of course
you grab the ajpv12 protocol code and write your own client...)

  I apologise if the following is a little patronising, but here goes :)
  Example of calling the SnoopServlet
  The URL would be http://your.host.name/servlet/SnoopServlet

  The tomcat apache config file instructs apache that any request to the
servlet directory is to be passed to tomcat via the ajpv12 protocol so it
can process the request instead - this is completely transparent to the
calling client browser - as apache itself cannot serve Servlets directly.

  A similar case is for the jsp files.
  A url to a jsp page could be
  http://your.host.name/test/realPath.jsp

  The tomcat apache conf file instructs apache that any url with file
extension .jsp is to be sent to tomcat for serving, again using the ajpv12
protocol.

  So, what I'm saying here is that tomcat, when combined with another web
server, is a little server for use purely for the web-server to handle
requests that the web-server can't deal with personally.

  I hope this helps :)
    ----- Original Message -----
    From: Maurizio Calcara
    To: tomcat-user@jakarta.apache.org
    Sent: Monday, July 03, 2000 4:32 PM
    Subject: Re: HANDLER THREAD PROBLEM


        Hi Ed,
    thank's for your help.
    Yes, I use  "ajp12"  inside the "tomcat-apache.conf" file,  that I have
copied into the /etc/http/conf dir. I have modified inside this
configuration file only the path to the   mod_jserv.so (in the file
generated by tomcat there was "libexec/mod_jserv.so", I have the modules
inside the "modules" dir.  "/etc/httpd/modules", as a standard RedHat 6.1
installation), by writing "modules/mod_jserv.so" instead
"libexec/mod_jserv.so".
    No errors appear during the startup phase. When I type into the Netscape
location box "http://localhost:8007" the error "HANDLER THREAD PROBLEM: ..."
appears on the console.
    Where is the mistake?
    Have you copied the mod_jserv.so into the /etc/httpd/modules (that is a
link /usr/lib/apache/) dir ?

    Maurizio


    Ed wrote:

       Ok, I've read your original problem again and I need a bit more
clarification.Where exactly are you typing in this URL to the ajpv12?  If
you are in fact typing the ajpv12://localhost directly into the netscape URL
thingy then it will completely fail as it is not a standard internet
protocol like http, ftp or gopher.  This ajpv12 thing should only appear
inside your configuration script(s).  The tomcat-apache.conf file *can*
contain this protocol specifier if you are attempting to connect to a tomcat
server other than the one that is on the local host (or using a different
port).  Normally the default tomcat-apache.conf file that should be included
in the main http.conf will work (apart from checking the that the location
to the mod_jserv library is correct). Personally, I installed apache 3.1.12,
tomcat, tomcat source and apache development packages onto my RedHat 6.2
box.  After compiling the mod_jserv.so with apxs (instructions in the user
guide), copying the tomcat-apache.conf into /etc/httpd/conf directory,
including it in the http.conf file, altering tomcat-apache.conf so that it
had the correct path to mod_jserv.so and finally starting up the servers it
just ran fine.  I modified nothing else.
--

dr. Maurizio Calcara
m.calcara@cgsgroup.it


Mime
View raw message