You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by R N <re...@hotmail.com> on 2000/02/15 19:13:59 UTC
desperately need configuration help with apache+tomcat
Hi Jakarta gurus,
i just got on the general mailing list, and just received some posts
regarding apache+tomcat configuration. I've very recently started using
apache with tomcat3.0, and i'm having big trouble setting it up to use my
servlets. this is a fairly long mail, since i'll try to provide some
details, and would be
much obliged if you could read it fully.
I do not have any experience with jserv, so after much bumbling around, i've
concluded the following:
1. any application(in my case, servlets) that i add, must go under
<appname>/WEB-INF/classes
2. i can specify the document path in the server.xml file(basically,
cut-paste the lines for 'examples', and make appropriate changes)
these are the steps i've followed:
1. created my app dir, (say, webapp), put my classes in
webapp/WEB-INF/classes, html files in webapp/html/ ,
2. created the appropriate web.xml file in WEB-INF, also added the
init-param values
now, when i go to http://<host>:9000/webapp/html/login.html, i can see the
page, but if i try to login, the login servlet is not found.(404 error)
so, i moved the servlet and the html file to the examples directory and
modified the html file to so that the servelet path is
../servlets/loginservlet(just as it
is in the other html files, eg cookies.html). now, i can access login.html
from 'http:9000/examples/servlets/login.html'. on clicking the submit
button, it does seem to at least do the servlet lookup, and comes back with
a 'Error 500: java.lang.NoClassDefFoundError".
my questions:
A. i don't understand how the servlet was looked up, i.e. i don't seem any
entries in any of the .conf files, which has an alias for '/servlet' as
'examples/WEB-INF/classes'
B. how can i print out some more details of the error message, so as to
figure out which class was not found?
C. are we still supposed to create/user the jserv.properties file? how about
the zone.properties, etc? I see references to these files in some tomcat
docs, but they weren't part of the apache or tomcat distributions that i
downloaded. i'm on sparc, solaris7. I was able to install and run all the
tomcat examples correctly.
i'm using the JNDI libraries, and i've put all of the in the classpath
before starting tomcat(by editing tomcat.sh).
I also see the following error in my mod_jserv.log file:
[14/02/2000 19:55:27:363] (EMERGENCY) ajp12: can not connect to host
127.0.0.1:9007
[14/02/2000 19:55:27:364] (EMERGENCY) ajp12: connection fail
[14/02/2000 19:55:27:364] (ERROR) an error returned handling request via
protocol "ajpv12"
the port number is correct, but the host ip address is not. I don't know
whether there is some real problem in the host lookup, or if its just a
spurious message.
i know i should be looking at all the earlier posts first, but there
doesn't seem to be any way to search them.
any help will be greatly appreciated!
thanks,
rishi
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com