Hello 
I am using linux9.0 and jdk1.4.
I have installed tomcat4.1.24 and Apche2.0,
I successfully connected them using mod_jk.
I added a listener object in server.xml for communication between these
two.

<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
      modJk="/etc/httpd/modules/mod_jk.so" jkDebug="info"
      workersConfig="/home/damnish/tomcat24/conf/workers.properties"
      jkLog="/home/damnish/tomcat24/logs/mod_jk.log"/>
                                                                                       
                                     
This generate  modjk.conf file in catalina_home/conf/auto/
Which is included in httpd.conf

It is working fine but not in desired way.
What it do it add all the context define in server.xml to mod_jk.conf
and all request coming for this context are forwarded to tomcat.
Suppose I have my webapp having context webapp1 which has
JSP,Images,html pages.
So it add a line in mod_jk.conf
"/webapp1/* tomcat"
and this redirect all request coming to apache to tomcat.
And all content is served by tomcat including html/images(static
content).
If i create a Alias in httpd.conf for the same app to serve static
content by apache and dynamic by tomcat, I added a Alias line in
http.conf and changed mod_jk.conf >>
I replaced old line with this "/webapp1/*.jsp tomcat,
As far as my understanding only jsp request should get forwarded to
tomcat and static content should come from Alias defined.
I configured this in Apche1.3.* and it was working in desired way.
But this is not working in this format.
In above case(with Alias) request is not getting forwarded to
tomcat(mod_jk).
It print full jsp as text file in browser.
Am I doing anything wrong.
ANy help in this regard will be appreciated.
Thanks in advance.

Damnish



Reply via email to