Hi, This is my first post although I've been reading mail archives from the web. I've found some problems installing Tomcat 4.0.1 and getting mod_webapp to work under Apache 1.3.22 at linux Debian i386 platform (some of them are close related to other posts on the list). I wanted to share the solutions I've found.
As some of the topics were cross related, I packed them all together: 1.A) standalone Tomcat (JDK Problem) 2.A) mod_webapp (-DEAPI warning) 2.B) mod_webapp ("Premature packet header end" exception error under Tomcat) 2.C) rebuilding mod_webapp ("..Bareword found where operator expected.. ") 3.A) virtual host setting (http://my.doma.in/ -> tomcat webapps) 1) Installing standalone Tomcat 4.0.1 ===================================== Documents used -------------- * RUNNING.txt packed with the binary distribution Previous installations ---------------------- * JDK >=1.2 : I downloaded and installed Sun's Java 2 SDK v 1.3.1_02 from java (http://java.sun.com/j2se/1.3/download-linux.html) Problems & Solutions -------------------- 1.A) JDK problem Problem: error found prevents starting Tomcat [catalina.out:"..error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory"] This is a problem related to Java 2 SDK 1.3 installation not Tomcat. Solution: checking at /usr/lib on my machine I found: libstdc++-3-libc6.1-2-2.10.0.so (if you don't have any libstdc++ then install it through #apt-get install libstdc++2.10-glibc2.2) then I generated a symbolic link to "libstdc++-libc6.1-1.so.2" #cd /usr/lib #ln -s libstdc++-3-libc6.1-2-2.10.0.so libstdc++-libc6.1-1.so.2 2) Integration between Tomcat 4.0.1 and Apache 1.3.22 ===================================================== Documents used -------------- * INSTALL.txt packed with the binary distribution (webapp-module-1.0-tc40.tar.gz) * README.txt packed with the source distribution (webapp-module-1.0.1-tc401-src.tar.gz) Previous installations ---------------------- * Apache 1.3.9 from Debian package Problems & Solutions -------------------- 2.A) mod_webapp 4.0.1 Problem: Warning when starting Apache ["Loaded DSO modules/mod_webapp.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)"] Solutions: * Although Sun's documentation says not to worry about , I tried previous 4.0's "mod_webapp-1.0-eapi.so" and the warning was gone but ... check 2.B) * I've updated Apache to 1.3.22 and the warning dissapeared but ... check 2.B) 2.B) mod_webapp 4.0.1 Problem: "Premature packet header end" exception error under Tomcat [apache log under Tomcat "[org.apache.catalina.connector.warp.WarpConnection] Exception on socket java.io.IOException: Premature packet header end"] Solution: I rebuilt from source mod_webapp 4.0.1 and was solved (check 2.C with problems to rebuild) 2.C) rebuilding mod_webapp 4.0.1 Problem: ["make[2]: Entering directory ... ..Bareword found where operator expected at (eval 6) line 1, near ""-DLINUX=22 -DEAPI -DTARGET="apache" (Missing operator before apache?) ... mod_webapp.c:70: wa.h: No such file or directory ... "] Solution: Didn't have time to debug so I copied *.h files to /usr/include/apache-1.3 (the -I path): (wa* include files) cp [..]/webapp-module-1.0.1-tc401/include/* /usr/include/apache-1.3 (apr* include files) #cp -R [..]/webapp-module-1.0.1-tc401/apr/include/* /usr/include/apache-1.3 and I got a fresh Apache 1.3 mod_webapp.so 3) Virtual host setting ======================= Documents used -------------- * INSTALL.txt packed with webapp binary distribution (webapp-module-1.0-tc40.tar.gz) * server.xml packed with tomcat binary distribution (jakarta-tomcat-4.0.1.tar.gz) * Sun's http://dcb.sun.com/practices/howtos/tomcat_apache.jsp 3.A) Virtual host setting Problem: Wanted to redirect http://my.doma.in/ to tomcat webapps. I couldn't make it with INSTALL.txt and server.xml. Solution: Followed INSTALL.txt instructions to load Apache mod_webapp (LoadModule,AddModule) Then: * Apache settings #/etc/apache/httpd.conf .. #at least one IP for the virtual host NameVirtualHost 192.168.1.2:80 <VirtualHost 192.168.1.2> ServerAdmin [EMAIL PROTECTED] DocumentRoot tomcat_instalation_directory/jakarta-tomcat-4.0.1/webapps ServerName my.doma.in ErrorLog /var/log/apache/my.doma.in-error.log CustomLog /var/log/apache/my.doma.in-access.log common WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples </VirtualHost> * Tomcat settings #tomcat_instalation_directory/jakarta-tomcat-4.0.1/conf/server.xml <!-- Define an Apache-Connector Service --> ... <!-- Replace "localhost" with what your Apache "ServerName" is set to --> <Engine className="org.apache.catalina.connector.warp.WarpEngine" name="my.doma.in" debug="0" appBase="webapps"> That's all. Once restarted Tomcat and Apache, I could run http://my.doma.in/examples/jsp/num/numguess.jsp Bye, ========================== Adrian Caneva NEXT TECHNOLOGY SRL La Rioja 26 (T4000ISB) Tucuman Tel/Fax +54 381 4219105 [EMAIL PROTECTED] www.nexttech.com.ar ========================== -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>