• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

how to use connectors for apache and tomcat

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if anybody can help me in useing the jk2 connectors how to have connection with apache and tomcat
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Here is the procedure for connecting Apache and Tomcat using JK1.2. on windows systems.
1)download following things(Apache site)
Apache 1.3.27
Jakarta-Tomcat 4.1.12
mod_jk v1.2

2)install apache,tomcat and test them.
3)Add <connector> element to in server.xml file like below so that tomcat is listening for AJP13 requests coming from JK1.2. like below
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>


Above element makes sure that the incoming requests coming at port 8009 will be sericed by Ajp13Connector.
4)Now we need to create a tomcat worker in tomcat worker file,which tells Apache how and when to talk with tomcat.
worker.list=myWorker
worker.testWorker.port=8009
worker.testWorker.host=localhost
worker.testWorker.type=ajp13

And save the file as workers.properties and place it at Tomcat's [/B][/B]<CATALINA_HOME>/conf directory.
5)Now tell Apache to talk to that worker whenever needed by modifying the httpd.conf file at <APACHE_HOME>/conf directory.
6)copy mod_jk(dll file) module to the <APACHE_HOME>/libexec directory.
7)Tell Apache to load the module by adding below to httpd.conf file
LoadModule jk_module libexec/mod_jk-1.3.26.dll
AddModule mod_jk.c

and tell the wrokers file location by
JkWorkersFile C:/Tomcat/conf/workers.properties
8)Tell Apache that we want all requests like /examples/servlet/* and /examples/*.jsp to be rerouted and serviced by the worker named myWorker.This is accomplished using the JkMount directive, as follows.
JkMount /examples/servlet/* myWorker
JkMount /examples/*.jsp myWorker

9)Start Apache and tomcat and test them first.
10)Test connection by typing
http://localhost/examples/servlets/index.html or
http://localhost/examples/a.jsp (if already a.jsp at tomcat/examples)
on adress location of your browser.
If you get any problem,check the whole above things..Thanks.

[ April 14, 2004: Message edited by: Mohd Afroz Ahmed ]
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic