• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlet problem on apache-tomcat

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I would like to run java(jsp ,servlet and javabean) useing apache
webserver on Linux platform.
For that I have installed Tomcat3.3 and mod_jk.
I am using apache1.3 version which has DSO , EAPI support and perl 5 has
already installed.Using apxs I have made mod_jk.so and kept at
$APACHE_HOME/libexec.
Now I have include mod_jk.conf file in httpd.conf. and I am also including
the following line in the httpd.conf
LoadModule jk_module libexec/mod.jk.so
AddModule mod_jk.c
JkWorkersFile $TOMCAT_HOME/conf/workers.properties
JkLogfile $APACHE_HOME/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M :S $Y]"

JkMount /*.jsp ajp13
JkMount /servlet/* ajp13

my class file is at /var/www/servlet and jsp file is at /var/www/jsp.....
Following line I have change in my server.xml which is under $TOMCAT_HOME/conf
<Context path="/servlet" docBase="/var/www/servlet" crossContext="false" debug="0" reloadable="true"/>
<Context path="/servlet" docBase="/var/www/servlet" crossContext="false" debug="0" reloadable="true"/>
while calling from brouser I am using http://Ipaddress/jsp/file name and
this is working fine
but In case of class file for which I am using
http://Ipaddress/servlet/file name is not working
my Question is what are the changes that I have to do( in server.xml or any
where)to run servlet/class files....
Please give me suggestion....
Thank u.
saumitra
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does tomcat's log files say? There could be many reasons why this isn't working. Did you create a web.xml file in /var/www/servlet/WEB-INF/ directory?
Too many unknowns, please elaborate.
 
Saumitra Sarkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank u for ur reply.I have just copy web.xml file from $TOMCAT_HOME/webapps/examples/WEB-INF into /var/www/servlet/WEB-INF...
Whar are the changes that I will have to do in web.xml file
ajp13 port is working fine because
http://localhost/examples/servlet/file name is running.
what to do..please advice
thank u...
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably you didn't define the servlet in the web.xml file using the servlet mapping and definition element sequences. You can no longer just say "servlets are in this directory" and have it work - that was insecure and most servers no longer support it.
 
Saumitra Sarkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Useing apache servlet is not running..log file says-----------
[Fri Mar 01 17:38:22 2002] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process.
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 0
[Fri Mar 01 17:38:22 2002] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process.
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 1
[Fri Mar 01 17:38:22 2002] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process.
[Fri Mar 01 17:38:22 2002] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 2
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this from Servlets -> Apache/Tomcat
 
reply
    Bookmark Topic Watch Topic
  • New Topic