Hello all, I'm having a problem setting up virtual hosting with mod_jk and Tomcat. On my RedHat linux with apache 1.3x server. I've gone through all of the documentation and everything seems to work right. Tomcat works (i can do http://my-ip:8080 and view all the tests). I added the include for the mod_jk.conf-auto config file and installed the mod_jk.so file into apache successfully. I can do http://my-ip/examples and all the examples work there so apache is successfully communicating with Tomcat. To one of my virtual hosts I add 'JkMount /servlet ajp13' and I added a virtual host entry to /tomcat/conf/server.xml copying the example. I then copied the whole batch of /examples that came with Tomcat into the /servlet directory and check http://virtual-host/servlet/HelloWorldExample and it tries to download the file instead of processing it? Both a HelloWorldExample.class and HelloWorldExample.java are in there. That's the ideal way I'd like it to work.. so I wish I could figure that out. But I kept playing around with it almost figured it out another way. To the virtual host entry in server.xml I added a <Context path = "/java" ... and a docBase="/to/virtual-host/java" > to create a webapplication called java within this virtual hosts directory. I created WEB-INF and all the other directories duplicating the /example directory and copied all of the files over, and it worked successfully. All the servlets worked! So then I try and setup my website using servlets into this virtual-host. I copy one of the servlets into /virtual-host/java/WEB-INF/classes and register it in the /virtual-host/java/WEB-INF/web.xml file. I check ut http://virtual-host/java/ServletName and I get a 500 error "NoClassDefFoundError." This servlet is including another one so it definitely seems to be a classpath issue. I tried adding different classpaths to /tomcat/conf/wrapper.properties and worker.properties and restarting tomcat but when it displays all of the classpath dirs right after startup it wasn't appearing. So eventually I tried creating the env variable CLASSPATH and setting it equal to the /virtualhost/java/WEB-INF/classes directory, restarting and then successfully it displayed all of the old classpaths and now this new one I added too. BUT, it didn't work. And that's everything I could think of to try? I really don't want to scratch all this work and try jserv, i'd like to stick with mod_jk. So if anyone has any ideas i'd love to hear them. Regards, Keith Schacht Keith Schacht http://www.pididdle.com
