Integrating Tomcat And Apache On Windows

20,888
-1

Published on

Configuration / Integrating Tomcat and Apache Web server or Apache HTTP server on Windows

Published in: Technology
6 Comments
6 Likes
Statistics
Notes
  • Its showing classNotFoundException: Mar 14, 2015 11:19:48 AM org.apache.catalina.startup.Catalina load WARNING: Catalina.start using conf/server.xml: Error at (146, 57) : org.apache.jk.config.ApacheConfig Mar 14, 2015 11:19:48 AM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: org.apache.jk.config.ApacheConfig at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.Catalina.load(Catalina.java:601) at org.apache.catalina.startup.Catalina.start(Catalina.java:663) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hi Mohanraj,

    Thanks for your presentation. It really helps me.

    I have one query, suppose I have one war file in my apache tomcat webapp called XYZ.war, if I want to access it using localhost/XYZ/ how & where can I set configurations.
    I had set configuraton in httpd.conf file like JkMount /XYZ XYZ but it does not work for me.

    Please advise.

    Thanks,
    Mayank
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Thanks a lot.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I still need to add the following to the workers.properties for it to work

    worker.list=worker1
    worker.worker1.port=8009
    worker.worker1.host=localhost
    worker.worker1.type=ajp13
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • thanks, it's really helpful.
    but how to replace the 'It's work page' with the apache page?

    i want when we type http://localhost:80 it's direct go to apache page
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
20,888
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1,002
Comments
6
Likes
6
Embeds 0
No embeds

No notes for slide

Integrating Tomcat And Apache On Windows

  1. 1. Configuration / Integrating Tomcat and Apache Web server or Apache HTTP server on Windows The version I used is – 1. Java version quot;1.5.0_15quot; 2. Apache2.2 3. Apache-tomcat-6.0.16 4. Tomcat-connectors-1.2.27-src.zip 5. Apache Tomcat Connectors 1.2.27 for WIN32 Please follow the following step to configure successfully... 1) Installing Apache – a. Download “apache_2.2.10-win32-x86-openssl-0.9.8i.msi” b. Just simple wizard – follow next button c. Type http://localhost/ in browser i. You will get “it works!” ii. Ref : 2) Installing Tomcat a. Download “apache-tomcat-6.0.16.zip” b. Just unzip it c. Goto TOMCAT_HOME/bin and run or double click startup.bat i. For ex : C:apache-tomcat-6.0.16bin d. Type http://localhost:8080/ in browser i. You will get ii. Ref:
  2. 2. 3) Stop both servers now a. Stopping apache i. Right click apache service icon ii. And click “Open Apache Monitor”
  3. 3. iii. Click Stop button. b. Stopping tomcat i. Press “Ctrl^C” in the tomcat console 4) Download “Tomcat-connectors-1.2.27-src.zip” and unzip it. a. Copy the following files from “C:tomcat-connectors-1.2.27-srcconf” i. uriworkermap.properties ii. workers.properties iii. workers.properties.minimal b. Paste in here – “C:apache-tomcat-6.0.16conf” 5) Download “mod_jk-1.2.27-httpd-2.2.10.so” from the following path a. Path : http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk- 1.2.27/ b. Ref:
  4. 4. c. Rename from “mod_jk-1.2.27-httpd-2.2.10.so” to “mod_jk.so” d. Copy “mod_jk.so” and paste in here – “C:Program FilesApache Software FoundationApache2.2modules” 6) Configure Apache a. Open “httpd.conf” from “C:Program FilesApache Software FoundationApache2.2conf” b. Add the following code snippet at the end of the file “httpd.conf” LoadModule jk_module quot;C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk.soquot; JkWorkersFile quot;C:/apache-tomcat-6.0.16/conf/workers.propertiesquot; JkLogFile quot;C:/apache-tomcat-6.0.16/conf/from_apache_mod_jk.logquot; JkLogLevel info JkLogStampFormat quot;[%a %b %d %H:%M:%S %Y]quot; # Send servlet for context /examples to worker named ajp13 JkMount /examples ajp13 # Send JSPs for context /examples/* to worker named ajp13
  5. 5. JkMount /examples/* ajp13 7) Configure Tomcat a. Open “server.xml” from “C:apache-tomcat-6.0.16confserver.xml” b. Add the following inside “<Server>” element <Listener className=quot;org.apache.jk.config.ApacheConfigquot; modJk=quot;C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk.soquot; /> c. Add the following between “<Host>” “</Host>” <Listener className=quot;org.apache.jk.config.ApacheConfigquot; modJk=quot;C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk.soquot; /> 8) Start tomcat 9) Wait sometime 5 or 10 seconds 10) Start apache a. Start apache i. Right click apache service icon ii. And click “Open Apache Monitor”
  6. 6. iii. Click Start button. 11) Type “http://localhost/examples/” a. Ref: b. Click “Servlets examples”

×