aspose file tools*
The moose likes Tomcat and the fly likes servlet problem on apache-tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "servlet problem on apache-tomcat" Watch "servlet problem on apache-tomcat" New topic
Author

servlet problem on apache-tomcat

Saumitra Sarkar
Greenhorn

Joined: Feb 26, 2002
Posts: 3
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

Joined: Dec 19, 2001
Posts: 66
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.


Jason E. Brawner<br />Sun Certified Java Programmer<br />Sun Certified Web Component Developer
Saumitra Sarkar
Greenhorn

Joined: Feb 26, 2002
Posts: 3
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

Joined: Jun 25, 2001
Posts: 16065
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Saumitra Sarkar
Greenhorn

Joined: Feb 26, 2002
Posts: 3
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

Joined: Feb 20, 2001
Posts: 3695

Moving this from Servlets -> Apache/Tomcat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet problem on apache-tomcat