Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to configure tomcat handle jsp files from apache DocumentRoot

 
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I compiled/installed/configured both the apache and tomcat and mod_jk
it seams to work great BUT I didn�t found the way in the configuration
to redirect the jsp files that sitting in the defined apache documentRoot
now my config in the httpd.conf looks like this :

# Load mod_jk
LoadModule jk_module libexec/mod_jk.so

# configure mod_jk
JkWorkersFile /tomcat/conf/workers.properties
JkLogFile tomcat/logs/mod_jk.log
JkLogLevel debug

JkMount /*.jsp testWorker
JkMount /servlet/*.jsp testWorker

with this configuration the apache+tomcat serves html/php/whatever files that resides in the defined apache DocumentRoot
BUT all the jsp files handles only if its sites in the tomcat tomcat/webapps/ROOT dir

and I will like to configure it use the apache DocumentRoot both for jsp files and other files .
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Meir Yan

u have addded worker.properties in apache /conf file to ur appliaction...........

---------------------------------------------------
worker.list=worker1
# ------------------------
# Tomcat server
# ------------------------
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8090
-------------------------------------------------------




my application is out tomcat and deployed independently
i have added mod_jk.conf in tomcat/conf

--------------------------------------------------------
LoadModule jk_module modules/mod_jk.dll

<IfModule mod_jk.c>

JkWorkersFile C:/Tomcat4.1/conf/workers.properties
JkLogFile logs/jk.log
JkLogLevel warn
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /examples/* ajp13

</IfModule>
------------------------------------------------------------


i think it will help your cause a bit
if u still have some problem
plz ask again



regards
Ankur
 
Sheriff
Posts: 67620
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Ankur", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic