Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jk_mod configuration

Status
Not open for further replies.

karephul

Programmer
May 14, 2006
24
US
pardeep@pardeep-laptop:/$ cat /etc/apache2/mods-enabled/jk.load
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

JkMount /jsp-examples worker1
JkMount /jsp-examples/* worker1

JkMount /servlets-examples worker1
JkMount /servlets-examples/* worker1

JkMount /ch11 worker1
JkMount /ch11/* worker1
--------------------------------------------

works perfectly


works perfectly

------------------------------------------------


does not work

Apache/2.0.55 (Ubuntu) mod_jk/1.2.18 PHP/5.1.6 Server at localhost Port 80

-------------------------------------------------

Deployement discriptor

pardeep@pardeep-laptop:/usr/share/tomcat5/webapps/ch11/WEB-INF$ cat web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"<web-app>
<display-name>Example Applications</display-name>
<servlet>
<servlet-name>Servlet</servlet-name>
<servlet-class>ch11.ServletClass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet</servlet-name>
<url-pattern>/ch11.ServletClass</url-pattern>
</servlet-mapping>
</web-app>pardeep@pardeep-laptop:/usr/share/tomcat5/webapps/ch11/WEB-INF
$

------------------------------------------
Can you please tell me what should I write in the browser !!
so that this servlets works .!!!
 
I have Appache 2 as a web server and Tomcat 5 as a web container. All the client request are handled by Apache and if the request is for servlet that is forwaded to Tomcat, this way it is supposed to give good performace.

to make Apache talk to Tomcat we need jk_mod modules to be enabled.. so I enabled it .. and from one of the tutorials i found that I have to configure it .. so below is the contensts that I have in jk.load


pardeep@pardeep-laptop:/$ cat etc/apache2/mods-enabled/jk.load

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

JkMount /jsp-examples worker1
JkMount /jsp-examples/* worker1

JkMount /servlets-examples worker1
JkMount /servlets-examples/* worker1

JkMount /ch11 worker1
JkMount /ch11/* worker1
--------------------------------------------

works perfectly


works perfectly


this also works perfectly,
------------------------------------------------


does not work (ch11 is the directory in webapp which contains the .class files for the test example

and below is the error which is shown in the browser

Apache/2.0.55 (Ubuntu) mod_jk/1.2.18 PHP/5.1.6 Server at localhost Port 80

-------------------------------------------------
Just have look at the Deployment discriptor

Deployement discriptor

pardeep@pardeep-laptop:/usr/share/tomcat5/webapps/ch11/WEB-INF$ cat web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"<web-app>
<display-name>Example Applications</display-name>
<servlet>
<servlet-name>Servlet</servlet-name>
<servlet-class>ch11.ServletClass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet</servlet-name>
<url-pattern>/ch11.ServletClass</url-pattern>
</servlet-mapping>
</web-app>pardeep@pardeep-laptop:/usr/share/tomcat5/webapps/ch11/WEB-INF
$

------------------------------------------
Can you please tell me what should I write in the browser !!
so that this servlets works .!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top