This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet problem on apache-tomcat

 
Saumitra Sarkar
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Jason Brawner
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this from Servlets -> Apache/Tomcat
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic