Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to configure tomcat handle jsp files from apache DocumentRoot

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • 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 .
 
Mav Ricky
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64822
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic