0

ZK can't run on Apache server integration tomcat7.0

asked 2011-11-02 03:26:21 +0800

leoyc gravatar image leoyc
163 3

updated 2011-11-03 02:05:43 +0800

Hi,all. I want integrat Apache server and tomcat7.0,step by:

1,
#httpd.conf:

include conf/mod_jk.conf
Alias /web "D:/wwwroot/"
<Directory "D:/wwwroot">
Options Indexes MultiViews
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>


2,
# mod_jk.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkMountFile conf/zk.properties
JkLogFile logs/mod_jk2.log
JkLogLevel Warn
JkMount /*.jsp worker1
JkMount /servlet/* worker1
JkMount /*.do worker1


3,
# workers.properties

workers.tomcat_home=TOMCAT_HOME
workers.java_home=JAVA_HOME
ps=\
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1

4,
#zk.properties

/zksandbox/*=worker1
/*.zul=worker1
/*.dsp=worker1

5,
#server.xml

#insert:

<Context path="/web" docBase="D:/wwwroot" reloadable="true" workDir="D:/wwwroot/work"> </Context>
#before </Host>


6,I copy zksandbox into d:\wwwroot\zksandbox

when I open http://localhost/web/zksandbox/index.zul,it can only view index.zul code. why?
can you tell me? thks.

delete flag offensive retag edit

11 Replies

Sort by ยป oldest newest

answered 2011-11-03 15:32:48 +0800

leoyc gravatar image leoyc
163 3

why?

link publish delete flag offensive edit

answered 2011-11-05 10:46:03 +0800

leoyc gravatar image leoyc
163 3

Somebody help me, pls.

link publish delete flag offensive edit

answered 2011-11-10 09:48:13 +0800

vincentjian gravatar image vincentjian
2245 6

Hi,

In step2, can you try add "JkMount *.zul work1" instead of using JkMountFile.

link publish delete flag offensive edit

answered 2011-11-22 03:48:52 +0800

leoyc gravatar image leoyc
163 3

Thank vincentian. follow what you said. it doesn't work.

link publish delete flag offensive edit

answered 2011-11-22 04:46:15 +0800

vincentjian gravatar image vincentjian
2245 6

Hi,

In step2, add "JKMount *.zul worker1", comment out #JkMountFile conf/zk.properties
In stpe6, did you add zksandbox.war or just zksandbox directory?

Also make sure the mod_jk.so is the latest version.

link publish delete flag offensive edit

answered 2011-11-22 09:02:22 +0800

leoyc gravatar image leoyc
163 3

vincenttian,thanks you for reply. I sure I do. but *.zul doesn't work, *.jsp it's ok.

link publish delete flag offensive edit

answered 2011-11-22 09:47:27 +0800

vincentjian gravatar image vincentjian
2245 6

Hi,

Is *.jsp also in zksandbox project?

link publish delete flag offensive edit

answered 2011-11-23 01:17:39 +0800

leoyc gravatar image leoyc
163 3

updated 2011-11-28 07:14:24 +0800

yes. *.jsp can run, *.zul can't run, only can view code in IE.

link publish delete flag offensive edit

answered 2011-11-28 07:16:05 +0800

leoyc gravatar image leoyc
163 3

who can tel me why? thank you.

link publish delete flag offensive edit

answered 2011-12-02 06:16:41 +0800

vincentjian gravatar image vincentjian
2245 6

Hi

I have tried it out with the following settings and works fine:

1. httpd.conf

include conf/mod_jk.conf
Alias /web "C:/wwwroot" 
<Directory "C:/wwwroot"> 
	Options Indexes MultiViews
	AddOutputFilter Includes html 
	AllowOverride None
	Order allow,deny
	Allow from all
</Directory> 

2. mod_jk.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkMountFile conf/zk.properties
JkLogFile logs/mod_jk2.log
JkLogLevel Warn

3. workers.properties
workers.tomcat_home="C:\Program Files\Apache Software Foundation\Tomcat 7.0"
workers.java_home="C:\Program Files\Java\jre6"
ps=\
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1

4. zk.properties
/zksandbox/*=worker1
!*.html=*
!*.jpeg=*
!*.jpg=*
!*.png=*
!*.gif=*
!*.css=*
!*.js=*

5. server.xml, modify appBase attribute in Host element:
<Host name="localhost"  appBase="C:/wwwroot"
            unpackWARs="true" autoDeploy="true">
</Host>

6. Visit http://localhost/zksandbox/index.zul

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-11-02 03:26:21 +0800

Seen: 796 times

Last updated: Dec 05 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More