JavaTechie

Its all about Technology

Tomcat 5.5.17, with mod_jk on Windows January 7, 2008

Filed under: Uncategorized — javatechie @ 5:43 am
Tags:

Requirements

  • Java 1.5 JDK (SDK)
  • Apache 2.0
  • mod_jk 1.2

Download

Configuration

  • Java JDK path : C:\jdk1.5.0_07
  • Apache path : C:\www\Apache2
  • Tomcat path : C:\www\tomcat5
  • Apache’s webroot : C:\www\webroot
  • JSP/Servlet webroot (via Apache2/mod_jk) : C:\www\tomcat5\webapps
  • JSP/Servlet webroot (via native Tomcat server, port 8080) : C:\www\tomcat5\webapps
  • Access JSP/Servlet pages via Apache2/mod_jk : http://localhost/[jkmount-mapped url of your webapp]
  • Access native Tomcat server : http://localhost:8080/

Unpack and place Tomcat5 and mod_jk

  • Unpack file apache-tomcat-5.5.17.tar.gz under directory C:\www
  • Rename directory C:\www\apache-tomcat-5.5.17 to C:\www\tomcat5
  • Rename file mod_jk-apache-2.x.xx.so to mod_jk.so, and place under directory C:\www\Apache2\modules

Configuration and Setup

  • Set Environmental Variables : JAVA_HOME=C:\jdk1.5.0_07 and CATALINA_HOME=C:\www\tomcat5
    • Set variables under Start » Settings » Control Panel » System » Advanced » Environment Variables » System variables » New…
  • Create empty file C:\www\Apache2\conf\workers.properties, insert code…

workers.tomcat_home=C:/www/tomcat5workers.java_home=C:/jdk1.5.0_07ps=\

# Define worker 'example'worker.list=example

# Set properties for worker 'example' (ajp13)worker.example.type=ajp13worker.example.host=localhostworker.example.port=8009

worker.example.cachesize=10worker.example.cache_timeout=600worker.example.socket_keepalive=1worker.example.recycle_timeout=300

Edit file C:\www\Apache2\conf\httpd.conf, insert code...

LoadModule jk_module modules/mod_jk.so

<ifmodule>

  JkWorkersFile conf/workers.properties  JkLogFile logs/mod_jk.log  JkLogLevel error  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories  JkRequestLogFormat "%w %V %T"

  Alias /jsp-examples "C:/www/tomcat5/webapps/jsp-examples/"

  <directory>      Options Indexes +FollowSymLinks      AllowOverride None      Allow from all </directory>

  Alias /servlets-examples "C:/www/tomcat5/webapps/servlets-examples/"

  <directory>      Options Indexes +FollowSymLinks      AllowOverride None      Allow from all  </directory>

 <location>      AllowOverride None      deny from all</location>

  JkMount /jsp-examples/*.jsp example  JkMount /servlets-examples/* example

</ifmodule>

Install and Start Tomcat

Tomcat can be installed as a Service or started as a Standalone Console application. Note to make sure that Apache has been started at this point.


 

2 Responses to “Tomcat 5.5.17, with mod_jk on Windows”

  1. laxman Says:

    Its very much Good Tutorial.

  2. pankaj Says:

    I want tomcat software


Leave a Reply