Re: 3.3a, cant find file when refresh
I don't know why Keith, but I have been able to reproduce the same situation here. It appears you can't have a jsp:include .. tag on the first line of your jsp file without problems in Tomcat 3.3. It works ok in 3.2 on the first line. Dunno about 4. -Scott -- Scott Tatum || [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom || http://www.worldcom.com/ Keith Ng wrote: Hi I just solved this very weird problem. Im using IE 6.0. i added a blank line to my jsp file from the top, and tat solves the whole problem.. strangely enuf... e.g. line 1: line 2: jsp:include page = ../jsp/PSTemplate.htm flush = true/ and the whole problem is gone. The page works fine even after refreshing. Theres no more ERROR:200. Whats going on can someone explain to me...??? -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 1:48 AM To: 'Tomcat Users List' Subject: RE: 3.3a, cant find file when refresh Which browser are you using? Also, what is content of the source files involved, preferably simplified so only that which is need to duplicate the problem is included? Cheers, Larry -Original Message- From: Keith Ng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:33 AM To: Tomcat Users List Subject: RE: 3.3a, cant find file when refresh Thanks larry, u helped me clarify an issue. Can u please help me with my other problem? Its regarding the ERROR:200 i get on my browser when i refresh... -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 12:07 AM To: 'Tomcat Users List' Subject: RE: 3.3a, cant find file when refresh This technically isn't an error. It indicates that the browser, realized that the Threadmill.jpg it is reading during the refresh isn't any newer than the Threadmill.jpg it has already cached locally. In order to save time, the browse simply closed the connection and used the local copy of Threadmill.jpg. Because the browser closed the connection before it read all the data, it causes Tomcat to generate the log output you see. Cheers, Larry -Original Message- From: Keith Ng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:53 AM To: Tomcat Users List Subject: 3.3a, cant find file when refresh Hi Guys I have a html file which is included in a jsp page using the following method jsp:include page = ../jsp/PSTemplate.htm flush = true/ When I first load the page, everythings shows up as normal, but when I refresh, the browser doesnt load it and gives me ERROR:200. I recall it was the same with my previous assignmnet, which I tried to load a image file which gets loaded sometimes and other times it can be loaded. ERROR STATEMENT: == == == 2002-02-19 23:40:55 - SessionIdGenerator: Created random class java.security.SecureRandom 2002-02-19 23:41:24 - Ctx(/PS) : IOException in R( /PS + /images/Threadmill.jpg + null) - java.net.SocketException: Connection aborted by peer: socket write error == == == I have deduced for this case, its because it cant load a certain JPG file intermittenly, causing the rest of the page to have problems. How can i solve this? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: workers.properties Configuration??
You don't have to configure it if you are running Tomcat standalone, but you do have to configure it if you are running Tomcat with Apache. I am not familiar with other webservers that Tomcat can connect with. -Scott -- Scott Tatum || [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom || http://www.worldcom.com/ Brenda Mijares wrote: I heard somewhere that is you have tomcat on a unix box you do NOT need to configure the workers.properties file Has anyone else heard this or read this??
Re: jsp function declaration
If that is the correct code for the method, then the problem is you have a closing brace for the else without an open brace. What's probably happening is the brace you think is closing the else is actually closing the method, and the brace you think is closing the method is closing the entire class before the service method is auto generated during conversion to a servlet, thus the error. Either add an opening brace for the else, or remove one of the closing braces at the end. -Scott Jason Novotny wrote: Hi, I have a very simple JSP function that looks like: %! public String isSelected(String var, String checkvar) { if (var.equals(checkvar)) { return selected; } else return ; } } % Only problem is whenever I load my page, I get the following error: org.apache.jasper.JasperException: Unable to compile /usr/local/tomcat/tomcat-3.3-m2/work/DEFAULT/demo/jsp/filetransfer/showfiles_1.java:25: Class or interface declaration expected. static { ^ /usr/local/tomcat/tomcat-3.3-m2/work/DEFAULT/demo/jsp/filetransfer/showfiles_1.java:13: class jsp.filetransfer.showfiles_1 must be declared abstract. It does not define void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) from class org.apache.jasper.runtime.HttpJspBase. public class showfiles_1 extends org.apache.jasper.runtime.HttpJspBase { ^ 2 errors I've tried adding thsi snippet to the numguess.jsp example without any problem and all the books I've read indicate this is perfectly acceptable programming. Any ideas, why adding methods doesn't work with my page? Thanks very much, Jason -- Jason Novotny [EMAIL PROTECTED] Home: (510) 610-8360Work: (510) 486-8662 NERSC Distributed Computing http://www-didc.lbl.gov -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
Re: FW: mod_jk and mod_jserv compiling problems
That's because you are in Solaris, and Sue was working in Linux. Fortunately, I also have a Solaris box for reference here. Your lines should look like: my $CFG_LD_SHLIB = q(ld); # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-G); # substituted via Makefile.tmpl my $CFG_LIBS_SHLIB= q();# substituted via Makefile.tmpl Now I see that this one is actually using ld, which is what I suspected from the beginning. There is an option to apxs when compiling under Solaris, -lposix4 I believe, that is highly recommended. I know it is picky about where in the apxs the option appears. I would search the archives for posix and see what turns up. Hope this helps. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Kevin Shortt wrote: well configured limits on this list do not allow me to send my full output of my problem. (this is my third message in 5 minutes). I have attached my abridged version. -k -Original Message- From: Kevin M. Shortt [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 1:31 PM To: Tomcat-User Subject: RE: mod_jk and mod_jserv compiling problems From: Scott Tatum [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 6:43 PM I did some looking in the tomcat-user archives, and found several posts along these lines. I think what you need to do next is check your version of perl. I am guessing you have 5.005 or somewhere thereabouts. Check it by doing perl -v. Make sure you have 5.x. Once you've done that, go and edit the apxs file (it's a perl script). You should see some lines like this after the initial comments are done: my $CFG_LD_SHLIB = q(gcc); # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl my $CFG_LIBS_SHLIB= q();# substituted via Makefile.tmpl They should look like this (I pasted this from my apxs which is on RH62, Apache 1.3.19). In particular I'm guessing the CFG_LD_SHLIB may be incorrect. Try changing those lines to this if they are different and compile again. I tried this. It didn't work. Here are my details: Solaris 7, perl 5.005_03 apache 1.3.19 (./configure --prefix=/usr/local/apache \ --enable-module=ssl\ --enable-module=so \ --enable-rule=SHARED_CORE ) mod_ssl 2.8.2-1.3.19 (openssl 0.9.6a, mm-1.1.3) jaxp-1.0.1 java 1.3 jsse 1.0.2 tomcat 3.2.1 (Ant 1.3, ServletAPI 3.2) mod_jk my apxs call: /usr/local/apache/bin/apxs -o mod_jk.so -DSOLARIS\ -I../jk \ -I/usr/java/include \ -I/usr/java/include/solaris \ -c *.c ../jk/*.c This is what my apxs call dies with when called: gcc -DSOLARIS2=270 -DMOD_SSL=208102 -DEAPI -DUSE_EXPAT -I../lib/expat-lite - DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/ solaris -DSOLARIS -c ../jk/jk_worker.c -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o apxs:Break: Command failed with rc=255 Now taking Scott Tatum's advice, I get different results. I did two attempts: 1. with the gcc -shared 2. with only the gcc. I've attached a transcript of what I did. (I attempted to email it in this message, but the qmail server denied my message size.) -k Name: typescript typescriptType: unspecified type (application/octet-stream) Encoding: quoted-printable
Re: Setting Contexts to work like vhosts
An excellent solution Brandon! ;-) -Scott (inside joke) -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Brandon Cruz wrote: Well, We have several developers all with their own server and applications. They check everything into one version control, which routinely gets uploaded to the one production server. This production server has several vhosts running on it. There is no way to set contexts on the development servers and have all the links work properly, so what we have to do is create cnames for each site and dev box. For example, for the first developer, we have site1-dev1, site2-dev1, etc. For another developer we have site1-dev2, site2-dev2, etc. That way the developers do not have to change contexts every time they want to work on a different virtual site on their dev machine. There are a couple possible solutions, but this seems to work best. -Original Message- From: Mark Mynsted [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 11:53 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Setting Contexts to work like vhosts Ok. How did you do it? Sincerely yours; Mark Mynsted VHA Management Information Systems Client Services [EMAIL PROTECTED] (972) 830 - 0592, Internal x1592 [EMAIL PROTECTED] 4/26/2001 11:43:36 AM Just in case anyone was wondering, I got the problem solved. If anyone else runs into a similar problem, I can help out. Brandon -Original Message- From: Brandon Cruz [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 9:30 AM To: [EMAIL PROTECTED] Subject: Setting Contexts to work like vhosts I am trying to figure out a way to set contexts so that they will work like virtual hosts (as far as the root directory and everything goes). The reason I can't use vhosts is because it is a development machine. Basically, I want my links to work properly on the development machine, and when I switch them to production on an actual virtual host. Is there a way to accomplish this? Thanks! Brandon
Re: I am writing detailed documentation on virtual hosting...
I already thought of something that I left out of the outline, and that is a section full of EXAMPLES. Multiple examples for each way that Tomcat can be configured for virtual hosts. -Scott Scott Tatum wrote: It seems like half the questions posted these days to the mailing list have something to do with virtual hosting. The existing documentation covers most of the bases, but it is spread across several documents and contains outdated information that is confusing (e.g. mod_jserv). Therefore, I am in the process of writing detailed documentation on setting up virtual hosting. The documentation right now has a few limitations: 1. Only Tomcat 3.2.x will be discussed. There is no production version of Tomcat 4, and everyone using Tomcat 3 should be using the latest version. 2. Only mod_jk will be discussed. Everyone who is setting up Tomcat now should be using mod_jk - I see no reason to discuss mod_jserv. 3. Setup is only for a unix environment. I don't currently have any experience setting up Tomcat in a Windows environment, though setting up Tomcat standalone should be almost identical. 4. Only webserver integration discussed is with Apache. This is the only webserver I have experience integrating Tomcat with. I would do some testing with IIS but I don't have access to it. If someone else would be willing to provide similar documentation for IIS and/or iPlanet integration, that would be great! Below is an initial outline for the document. The documentation will of course be in HTML, and I will try to mimic the formatting style of the existing documentation. I welcome suggestions for changes/additions/enhancements to this outline - I came up with it very quickly. Once I get some feedback from this I will begin writing the documentation, hopefully within in the next couple of days. Virtual Hosting and Tomcat 1. Introduction 2. Virtual Hosting Options 2.1 Tomcat Standalone 2.2 Tomcat with Apache 2.2.1 Apache + Single Tomcat Instance 2.2.2 Apache + Multiple Tomcat Instances 2.4 AJP12 vs. AJP13 2.5 General Do's and Dont's 3. Configuring Tomcat Standalone 3.1 Configuration Files Involved 3.2 Modifying server.xml 4. Configuring Tomcat + Single Tomcat Instance 4.1 Configuration Files Involved 4.2 Configuring server.xml 4.3 Configuring workers.properties 4.4 Configuring uriworkermap.properties 4.5 Configuring mod_jk.conf 4.6 Testing and Troubleshooting 5. Configuring Tomcat + Multiple Tomcat Instances 4.1 Configuration Files Involved 4.2 Creating and Configuring Separate server.xml Files 4.3 Configuring workers.properties 4.4 Configuring uriworkermap.properties 4.5 Configuring mod_jk.conf 4.6 Testing and Troubleshooting -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
I am writing detailed documentation on virtual hosting...
It seems like half the questions posted these days to the mailing list have something to do with virtual hosting. The existing documentation covers most of the bases, but it is spread across several documents and contains outdated information that is confusing (e.g. mod_jserv). Therefore, I am in the process of writing detailed documentation on setting up virtual hosting. The documentation right now has a few limitations: 1. Only Tomcat 3.2.x will be discussed. There is no production version of Tomcat 4, and everyone using Tomcat 3 should be using the latest version. 2. Only mod_jk will be discussed. Everyone who is setting up Tomcat now should be using mod_jk - I see no reason to discuss mod_jserv. 3. Setup is only for a unix environment. I don't currently have any experience setting up Tomcat in a Windows environment, though setting up Tomcat standalone should be almost identical. 4. Only webserver integration discussed is with Apache. This is the only webserver I have experience integrating Tomcat with. I would do some testing with IIS but I don't have access to it. If someone else would be willing to provide similar documentation for IIS and/or iPlanet integration, that would be great! Below is an initial outline for the document. The documentation will of course be in HTML, and I will try to mimic the formatting style of the existing documentation. I welcome suggestions for changes/additions/enhancements to this outline - I came up with it very quickly. Once I get some feedback from this I will begin writing the documentation, hopefully within in the next couple of days. Virtual Hosting and Tomcat 1. Introduction 2. Virtual Hosting Options 2.1 Tomcat Standalone 2.2 Tomcat with Apache 2.2.1 Apache + Single Tomcat Instance 2.2.2 Apache + Multiple Tomcat Instances 2.4 AJP12 vs. AJP13 2.5 General Do's and Dont's 3. Configuring Tomcat Standalone 3.1 Configuration Files Involved 3.2 Modifying server.xml 4. Configuring Tomcat + Single Tomcat Instance 4.1 Configuration Files Involved 4.2 Configuring server.xml 4.3 Configuring workers.properties 4.4 Configuring uriworkermap.properties 4.5 Configuring mod_jk.conf 4.6 Testing and Troubleshooting 5. Configuring Tomcat + Multiple Tomcat Instances 4.1 Configuration Files Involved 4.2 Creating and Configuring Separate server.xml Files 4.3 Configuring workers.properties 4.4 Configuring uriworkermap.properties 4.5 Configuring mod_jk.conf 4.6 Testing and Troubleshooting -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
Re: mod_jk and mod_jserv compiling problems
I think you were on the best track with #3, compiling and installing Apache yourself first. When you compile Apache, make sure that your configure line has at least the --enable-shared=so option so that you can your your mod_jk DSO. I usually compile with --enable-shared=max option so that I can remove modules if I don't need them by commenting them out in httpd.conf. You want to compile mod_jk, not mod_jserv, and you don't want to get a precompiled version from somewhere. Your best best is to get both the binary and source versions of Tomcat 3.2.1. Install the binary version (basically just untar it where you want it and set the TOMCAT_HOME environment variable). Untar the source version just to compile mod_jk.so. Change to the src/native/apache1.3 directory under the Tomcat source directory. Enter this line, replacing JAVA_HOME with the directory of your jsdk installation (e.g. /usr/java/jdk1.3.0_02): apxs -o mod_jk.so -I../jk -IJAVA_HOME/include -I/JAVA_HOME/include/linux -c *.c ../jk/*.c If apxs is not in your path, then you will have to put the absolute path for apxs in order for it to see it. For example if your apache bin directory is /home/httpd/bin, then you replace apxs with /home/httpd/bin/apxs. Once you run this, you'll have a mod_jk.so in that directory. Move that file to the libexec directory under the Apache directory. Then edit httpd.conf and put in LoadModule and AddModule directives in order with the other directives: LoadModule jk_module libexec/mod_jk.so AddModule mod_jk.c I think the mod_jk.conf-auto adds its own LoadModule line. You will want to copy mod_jk.conf-auto to mod_jk.conf, remove the LoadModule entry from that file, and include that file in httpd.conf. Any more questions, just ask. -Scott Sue Evans wrote: Hello, I have spent days trying to get tomcat configured. I can't seem to get/create either mod_jk or mod_jserv that will work. I am on Linux 6.2, using Apache 1.3 and Tomcat 3.2.1 . I have tried the following with these results: 1. First tried using the Apache server that installed automatically when I installed Linux. Problem is that nowhere on my system could I find apxs - so I copied it form another Linux installation. I tried to then compile mod_jserv. Keep getting an error when I run the command apxs -c -o mod_jserv.so *.c to create mod_jserv. Get the error :No such file or directory. I don't know what it is referring to - it is finding apxs okay, what file or directory is it referring to? 2. Next I tried copying the binary mod_jserv from the tomcat download site and that didn't work either. When I went to startup apache, I get the error: Loade DSO libexec/mod_jserv.so uses plain Apache 1.3 API, this module might crash upon EAPI. Please recompile it with -DEAPI! I have no idea what this means. 3. Next I tired compiling my own Apache version 1.3 and got that all installed with DSO enabled. Again, tried creating the mod_jserv and mod_jk files using apxs and again got the error No such file or directory. Still don't know what that is referring to. 4. Next tried using the binary mod_jserv that I had downloaded from the tomcat download site. Didn't work. Apache won't start. I get no errors, nothing in the log files, nothing in configstatus, NOTHING! (very frustrating). Just says not started. 5. Next I tried using the binary mod_jk that I had downloaded from the tomcat download site. Didn't work. Apache won't start. This time I at least get an error message. It says API module structure 'jk_module; in file /usr/local/apache/libexec/mod_jk.so is garbled - perhpas this is not an Apche module DSO? Apache could not be started. (I tried re-downloading it but to no avail!) So... any ideas? To recap: 1. The downloaded binary mod_jk.so and mod_jserv.so don't seem to work. 2. I can't create new mod_jk.so or mod_jserv.so because apxs reports No such file or directory when I enter the commands as given in the documentation. As I said -- I have spent DAYS on this and am completely frustrated. Any help is surely appreciated. - Sue Evans -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
Re: mod_jk and mod_jserv compiling problems
I'm not sure, but it looks like it's bombing when it's done compiling and is trying to link all the object files together. Perhaps it is trying to find the ld command and can't? Do a which ld from the command line to make sure you have it. On RH62, it should be /usr/bin/ld. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Sue Evans wrote: Hello, thanks very much to those who responsed with suggestions. I have made progress! I re-compiled Apache and apxs is now working. I have tried recompiling mod_jk following the instructions below. here is what I am typing, and here is what I get as an error: I type: /usr/local/apache/bin/apxs -o mod_jk.so -I../jk -I/usr/java/jdk1.3.0_02/inc lude -I/usr/java/jdk1.3.0_02/include/linux -c *.c ../jk/*.c What I get is this: gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c mod_jk.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_ajp12_wo rker.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_ajp13.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_ajp13_wo rker.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_connect. c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_jni_work er.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_lb_worke r.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_map.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_msg_buff .c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_nwmain.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_pool.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_sockbuf. c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_uri_work er_map.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_util.c gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/inclu de -I../jk -I/usr/java/jdk1.3.0_02/include -I/usr/java/jdk1.3.0_02/include/linux -c ../jk/jk_worker.c -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buf f.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker. o mod_jk.o apxs:Break: Command failed with rc=255 Any ideas? Again, thanks very much to all who responded! It is a big help. I appreciate your time. - Sue -Original Message- From: Scott Tatum [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: Re: mod_jk and mod_jserv compiling problems I think you were on the best track with #3, compiling and installing Apache yourself first. When you compile Apache, make sure that your configure line has at least the --enable-shared=so option so that you can your your mod_jk DSO. I usually compile with --enable-shared=max option so that I can remove modules if I don't need them by commenting them out in httpd.conf. You want to compile
Re: mod_jk and mod_jserv compiling problems
Sue, I did some looking in the tomcat-user archives, and found several posts along these lines. I think what you need to do next is check your version of perl. I am guessing you have 5.005 or somewhere thereabouts. Check it by doing perl -v. Make sure you have 5.x. Once you've done that, go and edit the apxs file (it's a perl script). You should see some lines like this after the initial comments are done: my $CFG_LD_SHLIB = q(gcc); # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl my $CFG_LIBS_SHLIB= q();# substituted via Makefile.tmpl They should look like this (I pasted this from my apxs which is on RH62, Apache 1.3.19). In particular I'm guessing the CFG_LD_SHLIB may be incorrect. Try changing those lines to this if they are different and compile again. -Scott Sue Evans wrote: Hello all, I still have not been able to get mod_jk working. If anyone has any ideas, I'd like to hear them! I did FINALLY get mod_jserv working. Here is what I did: I decided to try to follow the instructions for downloading Jserv binaries that someone sent in an earlier reply to my problem. 1. First went to http://java.apache.org/jserv/install/howto.unix_install.html 2. From there it gives specific requirements for building Jserv. I didn't previously have the Java Servlet Development Kit 2.0, so I got that from http://java.sun.com/products/servlet/archive.html . (Maybe this is related to my problems with mod_jk?) 3. I untarred the JSDK2.0 and put it in a directory on my system. 4. THen, I downloaded the Jserv binary from http://java.apache.org/jserv/dist .(There are a bunch or rpms which I avoided and got the gz file, and opened that into a temp directory on my system. 5. THen, I went back to http://java.apache.org/jserv/install/howto.unix_install.html and followed the instructions from the section titled Configure Apache JServ, and from the email from Sendai. He says: ./configure --prefix=/usr/local/jserv --with-apxs=/usr/local/apache/bin/apxs --with-jdk-home=/path/to/jdk --with-JSDK=/path/to/jsdk.jar --disable-debugg ing (Note: I didn't find a jsdk.jar file on my machine anywhere, but I put the path to where I had installe jsdk2.0 in step 3 above and that seemed to work okay.) And Wallah! It worked! Geeze! What an incredible task this was! I have to say that previously on another Linux machine, I followed the basic instructions for compiling the mod_jserv by downloading the src distribution of tomcat and then going into the src/native/apache/jserv directory and typing the command apxs -c -o mod_jserv.so *.c and it worked like a charm. I don't know why it isn't working on this setup, but it isn't. And like I said, I never could get mod_jk working -- and that seems to be the preferred way to set this up. So, I would still like informaiton if anyone figures out what else I might try. In the mean time, I hope this information is helpful to someone else! - Sue Evans -Original Message- From: Kevin Shortt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 4:39 PM To: [EMAIL PROTECTED] Subject: RE: mod_jk and mod_jserv compiling problems I am getting this EXACT same error on Solaris 2.7. It appears that apxs is calling a command with arguments only. I haven't solved my problem either. Any help would be appreciated. I will post my solution when I resolve it. -k -Original Message- From: Sue Evans [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 3:31 PM /usr/local/apache/bin/apxs -o mod_jk.so -I../jk -I/usr/java/jdk1.3.0_02/inc lude -I/usr/java/jdk1.3.0_02/include/linux -c *.c ../jk/*.c What I get is this: -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buf f.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker. o mod_jk.o apxs:Break: Command failed with rc=255 -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
Re: Tomcat vs. other app servers
Before using Tomcat, our group had spent several k's on JRun 3.0 application server. We have several Intranet applications that receive thousands of hits per day. Under JRun we were experiencing daily lockups. After Service Pack 2 for JRun 3 did not fix the problem, I tested out Tomcat 3.2.1. We eventually transitioned all of our jsp/servlet applications from JRun to Tomcat, and have not had a single lockup since. The Tomcat server also serves pages faster IMO. JRun does not support servlet reloading either. From my experience, Tomcat has high degrees of performance, scalability, and especially reliability. The only issue I don't know much about is security. It is not as much of a concern to us as all of our applications are Intranet-only. Tomcat has been rock-solid for us and we hope to use it for all our future Intranet applications, and are looking forward to a production release of Tomcat 4. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Henrik Ross wrote: What are peoples opinions on Tomcat vs. other app servers? Performance, scalability, security, reliability? Can Tomcat function in a real production business environment?
Re: Tomcat vs. other app servers
Everything remained the same except swapping JRun with Tomcat. Sun Enterprise 250 (1 gig RAM) Solaris 2.7 Apache 1.3.14 Tomcat 3.2.1 (mod_jk) I liked the nice web interface for JRun setup/admin, but IMO Tomcat has it beat just about everwhere else. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Jeff Kilbride wrote: Hi Scott, That's great to hear. May I ask what environment you were running JRun under and is it the same environment you're now using Tomcat under? Thanks, --jeff - Original Message - From: "Scott Tatum" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 2:52 PM Subject: Re: Tomcat vs. other app servers Before using Tomcat, our group had spent several k's on JRun 3.0 application server. We have several Intranet applications that receive thousands of hits per day. Under JRun we were experiencing daily lockups. After Service Pack 2 for JRun 3 did not fix the problem, I tested out Tomcat 3.2.1. We eventually transitioned all of our jsp/servlet applications from JRun to Tomcat, and have not had a single lockup since. The Tomcat server also serves pages faster IMO. JRun does not support servlet reloading either. From my experience, Tomcat has high degrees of performance, scalability, and especially reliability. The only issue I don't know much about is security. It is not as much of a concern to us as all of our applications are Intranet-only. Tomcat has been rock-solid for us and we hope to use it for all our future Intranet applications, and are looking forward to a production release of Tomcat 4. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Henrik Ross wrote: What are peoples opinions on Tomcat vs. other app servers? Performance, scalability, security, reliability? Can Tomcat function in a real production business environment?
Re: Fed up to the back teeth with tomcat !!!
At WorldCom our group is using Tomcat 3.2.1 along with various versions of Apache and Solaris in production environments for Intranet applications. We have one production box serving several apps via virtual hosts, each with their own Tomcat instance. They all get thousands of hits a day (one of them averages over 10k) and we never have to restart the server for anything other than to upgrade the application files periodically. Now that I have fixed the utilization problems I am VERY happy with the stability and performance of Tomcat in a production environment, and my bosses are too. :) -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Srinivas Kurella wrote: I have the same problem. I am running tomcat 3.2.1 on solaris without apache. There is not much of a db activity going on. To me it looks as if tomcat dies even if there is no activity or hits after a while. From the other messages , it looks like it is a bit more stable on Linux than other OSs. Srini -Original Message- From: Kevin Sangeelee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 4:27 PM To: [EMAIL PROTECTED] Subject: RE: Fed up to the back teeth with tomcat !!! And another, we're serving up 5000 pages per day from our application (April stats), Tomcat has never crashed, and has run for well over a month without hitch (restarting Tomcat only necessary when the application gets updated). RH Linux 6, Tomcat 3.2.1, Apache 1.3.9, Sun JDK 1.2 Kevin On Wed, 11 Apr 2001, Randy Layman wrote: I have a success story to the contrary - using Windows NT 4, Tomcat 3.2.1, and IIS 4 we are serving a decent sized application with no problems. We've been averaging uptimes of about 5 - 6 days before the machine is restarted because of other software on the machine. No detectable resource loss, no crashes.
Re: binary needed for mod_jserv.so on Solaris 2.7
I don't know if you want to try this, but I would recommend getting the latest gcc package from www.sunfreeware.com for your architecture. This is where I always get my Solaris packages and I've never had a problem. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Pralabh Dayal wrote: thank for the reply tim. 1. I do have have gcc but when i try to run the configure file for jserv, i get the following log: # ./configure --prefix=/usr/local/apache loading cache ./config.cache Configuring ApacheJServ/1.1.2 checking for a BSD compatible install... src/scripts/build/unix/install-sh -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... ./configure: make: not found no checking for working aclocal... missing checking for working autoconf... missing checking for working automake... missing checking for working autoheader... missing checking for working makeinfo... missing checking host system type... sparc-sun-solaris2.6 checking build system type... sparc-sun-solaris2.6 checking for ranlib... : checking for gcc... gcc checking whether the C compiler (gcc ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. 2. gcc is very much in my path and "gcc -v" returns the following: Reading specs from /usr/local/unsupported/lib/gcc-lib/sparc-sun-solaris2/2.95.2/specs gcc version 2.95.2 19991024 (release) Can there be some installtion problems with the gcc compiler. I had downloaded a binary from the gnu site. I am not a C guy and dunno how to debug C compiler issues. 3. Further as i belive from the documentation, i'll need perl on the machine for running "apxs". Gosh! Cant i just get a binary for mod_jserv.so for my solaris. It is available for Intel and Win32 platforms on the apache site. Is there any URL for the Solaris 2.7 one TIA, - Pralabh Dayal -Original Message- From: Tim O'Neil [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 2:46 PM To: [EMAIL PROTECTED] Subject: Re: binary needed for mod_jserv.so on Solaris 2.7 At 02:31 PM 4/12/2001 -0400, you wrote: I am unable to build the source for jserv coz my C compiler can not make excutables. Hence i am restricted to binaries. Install the Gnu compiler. Sparcs don't ship with usable compilers as a stock option; you have to pay more for Sun's Sparkworks compiler. I wouldn't use the Sparcworks suite anyway. GNU is much nicer. Get gmake too. Name: winmail.dat winmail.datType: application/ms-tnef Encoding: base64
Re: mysql jdbc driver
The best place depends on how you are going to be using it. There are three main options: 1. in JAVA_HOME/jre/lib/ext 2. in TOMCAT_HOME/lib 3. in WEB-INF/lib of a given application I tend to put driver jars like this in 1, since putting it there automatically makes it available to everything using the JRE. Since I sometimes write programs outside of Tomcat (e.g. nightly jobs, etc), putting it there makes it available everywhere automatically, with no changes to the classpath. (note: only with jdk = 1.2, which Tomcat requires) You could put it in 2, if you only need JDBC connectivity to Mysql in your webapps. You would use #3 if you knew you only needed it for one web app. Jar files placed in 3 are only visible to the particular web app, jar files placed in 2 are visible to all web apps, and jar files placed in one are visible everywhere. Hope this helps. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Shun-Luoi Daniel Fong wrote: I know this isn't necessarily tomcat related but... I just downloaded the mysql jdbc driver, mm.mysql-2.0.4-src.jar, from http://mmmysql.sourceforge.net/ My question is, do I need to just put the jar file in my classpath, or do I need to extract the files from the jar file and put them somewhere. If I do need to extract the files, does anybody have any suggestions as to a good location to place the files/directories? Does it really matter for when I am using the driver from jsp/servlets? I'm using tomcat 3.2.1 on linux Thanks (and sorry for the misplaced question), Luoi -- D. Shun-Luoi Fong 821 Melrose Avenue Iowa City, IA 52246 email: [EMAIL PROTECTED] --- Colossions 2:8 See to it that no one takes you captive through philosophy or empty deception, according to the traditions of men, according to the elementary principles of the world, rather than according to Christ. ---
Apache+Tomcat+vhosts insights, discussion (long)
ly gets confused by the differing server names, and enters the CPU loop. Putting a VirtualHost entry first in the list without any Tomcat directives stops this problem. Even requests to pserv.wcomnet.com/somefile.jsp just return a 404 since there are no JkMount directives for that vhost. So there is my perspective on the utilization issue. Like I said, I don't know how representative this configuration is, but I hope someone else benefits from what I've discovered. In addition, though the packaged documentation had everything I needed, it was spread across several files and made it frustrating initially. I think a separate, concise guide on setting up virtual domains would do a world of good for those going this route (which I'm betting is a lot). One that provides the configuration steps for Tomcat standalone, Apache+Tomcat, as well a section on separate VM's for each host/app. It should deal only with mod_jk - the docs were mixed mod_jk and mod_jserv, and this only added to the confusion. I would be more than willing to write this documentation, as I have setup several servers now using each of these configurations. I'm experimenting with ajp13 now, so I would probably have a section on using ajp12 vs. ajp13. The one thing I wouldn't be able to write on is using SSL as I haven't done that yet. Would anyone be interested in this? I see a LOT of mails posted to the group asking about Apache+Tomcat+vhosts. If there is enough interest, I will go ahead and start on the documentation, and if the Tomcat people don't want to include it I can throw it up on my website. I almost need to to it just for myself, to make it easier the next time I have to configure a server. :) The initial version would be configuring for unix, though if I actually do it, I'll do some setups on Windows boxes and add documentation for that platform. -Scott (p.s. I hope my directives don't get screwed up by the less than's and greater than's!) -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
Re: Problems with caching?
Are you using the include file directive to include the files? If you are, then that is the problem. JSP's won't recompile if a file they include is updated, only if the jsp file itself is updated. There are two ways to get around this: 1. Load the jsp file and save it (may have to add a space, remove it, then save or something similar) 2. Use the touch command unix to update the timestamps on all your jsp files. This will cause them all to recompile. (e.g. go to your dir with the jsp's and do a "touch *.jsp") This might be preferable since you are dealing with header includes. Hope this helps. -Scott Melissa Matthews wrote: Does anyone know if there is a problem with regular HTML files being somehow cached by Tomcat 3.2.1 on Solaris 2.8? I have replaced some HTML header pages, but I still see the old ones. I have searched and can not find those files anywhere. If I go directly to an shtml file that includes the HTML header files, it shows the new header, but the JSP pages always show the old headers. I tried renaming the header to another name and then the JSP page showed the new header. I have deleted all of the pages from the work directory. Any suggestions? Thanks in advance. Melissa -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/
Re: Which workers am I using?
In order to get Apache to use ajp13, you have to use your own config files. The auto files always use ajp12. You'll need to change workers.properties so that your workers have a type of ajp13. I don't think it matters what your workers are called, though most people have the protocol as part of the worker name. It's possible that your worker could have a name with ajp12 in it, even though its type is ajp13 and it might make deceiving log entries that way. -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Peter Smith wrote: I can see the ajp12 and 13 worker threads being instantiated (via log messages in the console) when I crank up Tomcat, but how do I know if the 13's are being used at all? All my auto-generated files continue to point to 'ajp12' workers, even after I've changed almost every reference I can find in any properties file I can find. Does it even matter what's in these 'auto' files? I'm not even sure it matters which worker(s) I'm using, but the docs said it did. I've pointed Apache/Tomcat to look at a customized version of the 'mod_jk-auto' file with most/all 'ajp12' references changed to 'ajp13'. Is this even necessary? What else might I need to do? Thank you! --Peter-- [EMAIL PROTECTED] __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Problem with mod_jk build
Do you have these lines, either in mod_jk.conf or httpd.conf LoadModule jk_module libexec/mod_jk.so AddModule mod_jk.c You shouldn't be able to start Apache without them. You should get unknown directive errors. Make sure those are in there somewhere (I recommend putting them in httpd.conf along with all the other module loads). Also I recommend copying mod_jk.conf-auto to mod_jk.conf, and including that file from httpd.conf. What kind of errors are you getting on Apache startup? -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Brandon Cruz wrote: Quick question... If I have a binary version of mod_jk.so, do I have to build it? It said it is already built for Linux, but I can't get apache to start when I put that into apache's libexec directory and include the mod_jk.conf-auto. What am I doing wrong? I have tried to build mod_jk, but get all kinds of errors telling me that files do not exist. Brandon Cruz
Re: virtual hosting with tomcat and apache
Your first message went through. Tomcat can do exactly what you need. It can be configured to run several vhosts, each as their own application. Normally you give each vhost its own Tomcat instance, to provide a clean separation of runtime enviroments between sites. It also gives you the ability to restart one Tomcat instance without having to bring them all down (at least, with ajp12). I believe that you can also run them all under one Tomcat instance. I have done this before with Tomcat standalone, I assume it also works connected to Apache, but I recommend going the separate VM route if you are running vhosts. I recommend the latest version of Apache (currently 1.3.19) and Tomcat 3.2.1. I think 3.2.2 will be out in the next couple of weeks, it would be a good choice as well. You should use mod_jk, and not mod_jserv. I recommend getting both the binary and source versions of 3.2.1. Use the binary version for Tomcat itself, and use the source version just for compiling mod_jk. Configuring Apache+Tomcat+mod_jk+vhosts is not a trivial task for sure, and there's not a concise resource for setting it all up. The documentation that comes with Tomcat has a lot of information, but the pieces you need are spread across several documents. Be sure to read the mod_jk howto, as well as the workers howto. As far as configuration goes, don't use the automatically generated config files - they aren't going to have what you want for vhosts. Just create them from scratch. With the aforementioned setup, the important config files are server.xml, workers.properties, uriworkermap.properties, and mod_jk.conf. A few other files (web.xml, web.dtd, tomcat-users.xml, tomcat.policy) are also important, just not usually for initial setup. When you find the section in the documentation that talks about creating a separate server.xml file for each vhost, you are looking in the right place. In order to do separate VM's that is the route you need to go. Also, watch out for the dreaded CPU loop, which is easy to do with virtual hosts. See the 3.2.1 release notes, section 6.11 for that. I've had some interesting experiences with that issue in the past couple of days, and I'm going to make a separate post to the group with some insights I haven't seen posted yet. Tomcat is well suited for what you want to do, but I can assure you it's going to take a couple of hours minimum figuring out how to configure it the way you want it. So grab your favorite drink and have a seat. If you encounter any snags along the way (which you will) mail to the group or to me personally, preferably to the group. I will respond either way. :) (now that I have caught up on my 1500 message backlog, ugh) Good luck! -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ Brandon Cruz wrote: I sent a message a while ago, but don't think it went though. Basically, I am using Tomcat as a servlet/jsp engine for a site that uses Apache as the webserver. Only problem is that I am on one server with several virtual host directories. I want to be able to put .jsp files into each vhost directory. Has anyone done anything like this with either tomcat or some other product that can plug into apache and serve jsp's and servlets? Any help or tips would be greatly appreciated!!! Thanks! Brandon
Re: Strange custom class behaviour with subdirs in 3.2.1
You have solved my problem sir and I thank you! It all makes sense now that you have explained it. JRun 3.0, which implements the same servlet spec, didn't need the extra qualification. I wonder which one isn't following the spec? :-o I'm guessing JRun. I have a printout of the 2.2 servlet spec right here. I needed to read it anyway! Thanks again. -Scott Randy Layman wrote: At the top of your JSP file, be sure to import StatsBean (i.e. %@ page import="StatsBean" %). Tomcat assumes that all of your webapp is in one package structure, so creating a helpdesk directory causes the generated JSP to have a helpdesk package. I don't know if this is in the spec, but I would imagine so. Anyways, you get your problem because the files in the root are in the default (blank) package, just like your class. Randy -Original Message----- From: Scott Tatum [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 10:50 AM To: [EMAIL PROTECTED] Subject: Strange custom class behaviour with subdirs in 3.2.1 First, the obligatory setup info: Tomcat 3.2.1 using built-in webserver changed to port 80. RedHat 6.2 Sun JDK 1.3.0_02 I'm having a strange problem that I did not have while using JRun, and I'm hoping someone can shed some light. The situation is simple - say I have a webapp called blah. In blah's WEB-INF/lib directory I have a jar file with some classes that I use frequently. One of these classes is StatsBean. Then I have all my jsp files in the docBase and I can use the StatsBean fine. I also have a helpdesk directory off of the docBase (i.e. webapps/blah/helpdesk) which also needs to use the StatsBean. If I have a jsp file in the helpdesk directory that tries to declare/use a StatsBean, or any of my custom classes, I get this kind of error: (this example is a webapp called ct-dev whose context path is / and is compiling /helpdesk/helpdesk.jsp) org.apache.jasper.JasperException: Unable to compile class for JSP/usr/tomcat/work/xxx.xxx.xxx.xxx_8080/_0002fhelpdesk_0002fhelpdesk_0002ej sphelpdesk_jsp_0.java:73: Class helpdesk.StatsBean not found. StatsBean statsBean = (StatsBean) session.getAttribute("statsBean"); For some reason it thinks all my classes should be in a helpdesk package because the URI has helpdesk in it. Is this expected behaviour? I did not have this problem in JRun. I would expect to be able to use my classes anywhere in the web application, not just the app root. The problem manifests itself both with classes in the WEB-INF/classes dir, and classes in jars in the WEB-INF/lib dir. I'm certainly not counting out a configuration problem. If I need to post the contents of my configuration files I can. Of course, I don't really even know what all configuration files are used! As far as I can tell, the standalone tomcat only needs server.xml and web.xml. A lot of them seem to be only for mod_jk and/or mod_jserv. It's hard to tell from looking at the mass of config files in the conf directory what is needed by tomcat standalone, tomcat+apache, etc. It would be nice to have a document that explains every file in the conf directory and what it is needed for. That way I could do some cleanup and know that the files I have in there all have something to do with my setup. I have this feeling that several of them are jserv (i.e. not mod_jk) related and could be removed in most situations. Now watch someone point me to just such a file that probably comes with Tomcat. 8-) -Scott -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Startup AND shutdown of separate JVM's
I have been using Tomcat for a while now and with good success. I recently setup virtual hosts (named vhosts) and was surprised when it all worked the first time. =) The documentation in the mod_jk-howto was a great help. Here is my setup: I have two different (eventually more) virtual hosts on one machine being served by Tomcat 3.2.1 and Apache 1.3.14. Right now there is only one Tomcat JVM running, but I'm getting ready to break this up into 2 separate JVM's. The configuration part is trivial now that I have virtual hosts working, but there is one part I can't figure out. The two vhost setup is for production and development versions of the same application. So one JVM I will need to restart regularly, and the other needs to stay up as much as possible. There are a couple of problems I forsee that I need to understand and tackle before moving forward. One is that there is only startup/shutdown script for Tomcat. I understand that, by creating different server.xml configuration files and using (e.g.) startup.sh -f server1.xml, I can start separate servers. My question is, how do I stop them separately? If I have to write my own scripts I am willing to go that route, I just want to make sure there's not some preexisting method. Also I read in the FAQ that if you restart Tomcat, you also have to restart Apache. I've tested this out with mixed results. Is this true? If that is the case, running separate JVM's for each website becomes useless to me. No offense to the other benefits of running separate JVM's! If I have my production JVM which needs to stay up, but Apache has to restart every time I restart my development JVM, wouldn't that mean I have to restart my production JVM every time I restart my development JVM? Worst case, I can run my development on the built-in webserver, but it would be nice to use app.domain.com and app-dev.domain.com without having to tack on a :8080. So in review, my questions are: If running separate JVM's connected to a single Apache, how do I restart one JVM while leaving the other running? Also, if running under said setup, does restarting one Tomcat JVM mean that Apache and any other Tomcat JVM's have to be restarted as well? Thanks in advance for any insight. -Scott (p.s. was running JRun 3 before Tomcat. Experienced daily lockups. No lockups with Tomcat and it is noticeably faster. JRun 3 has a nice web-based admin setup though.) -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]