tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed" ...@jsq.co.uk>
Subject Re: HANDLER THREAD PROBLEM
Date Mon, 03 Jul 2000 16:37:59 GMT
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