Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

mod_jk and apache 2.0

What do I have to do to get JSP's to run in the web root folder?

I have my apache set up to run php and perl and I added the Tomcat server and mod_jk

if I go to localhost/jsp-examples the examples are there and they work, but what I need, is to be able to put jsp's in the apache root folder and have it interpreted by tomcat.

any ideas?

Thanks!
0
k41d3n
Asked:
k41d3n
  • 3
1 Solution
 
ramazanyichCommented:
Apache htp server itself can't execute JSP pages. mod_jk redirects request to Tomcat server which will execute process request and return back to the Apache HTTPD server.
You should add following lines in your httpd.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount *.jsp  ajp13


And workers.properties file:
worker.list= ajp13
# Definition for Ajp13 worker
#
worker.ajp13.port=8009
worker.ajp13.host=Ip address of tomcat server
worker.ajp13.type=ajp13
0
 
k41d3nAuthor Commented:
When I make those changes in my http.conf file, then restart the apache server it fails to start.

I am actually using mod_jk2 not mod_jk that was my mistake in not saying so.

any ideas why it errors?
0
 
ramazanyichCommented:
have never worked with JK2. Only one thing I know that its configuration is differs from JK
0
 
ramazanyichCommented:
Can only poin to site with config guide http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html
0
 
rrzCommented:
I don't know anything about Apache stuff.
>but what I need, is to be able to put jsp's in the apache root folder and have it interpreted by tomcat.                
 But, I think you have to tell Tomcat where to find your JSP files(since you are not putting them in default location.  Please look at    
http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_20883065.html 
rrz
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now