Re: Getting mod_webapp to accomplish the same thing at the mod_jk
[EMAIL PROTECTED] wrote: I am having no luch at getting the mod_webapp (tomcat 4.x on apache 1.3.x) to accomplish the same tasks as the mod_jk (tomcat 3.x on apache 1.3.x) Here is what I have using the mod_jk (using tomcat 3.x on apache 1.3.x) For the http.conf VirtualHost *:80 DocumentRoot /home/web/mysite ServerName www.mysite.com JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 CustomLog /usr/local/apache/logs/access_log_dnsme common /VirtualHost For the server.xml Host name=www.dnsmadeeasy.com Context path= docBase=/home/web/mysite debug=0/ /Host Here is what I have using mod_webapp (using tomcat 4.x on apache 1.3.x) The httpd.conf: VirtualHost 192.168.1.12 ServerName www.mysite.com DocumentRoot /home/web/mysite/ WebAppConnection warpConnection warp localhost:8008 You need a WebAppDeploy directive here as well. Something like: WebAppDeploy servlets warpConnection /servlet/ /VirtualHost The server.xml: Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true appBase=webapps acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=www.mysite.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=apache_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / /Engine /Service This obviously is wrong. I'm stumped here and I am unable to get it working. Can someone point me along. I was able to get the Tomcat examples running, but I was unable to get my own site up. Thanks for any help. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: URL rewriting
You can use mod_rewrite and mod_proxy to do just this (at least if you are using apache). See http://www.engelschall.com/pw/apache/rewriteguide/ jeff Chris Stephens wrote: Hi folks, Apologies if this is a newbie question but I've looked around a fair bit (inc. the archives of this list) and can't find an answer. I want my users to enter in URLs like http://www.domain.com/products/zips and for this URL to be afront for a completely unrelated URL (e.g. /webappname/do/showall?id=zips [I'm using Struts btw for my current project but I'd like to achieve the rewrite outside of Struts]). Where is the best place to do this URL rewriting? It needs to be a forward rather than a redirect (I don't want the actual URL showing in the browser). Should I use 2.3 filters? Or is there a better way? Is there something already written to do this? TIA, Chris * This email and any files transmitted with it may be confidential and privileged. It is intended solely for the use of the individual or parties to whom it is addressed. If you have received this email in error please forward it to [EMAIL PROTECTED] and delete all copies of this message immediately. Thank you. * -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Webapp Connector with Apache 2.0.35
Check bugzilla, Bug #4042. This is a known problem in Tomcat. Julia A. Case wrote: It seems the connector wants to have a Port directive which is no longer used in Apache 2.0. I got around this by hardcoding a port into the virthost setup. But, this is not a good solution. I need to spend a little more time with the code to see if there is a better solution. Julia -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache 2.0x with Tomcat 4.0x?
Try mod_webapp instead of Warp in your search (mod_webapp = apache module; Warp = tomcat connector). There is actually a very good guideline to follow now at http://www.pubbitch.org/jboss.html jeff Jack Frosch wrote: Thanks Brett (and thanks for the link). I've read a lot of posts here about using mod_jk with Tomcat 4.0x/Apache 2.0x, but not about Warp. I'll read through the archives. Jack -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 9:22 PM To: 'Tomcat Users List' Subject: RE: Apache 2.0x with Tomcat 4.0x? searching the archives will turn up about 100 such messages. http://www.mail-archive.com -Original Message- From: Jack Frosch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 30 April 2002 12:19 PM To: 'Tomcat-User' Subject: Apache 2.0x with Tomcat 4.0x? Now that Apache 2.0x has been released, I'm wondering if Tomcat 4.0x can work with it, using the Warp connector or something else? Thanks. Jack -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache 2, Tomcat 4 and mod_jk2
Is there a useful table anywhere documenting the relationship(s) of the various apache modules to the various tomcat connectors? Something like this: module connector == n/a (standalone)HttpConnector mod_webapp Warp mod_jk ? (AJP13??) mod_jk2 ? (AJP14??) mod_jserv ? (none - pre-Connector?) Are there multiple Connectors that can be used for a given module? This might be a useful heuristic to use in documentation. jeff [EMAIL PROTECTED] wrote: On Fri, 26 Apr 2002, Michael Delamere wrote: Me again :-) An interesting thing is that the source-files at cvs seem to be different to the ones that you can download from the jakarta site. Use the cvs, let me know ( or post on tomcat-dev ) if it doesn't work. We changed the name to mod_jk2 ( and all functions internally ) so that mod_jk and mod_jk2 can be used at the same time. If you want to have fun ( and you're on Unix) you could try the unix domain sockets. JNI is still tricky and there's a small piece that's not ready ( but the basic stuff works - not the sessions ). Costin For example. in the tar archive which you can download from the jakarta site, the directory: src/jk/native2/server/apache2 contains a source-file called mod_jk.c whereas the same location on the cvs server has a file called mod_jk2.c. Although this doesn´t mean much, it at least shows some form of a change :-). It might be worth trying to compile this version and see if it runs more reliably. I´m going to give it a go. bye Michael Delamere - Original Message - From: Michael Delamere [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 26, 2002 5:03 PM Subject: Re: Apache 2, Tomcat 4 and mod_jk2 I just found an interesting post here about the ajp14 connector. At this point though no testing had been done on apache2 :-). http://archives2.real-time.com/pipermail/tomcat-devel/2001-June/018332.html bye Michael Delamere - Original Message - From: Michael Delamere [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 26, 2002 4:30 PM Subject: Re: Apache 2, Tomcat 4 and mod_jk2 Well there appears to be a jk_ajp14_worker. I wonder if this is the reason for mod_jk2 being so unstable at present. It might be worth a test to see if it works better with AJP14 (if at all) instead of AJP13. bye Michael Delamere - Original Message - From: Anthony W. Marino [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 26, 2002 4:09 PM Subject: Re: Apache 2, Tomcat 4 and mod_jk2 The example for mod_jk2 shows a worker's config for AJP13 but I thought that jk2 is AJP14? Anthony Thanks to Michael Delamere and Pascal Forget, I'm happy to shout out that there's a HOWTO for setting up Apache 2, mod_jk2 and Tomcat on Linux (and therefore probably other UNIX flavours) It's linked from http://www.pubbitch.org/jboss Regards, Simon -- 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] -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuring Apache 2.0.35 and TomCat 4 under WinXP Server
Sorry, I am a linux jockey. Have not tried any of this under win2K. [EMAIL PROTECTED] wrote: Hi jeff I need your help if you could have linked the tomcat + apache2.0 under w2k ? Pls give me some tips how to do that reg bm Jeffrey Bonevich wrote: You actually have three arguments ;-) Get rid of the whitespace in your module path and try again. jeff Frederick Aubert wrote: Hi, Continuing the saga... Extract of my httpd.conf: ... LoadModule webapp_module D:/Server/Apache Group/Apache2/modules/mod_webapp.so ... Here is the debug error I get: Syntax error on line 174 ... LoadModule takes two arguments, ... It seems to me I have two arguments, am I missing something? Beeing under Windows, I have a file called libapr.dll I was supposed to move along with mod_webapp.so should I load it somewhere or just place in the same folder? Any help would be appreciate? In private or to the list, it doesn¹t matter to me... Sincerely, Frederick --- (`-''-/).___..--''`-._ `6_ 6 ) `-. ( ).`-.__.`) Frederick Aubert (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' ,'[EMAIL PROTECTED] (il),-'' (li),' ((!.-' --- -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- 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] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuring Apache 2.0.35 and TomCat 4 under WinXP Server
You actually have three arguments ;-) Get rid of the whitespace in your module path and try again. jeff Frederick Aubert wrote: Hi, Continuing the saga... Extract of my httpd.conf: ... LoadModule webapp_module D:/Server/Apache Group/Apache2/modules/mod_webapp.so ... Here is the debug error I get: Syntax error on line 174 ... LoadModule takes two arguments, ... It seems to me I have two arguments, am I missing something? Beeing under Windows, I have a file called libapr.dll I was supposed to move along with mod_webapp.so should I load it somewhere or just place in the same folder? Any help would be appreciate? In private or to the list, it doesn¹t matter to me... Sincerely, Frederick --- (`-''-/).___..--''`-._ `6_ 6 ) `-. ( ).`-.__.`) Frederick Aubert (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' ,'[EMAIL PROTECTED] (il),-'' (li),' ((!.-' --- -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache 2.0, mod_webapp, Redhat 7.2 build problem
Ford, Richard wrote: Well, I can't seem to get mod_webapp built under RedHat 7.2. I can't build the connector, and I'm not entirely sure why. I'm using Apache 2.0.35, which builds fine with no errors, and the latest snapshot of apr. mod_webapp is from the 4.0.2-01 bundle of the connectors. Apache was build with --prefix=/usr/local/apache --enable-so. For mod_webapp, I tried --with-apache-apxs=/usr/local/apache/bin/apxs --with-apr= etc. However, I always get an error from libtool: Compiling and Linking Apache 2.0 WebApp Module /usr/local/apache2/bin/apxs -I../include -c -L ../lib -lwebapp mod_webapp.c /usr/local/apache2/build/libtool --silent --mode=compile gcc -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I../include -c -o mod_webapp.lo mod_webapp.c touch mod_webapp.slo mod_webapp.c: In function `wam_invoke': mod_webapp.c:482: warning: initialization discards qualifiers from pointer target type /usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_webapp.la -rpath /usr/local/apache2/modules -module -avoid-version -I../include -L../lib -lwebapp mod_webapp.lo *** Warning: This library needs some functionality provided by -lwebapp. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module mod_webapp. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. make[2]: Leaving directory `/home/root/pkgs/pkgs/jakarta-tomcat-connectors-4.0.2-01-src/webapp/apache-2.0' make[1]: Exiting directory apache-2.0 make[1]: Leaving directory `/home/root/pkgs/pkgs/jakarta-tomcat-connectors-4.0.2-01-src/webapp' Of course, no .so gets produced. I did a search of the archives and couldn't find an answer. libtool is pretty recent: Obviously not very deep a search. There is a *ton* of postings from the last two weeks covering this issue. The short of it is: Go here and follow the instructions, it works. http://www.pubbitch.org/jboss.html [root@localhost webapp]# libtool --version ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) Any idea what is happening? Richard -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Error compiling mod_webapp for debian Linux
Andy Carlisle wrote: For purposes of recording this on the user group so that others may benefit (if they bother to check first that is ;- ), here is exactly what I did: Thank you, Jeffrey, for posting the steps needed to get mod_webapp built for Debian. I was able to walk through the steps and (for the first time) got everything installed. I could not start the httpd server, however, as the following complaint occurs: Syntax error on line 126 of /opt/apache-2.0.35/conf/ssl.conf: Invalid port number (p1) No Port statement found Let me quess: your WebApp* configs are inside a VirtualHost subsection? Two solutions: (1) move them outside of the VirtualHost to the main config section (and make sure you have a Listen directive specifying at least the port #); or (2) inside the VirtualHost, also define a ServerName with both the host and port (e.g. ServerName www.mydomain.com:80) Both ways worked for me. #2 is a workaround for an existing bug in the mod_webapp code (Bug #4042). Line 126 is the first WebAppDeploy statement and it sits in the ssl.conf file (I want to run the web applications over an SSL connection). Of course, under apache-2.0.x there is no Port statement as it's been replaced by Listen. There is a Listen 443 statement in the file. Here's some other basic information about my setup: - using Debian Woody on an H-P NetServer LC 3 (x86) - compiled mod_webapp from CVS as of this afternoon - Tomcat 4.0.3 Question: Has anyone got mod_webapp working on a 2.0.35 server with mod_ssl built in? Is there some trick I'm missing? I'd appreciate any help anyone could give me. Many thanks. Andy P.S.: I've also tried mod_jk, which I can get to run, but soon after it is started the httpd processes one by one start consuming all of the CPU power on the system. I can kill the offending processes, but new ones soon take back over. I had not had this problem with 1.3.24 + mod_ssl + mod_jk. Again, if someone has an idea on how to make this work, I would very much appreciate it. At this point I just need something that runs reliably on a 2.0.35 httpd server. Thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mod_jk problem for Apache2
David - I have seen several postings to the list that mod_jk does not work under Apache 2 yet. Not sure when it will. And I am probably wrong. I could not get it working either. I did have success getting mod_webapp up and running. For starters, see for details: http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg51745.html jeff Main, David wrote: I would like to upgrade from (a working!) Apache1.3 setup to Apache2 but am having problems getting mod_jk to work. I built Apache2 and then built mod_jk for Apache2 then added mod_jk.dll to /modules and added the following to httpd.conf: LoadModule jk_module modules/mod_jk.dll JkWorkersFile d:/java/jakarta-tomcat-4.0.1/conf/workers.properties JkLogFile d:/java/jakarta-tomcat-4.0.1/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /calendar/* ajp13 When I try to access http://localhost/calendar/index.jsp, I get the following apache error: handler jakarta-servlet not found for: index.jsp The following lines are from mod_jk.log for this request: [Mon Apr 22 13:16:43 2002] [jk_worker.c (158)]: wc_create_worker NULL factory for ajp13*ajp13 [Mon Apr 22 13:16:43 2002] [jk_worker.c (244)]: build_worker_map failed to create workerajp13 Does anyone have any ideas why this setup isn't working? I'd much appreciate any help. Thanks, David PS. I'm running Tomcat 4.0.1 on Win 2000 and I've left workers.properties and server.xml as they were for the working Apache1.3/mod_jk setup. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Html/jpg from db to client?
Nope. Only need two at most. Each of them sets their own content type (image streamer sets it to image/jpg, HTML producer to text/html). And in answer to your other question, yes, this could be reduced to just one servlet that does conditional setting of content-type and content. But you will then need a querystring (or other) key/value pair to do the conditional on. Suppose your HTML page url is /servlets/showimage/1. Suppose the 1 in the subpath is the id for the image. Then you need to have a switch in the URL to tell it whether you are getting html or image: /servlets/showimage/1?show=1 SO now your HTML page is accessed with the URL /servlets/showimage/1 and inside that page is embedded an img src=/servlets/showimage/1?show=1 height= + image height + width= + image width + Then in your showimage servlet, you grab the show request parameter and, if it is present/equals 1, then set content type to image and stream the image, otherwise set content type to html and output HTML (or forward to JSP - just be sure to stick the image info somewhere in a context so you can access it in the JSP page). Make sense? jeff john-paul delaney wrote: On Mon, 22 Apr 2002, Nikola Milutinovic wrote: Thanks Nix... then I'm thinking I need three servlets to handle for each page sent to the client... 1. Write the html header, 2. Get image from db and send the image, 3.Add in dimensions to img tag add the footer. Is this correct? regards /j-p. If you wish to send BOTH html and the image in the same invocation of the servlet, then you're mistaken. HTTP/HTML, in general, doesn't work that way. You should make a servlet which can retrieve a single picture, something like: /servlets/showImage?src=my_test_pic.gif Then make your servlet accept src parameter, retrive the image from the database. Based on the extension you should set the correct MIME type, in this case image/gif and send it. You should set Response-contentType to your MIME type and open a servlet output stream in the Response and just splash your image into it. --- JUSTATEST Art Online www.justatest.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache 2.0.35, tomcat 4.0.3 and mod_webapp
Excellent point, Georg. I am a bit rusty on working with C/C++ compilation. Here is my attempt at getting the proper linking in of libwebapp: /usr/local/apache2/build/libtool --silent --mode=link gcc -shared -o mod_webapp.so -rpath /usr/local/apache2/modules -module -avoid-version -I../include -L../lib -dlopen ../lib/libwebapp.la mod_webapp.lo NOTE that this is the same line we grabbed from make and modified to produce mod_webapp.lo, but replacing -lwebapp with -dlopen ../lib/libwebapp.la. This produced the following warning: libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support. However, the shared library produced works just fine for me (i.e. stuck it in ${APACHE_HOME}/modules, restarted apache, and wallah! no need for libwebapp.so in lib/!) I will add this to the documentation I am building up. Now to figure out why all my regular servlet/jsp webapps works, but my Struts-based webapps won't! jeff Georg Huettenegger wrote: hi, it does make a difference whether one puts libwebapp.so into the lib or the modules directory. nevertheless it is quite clear why putting libwebapp.so into modules does work for me and others: the line that is used to link mod_webapp.so includes the rpath statement telling the module where to look for required libraries first (the modules directory). if this directory does not match the final $APACHE_HOME/modules directory it will not find the libwebapp.so. i am assuming that apache itself does take care of that libraries in the lib directory are found and that would be the reason why it does work by putting it in the lib directory. the correct solution in my eyes would be to have the static libwebapp.a included in the mod_webapp.so so that the libwebapp library does not need to be copied. bye, georg On Sat, 20 Apr 2002, Simon Stewart wrote: On Fri, Apr 19, 2002 at 11:23:44PM -0400, Jeffrey Bonevich wrote: Simon Stewart wrote: Having looked through the mailing list archives, this looks like a popular subject, and I think that I've almost got it cracked. Almost. After following the advice in http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg51557.html I just thought that people might like to know that the location of libwebapp.so should be ${APACHE2}/lib and not modules. For the purest approach, yes, but it really matters not (at least for my apache install -- 2.0.35, compiled from source, DSO-style, etc.). Did it actually matter for you (i.e. you got errors when it was in modules as opposed to lib)? Afraid so: mite:/usr/local/apache-2# cd /usr/local/apache-2/ mite:/usr/local/apache-2# mv lib/libwebapp.so modules mite:/usr/local/apache-2# ./bin/apachectl start Syntax error on line 218 of /usr/local/apache-2/conf/httpd.conf: Cannot load /usr/local/apache-2/modules/mod_webapp.so into server: libwebapp.so: cannot open shared object file: No such file or directory ./bin/apachectl start: httpd could not be started mite:/usr/local/apache-2# mv modules/libwebapp.so lib/ mite:/usr/local/apache-2# ./bin/apachectl start Syntax error on line 221 of /usr/local/apache-2/conf/httpd.conf: Invalid virtual host name ./bin/apachectl start: httpd could not be started mite:/usr/local/apache-2# This after starting tomcat first. Apache now passes a configtest with just the webapp module (without any WebApp* declarations) loaded but when I add the entries: LoadModule webapp_module modules/mod_webapp.so WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ (lifted from the default server.xml file) I get: root@mite:/usr/local/apache-2# ./bin/apachectl configtest Syntax error on line 221 of /usr/local/apache-2/conf/httpd.conf: Invalid virtual host name Where line 221 refers to the WebAppDeploy line. I'm perplexed, everything else looks good. Could anyone offer some suggestions, please? And the WebApp* directives themselves were in the main configs and not in any VirtualHost subsection? If in a VirtualHost section, try just placing them in the main configs and get rid of the vhost config subsection...I found this to work for me. If it is already in the main configs, are their other vhost subsections you already have for other things? Try commenting out all vhost configs and see if it works now. Long shot, I know, but... Okay, I've set the ServerName to be localhost:80, because I've read that the name resolution of the server can cause trouble. The port is specified because otherwise I get an error from webapp moaning about the port being bad. There are no VirtualHost sections at all and so I've not set the NameVirtualHost. Doing so produces the same error. I'm using the worker MPM. The WebApp* directives are all in the main body of the config, immediately under the LoadModule directive. It's an interesting problem, but one that's starting to get a little tiresome. If I could persuade mod_jk2 to work, I'd do that, but I've had
Re: Html/jpg from db to client?
Yes, make the image element's src attribute a call to a servlet that just streams out the image. So for example, in your HTML page you have: img src=http://mydomain.com/mywebapp/imagestreamservlet?imageID=xxx; Then the 'imagestreamservlet' does the image lookup and streams it out to the response writer (i.e. response.setContentType(image/gif) or image/jpeg, or whatever, then grab response.getWriter() and start writing bytes from a reader on the image file to it). The only sticking point is that you do not know the image dimensions before grabbing the image (duh!), so if you need width/height info for the image in the page, it may be worthwhile having the HTML page also produced by a servlet that also looks up the image, but only retrieves metadata about it and sticks it in the appropriate places. jeff john-paul delaney wrote: Hello List... Using a servlet, I retrieve an image from a database, but I want to send it in a formatted html page to the client... any suggestions on how to approach this (combining html and streaming images) appreciated. thanks /j-p. --- JUSTATEST Art Online www.justatest.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache 2.0.35, tomcat 4.0.3 and mod_webapp
I plan on submitting my 'experiences' to tomcat-dev - the things we all have figured out collectively to get Tomcat 4 and Apache 2 and mod_webapp working. Still trying to figure out why my struts-based webapps won't work when everything else will. Also, the warning does go away if I remove the -dlopen ../lib/libwebapp.la, but of course the DSO module compiled is now missing the libwebapp library inclusion. jeff Georg Huettenegger wrote: hi, i think you should forward your information to the developer. about your warning: i am assuming that removing -dlopen will make the warning go away (but i am not quite sure about that). bye, georg On Sun, 21 Apr 2002, Jeffrey Bonevich wrote: Excellent point, Georg. I am a bit rusty on working with C/C++ compilation. Here is my attempt at getting the proper linking in of libwebapp: /usr/local/apache2/build/libtool --silent --mode=link gcc -shared -o mod_webapp.so -rpath /usr/local/apache2/modules -module -avoid-version -I../include -L../lib -dlopen ../lib/libwebapp.la mod_webapp.lo NOTE that this is the same line we grabbed from make and modified to produce mod_webapp.lo, but replacing -lwebapp with -dlopen ../lib/libwebapp.la. This produced the following warning: libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support. However, the shared library produced works just fine for me (i.e. stuck it in ${APACHE_HOME}/modules, restarted apache, and wallah! no need for libwebapp.so in lib/!) I will add this to the documentation I am building up. Now to figure out why all my regular servlet/jsp webapps works, but my Struts-based webapps won't! jeff Georg Huettenegger wrote: hi, it does make a difference whether one puts libwebapp.so into the lib or the modules directory. nevertheless it is quite clear why putting libwebapp.so into modules does work for me and others: the line that is used to link mod_webapp.so includes the rpath statement telling the module where to look for required libraries first (the modules directory). if this directory does not match the final $APACHE_HOME/modules directory it will not find the libwebapp.so. i am assuming that apache itself does take care of that libraries in the lib directory are found and that would be the reason why it does work by putting it in the lib directory. the correct solution in my eyes would be to have the static libwebapp.a included in the mod_webapp.so so that the libwebapp library does not need to be copied. bye, georg On Sat, 20 Apr 2002, Simon Stewart wrote: On Fri, Apr 19, 2002 at 11:23:44PM -0400, Jeffrey Bonevich wrote: Simon Stewart wrote: Having looked through the mailing list archives, this looks like a popular subject, and I think that I've almost got it cracked. Almost. After following the advice in http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg51557.html I just thought that people might like to know that the location of libwebapp.so should be ${APACHE2}/lib and not modules. For the purest approach, yes, but it really matters not (at least for my apache install -- 2.0.35, compiled from source, DSO-style, etc.). Did it actually matter for you (i.e. you got errors when it was in modules as opposed to lib)? Afraid so: mite:/usr/local/apache-2# cd /usr/local/apache-2/ mite:/usr/local/apache-2# mv lib/libwebapp.so modules mite:/usr/local/apache-2# ./bin/apachectl start Syntax error on line 218 of /usr/local/apache-2/conf/httpd.conf: Cannot load /usr/local/apache-2/modules/mod_webapp.so into server: libwebapp.so: cannot open shared object file: No such file or directory ./bin/apachectl start: httpd could not be started mite:/usr/local/apache-2# mv modules/libwebapp.so lib/ mite:/usr/local/apache-2# ./bin/apachectl start Syntax error on line 221 of /usr/local/apache-2/conf/httpd.conf: Invalid virtual host name ./bin/apachectl start: httpd could not be started mite:/usr/local/apache-2# This after starting tomcat first. Apache now passes a configtest with just the webapp module (without any WebApp* declarations) loaded but when I add the entries: LoadModule webapp_module modules/mod_webapp.so WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ (lifted from the default server.xml file) I get: root@mite:/usr/local/apache-2# ./bin/apachectl configtest Syntax error on line 221 of /usr/local/apache-2/conf/httpd.conf: Invalid virtual host name Where line 221 refers to the WebAppDeploy line. I'm perplexed, everything else looks good. Could anyone offer some suggestions, please? And the WebApp* directives themselves were in the main configs and not in any VirtualHost subsection? If in a VirtualHost section, try just placing them in the main configs and get rid of the vhost config subsection...I found this to work for me. If it is already in the main configs, are their other vhost subsections you already have for other things? Try commenting out
Problems with struts under Tomcat 4 + Apache 2 + mod_webapp
) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194) at java.lang.Thread.run(Thread.java:539) - Root Cause - java.lang.IllegalArgumentException: object is not an instance of declaring class at org.apache.struts.digester.Digester.startElement(Digester.java:531) at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490) [snip] Strikes me that it may be a resource loading issue - is the webapp getting confused as to where to find /WEB-INF/struts-config.xml, etc.? Any one else using struts with Tomcat 4/Apache 2/mod_webapp and have it working fine for them? I can supply apache configs and tomcat configs as well if that will help. Thanx! jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 4 + Apache 2 + mod_webapp HOWTO
Hey all! Just wanted to post this brief bit o' documentation to the list for future users running into the same quagmire (or at least until mod_webapp/connectors under Apach 2 get straightened out). Much thanx to Georg Huettenegger [EMAIL PROTECTED] and Emil Olovsson [EMAIL PROTECTED] for helping me get this up and running. Enjoy! jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! Tomcat4+Apache2+mod_webapp_HOWTO.sh Description: Bourne shell script -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache 2.0.35, tomcat 4.0.3 and mod_webapp
Simon Stewart wrote: Yet more digging suggests that this could be a bug: attaching an strace to the httpd process as it starts up gives: write(2, Syntax error on line 1018 of /us..., 66) = 66 write(2, Duplicate connection name\n, 26) = 26 _exit(1)= ? Where line 1018 refers to: WebAppConnection warpConnection warp localhost:8008 This is the first connection I've tried to set up, so it's a bit of a specious error IMHO. I've filed a bug report with the apache bugzilla installation (view it at: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331 ) If anyone's got this working, I'd be fascinated to know how you did it I have, without the errors you mention. I assume you compiled Apache 2 from source? If so, send along the config.status file from your run of configure. Basically, I did this: cd ${APACHE_2_SRC_HOME} ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all make make install then configure and make and install mod_webapp as I described in the document you referred to. You also remembered to setup the Tomcat server.xml connection stuff, right? After that it is working for me (except for struts apps - whole different ball o' wax there, tho...). I do notice that when doing an 'apachectl graceful' to bounce apache it takes up to a minute sometimes for the server to actually restart. Perhaps comment out the WebApp* directives, start apache, uncomment them and attempt a graceful? See if eventually it restarts (do a tail -f logs/error_log). Cheers, Simon -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35
Emil - I think you meant this to go to Georg. Georg - yes, please provide relevant lines from httpd.conf. From what I can tell, the source code is not even getting the port as specified by Listen. I have the following in my httpd.conf, and it does not work: [skip] Listen 65.186.165.33:80 #Listen 80 [skip] LoadModule webapp_module modules/mod_webapp.so [skip] ServerName www.bonevich.com:80 [skip] NameVirtualHost 65.186.165.33:80 VirtualHost 65.186.165.33:80 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples /VirtualHost Thanx! jeff Emil Olovsson wrote: Can you provide an example of how to write this, I cant get it working. -Original Message- From: Georg Huettenegger [mailto:[EMAIL PROTECTED]] Sent: den 19 april 2002 09:18 To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 hi, 1) the mod_webapp should connect to localhost:8008 as teh connector is listeneing on 8008 while tomcat is listening on 8080 for http requests 2) it seems that for the moment one has to provide the correct port to apache with the Listen directive and at the same time append the port number as part of the server name. with this setup it worked for me. bye, georg On Fri, 19 Apr 2002, Jeffrey Bonevich wrote: Regardless, it still does not work. The issue I am concerned with appears to be a bug - could be in mod_webapp or it could actually be in the Apache 2 code (server_rec is not getting a port number assigned to it, even after Listen supplies it). jeff Andrew Logan wrote: I believe the difference is that Tomcat's HTTP listener is on port 8080, but Tomcat's servlet container is listening on 8008 (default set up of course). [EMAIL PROTECTED] 19/04/2002 15:31:50 Why would I do that when Tomcat is listening on 8080? Actually did a little more research and there is already a bug registered that covers this issue. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4042 Looks as though there has been no action on this one for a while, and now it is very pertinent as the Port directive no longer exists for Apache 2. jeff Jay Gardner wrote: Try localhost:8008 instead --Jay Gardner -Original Message- From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 5:57 PM To: [EMAIL PROTECTED] Subject: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 Ok, on to the next set of issues! Finally got mod_webapp compiled properly and installed in Apache 2 (configtest returns Syntax Ok). Then I add the VirtualHost section: NameVirtualHost 65.186.165.33 VirtualHost 65.186.165.33 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8080 WebAppDeploy examples warpConnection /examples /VirtualHost ...and when I do another configtest I get errors: [root@strider apache2]# bin/apachectl configtest Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf: Invalid port number (p1) No Port statement found Line 995 is the WebAppDeploy directive. Is this mod_webapp looking for the (now depracated) Port statement in the main body of the config? If so, time to update code. If not, what am I missing? (As a side note, tried the VirtualHost directives with 127.0.0.1, with :80 appended, and with just *; same error each time.) jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- 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] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mod_webapp + httpd.conf
Here are a couple tomcat-user postings on the differences. They might help: http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg50263.html http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg49707.html They are not quite solid, but they are something. I am still looking for a more definitive discussion myself. Please post any you find as well. Thanx! jeff Cynthia Jeness wrote: I believe that this is a known problem and one suggested workaround is to do the following: Uncomment the line ServerName=localhost and changed localhost to www.ajug.org. Unless this line is uncommented, then Apache will generate an error (Invalid virtual host name) when restarted. Of course, change localhost to the correct name of your server. www.ajug.org is my web server. You can find our Tomcat4 how-to at this URL: http://www.ajug.org/howto/tomcat4.html Cynthia Jeness Web Chair, Atlanta Java Users Group Karoly VEGH wrote: Hello, i try to get apache communicate with tomcat, i have the following section in my httpd.conf: 8- IfModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examplesconn /examples # WebAppInfo /webapp-info /IfModule -8 WebAppDeploy takes three arguments, name connection uri-path the problem is at apachectl configtest: Syntax error on line 1039 of /etc/apache/httpd.conf: Invalid virtual host name the 1039th line is WebAppDeploy examplesconn /examples what virtual host does he await? tia, Charlie -- 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] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mod_webapp + httpd.conf
Sorry, my posting was in response to another Cynthia posted. Just got confused when hitting reply. jeff Karoly VEGH wrote: Hi, Jeffrey, what Cynthia wrote, solved my problem. Dear Cynthia, thank you. Actually, I really had to fit the ServerName option in my httpd.conf I managed to integrate apache tomcat with mod_webapp following this doc: http://www.galatea.com/flashguides/apache-tomcat-4-unix.xml On Fri, 19 Apr 2002, Jeffrey Bonevich wrote: They are not quite solid, but they are something. I am still looking for a more definitive discussion myself. Please post any you find as well. Thanx! jeff Cynthia Jeness wrote: I believe that this is a known problem and one suggested workaround is to do the following: Uncomment the line ServerName=localhost and changed localhost to www.ajug.org. Unless this line is uncommented, then Apache will generate an error (Invalid virtual host name) when restarted. Of course, change localhost to the correct name of your server. www.ajug.org is my web server. You can find our Tomcat4 how-to at this URL: http://www.ajug.org/howto/tomcat4.html Cynthia Jeness Web Chair, Atlanta Java Users Group charlie -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Which Connector for Tomcat 4.0.3 - mod_webapp or mod_jk
Cynthia - Here are a couple tomcat-user postings on the differences. They might help: http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg50263.html http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg49707.html They are not quite solid, but they are something. I am still looking for a more definitive discussion myself. Please post any you find as well. Thanx! jeff Cynthia Jeness wrote: I searched the Tomcat and Apache site yesterday for some explanation and/or recommendations for the choice of connector, but a search on connector or mod_webapp did not seem to provide any information about why I would chooce one over another. Can someone point me to the correct place or explain the difference between these connectors. Thanks, Cynthia Jeness -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35
Ohmygoditworks! All of that crap about setting up a virtual host really confuses the matter (I still maintain that there is a bug, either in Apache getting the port set using Listen into server_rec, or with mod_webapp relying on server_rec to supply the port number). Thank you very much! I am going to try to put together exactly what I had to do to get mod_webapp working with Tomcat 4 and Apache 2 and post it to the list. jeff Georg Huettenegger wrote: hi, my httpd.conf contains the following relevant: ServerName abc.def.com:3072 Listen 3072 LoadModule webapp_module modules/mod_webapp.so IfModule mod_webapp.c WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples /IfModule bye, georg On Fri, 19 Apr 2002, Jeffrey Bonevich wrote: Emil - I think you meant this to go to Georg. Georg - yes, please provide relevant lines from httpd.conf. From what I can tell, the source code is not even getting the port as specified by Listen. I have the following in my httpd.conf, and it does not work: [skip] Listen 65.186.165.33:80 #Listen 80 [skip] LoadModule webapp_module modules/mod_webapp.so [skip] ServerName www.bonevich.com:80 [skip] NameVirtualHost 65.186.165.33:80 VirtualHost 65.186.165.33:80 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples /VirtualHost Thanx! jeff Emil Olovsson wrote: Can you provide an example of how to write this, I cant get it working. -Original Message- From: Georg Huettenegger [mailto:[EMAIL PROTECTED]] Sent: den 19 april 2002 09:18 To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 hi, 1) the mod_webapp should connect to localhost:8008 as teh connector is listeneing on 8008 while tomcat is listening on 8080 for http requests 2) it seems that for the moment one has to provide the correct port to apache with the Listen directive and at the same time append the port number as part of the server name. with this setup it worked for me. bye, georg On Fri, 19 Apr 2002, Jeffrey Bonevich wrote: Regardless, it still does not work. The issue I am concerned with appears to be a bug - could be in mod_webapp or it could actually be in the Apache 2 code (server_rec is not getting a port number assigned to it, even after Listen supplies it). jeff Andrew Logan wrote: I believe the difference is that Tomcat's HTTP listener is on port 8080, but Tomcat's servlet container is listening on 8008 (default set up of course). [EMAIL PROTECTED] 19/04/2002 15:31:50 Why would I do that when Tomcat is listening on 8080? Actually did a little more research and there is already a bug registered that covers this issue. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4042 Looks as though there has been no action on this one for a while, and now it is very pertinent as the Port directive no longer exists for Apache 2. jeff Jay Gardner wrote: Try localhost:8008 instead --Jay Gardner -Original Message- From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 5:57 PM To: [EMAIL PROTECTED] Subject: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 Ok, on to the next set of issues! Finally got mod_webapp compiled properly and installed in Apache 2 (configtest returns Syntax Ok). Then I add the VirtualHost section: NameVirtualHost 65.186.165.33 VirtualHost 65.186.165.33 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8080 WebAppDeploy examples warpConnection /examples /VirtualHost ...and when I do another configtest I get errors: [root@strider apache2]# bin/apachectl configtest Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf: Invalid port number (p1) No Port statement found Line 995 is the WebAppDeploy directive. Is this mod_webapp looking for the (now depracated) Port statement in the main body of the config? If so, time to update code. If not, what am I missing? (As a side note, tried the VirtualHost directives with 127.0.0.1, with :80 appended, and with just *; same error each time.) jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL
Re: Apache 2.0.35, tomcat 4.0.3 and mod_webapp
Simon Stewart wrote: Having looked through the mailing list archives, this looks like a popular subject, and I think that I've almost got it cracked. Almost. After following the advice in http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg51557.html I just thought that people might like to know that the location of libwebapp.so should be ${APACHE2}/lib and not modules. For the purest approach, yes, but it really matters not (at least for my apache install -- 2.0.35, compiled from source, DSO-style, etc.). Did it actually matter for you (i.e. you got errors when it was in modules as opposed to lib)? Apache now passes a configtest with just the webapp module (without any WebApp* declarations) loaded but when I add the entries: LoadModule webapp_module modules/mod_webapp.so WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ (lifted from the default server.xml file) I get: root@mite:/usr/local/apache-2# ./bin/apachectl configtest Syntax error on line 221 of /usr/local/apache-2/conf/httpd.conf: Invalid virtual host name Where line 221 refers to the WebAppDeploy line. I'm perplexed, everything else looks good. Could anyone offer some suggestions, please? And the WebApp* directives themselves were in the main configs and not in any VirtualHost subsection? If in a VirtualHost section, try just placing them in the main configs and get rid of the vhost config subsection...I found this to work for me. If it is already in the main configs, are their other vhost subsections you already have for other things? Try commenting out all vhost configs and see if it works now. Long shot, I know, but... FWIW, my system config: Debian unstable, linux 2.4.18, JDK 1.4.0, Apache 2.0.35, web app compiled from the source suggested in the article above. Tomact 4.0.3, too. Regards, Simon -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Creating mod_webapp
Thanx Emil - the manual creation of .so files worked for me too. However, like tc, I get the wa_pool undefined symbol error. Gonna start digging into the source code to figure it out, but did this just work for you? jeff [EMAIL PROTECTED] wrote: Emil, Thank you very much. I now have my mod_webapp.so But now I'm getting this error when I start Apache. Cannot load /usr/local/httpd-2.0.35/modules/mod_webapp.so into server: /usr/local/httpd-2.0.35/modules/mod_webapp.so: undefined symbol: wa_pool Onto the next problem solving piece. :-) On Thu, 18 Apr 2002, Emil Olovsson wrote: I managed to solve the same problem by the following procedure: cd lib gcc -shared -o libwebapp.so *.lo cd ../apache-2.0 rm mod_webapp.la mod_webapp.lo mod_webapp.o mod_webapp.slo make gcc -shared -o mod_webapp.so *.lo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: den 18 april 2002 15:38 To: [EMAIL PROTECTED] Subject: Creating mod_webapp I have spent a few hours and I think I hit a road-block. It is not making a mod_webapp.so, rather a mod_webapp.lo, lso and la. The warning I am receiving is: -- *** Warning: This library needs some functionality provided by -lwebapp. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module mod_webapp. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. make[2]: Leaving directory `/root/jakarta-tomcat-connectors-4.0.2-01-src/webapp/apache-2.0' make[1]: Exiting directory apache-2.0 make[1]: Leaving directory `/root/jakarta-tomcat-connectors-4.0.2-01-src/webapp' - I was able to make the APR without problem, but this one is giving me issues. If anybody could help me compile this mod_webapp.so for Apache 2.0 I would really appreicate it. Thanks! -Steve -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: I'm sure it's a rehashed issue, but I'll try anyway. (Apache 2.0.35 tomcat 4.0.3) mod_webapp.so
Joshua- Refer to the messages under threads: Creating mod_webapp and Error compiling mod_webapp for debian Linux and Tomcat 4.0 and Apache 2.0.35 (yet again) and join the club! jeff Joshua Chen wrote: Hi all, I've been trying to get my Apache 2.0.35 Tomcat 4.0.3 up and running (on solaris 2.7). Apache works great, and tomcat works great as well. But now I try to use the mod_webapp.so file that came with apache 2.0.35, and I get the undefined symbol: ap_pstrdup So I read in a couple of archives to just try and compile the mod_webapp from the source, since ap_pstrdup is now apr_pstrdup. no problem, I go get the jakarta-tomcat-connectors-4.0.4-b2-src.tar.gz and go ahead and start compiling. I get to the end, and everything is successful. No errors, no compilations issues. What I don't get is a mod_webapp.so. (file listing at the end) I look at my Makefile in the apache-2.0, and the only target it has is the mod_webapp.la. Now I'm lost. I don't think I can do a LoadModule webapp_module libexec/mod_webapp.la, so I'm trying to figure out what I have done wrong. (I tried this about a week ago, and get errors in apachectl configtest) I have this funny feeling I'm just missing a stupid little detail, but I can't for the life of me figure it out. The libtool is version 1.4.2 gcc is 2.95.2 Any ideas on how to get a mod_webapp.so? Any help is appreciated. (file listing and Makefile below) Thanks in advance Joshua Chen i.e. - {/src/jakarta-tomcat-connectors-4.0.4-b2-src/webapp/apache-2.0} ls -al total 374 drwxr-xr-x 3 root root 512 Apr 17 19:11 . drwxr-xr-x 11 root root1024 Apr 17 19:11 .. drwxr-xr-x 2 root other512 Apr 17 19:11 .libs -rw-r--r-- 1 root other 5154 Apr 17 19:11 Makefile -rw-r--r-- 1 root root5092 Mar 24 00:09 Makefile.in -rw-r--r-- 1 root root 20534 Mar 24 00:09 mod_webapp.c -rw-r--r-- 1 root other784 Apr 17 19:11 mod_webapp.la -rw-r--r-- 1 root other 77348 Apr 17 19:11 mod_webapp.lo -rw-r--r-- 1 root other 76116 Apr 17 19:11 mod_webapp.o -rw-r--r-- 1 root other 0 Apr 17 19:11 mod_webapp.slo - --- include /src/jakarta-tomcat-connectors-4.0.4-b2-src/webapp/Makedefs APXS = /usr/local/apache/bin/apxs MODULE = mod_webapp.la all: $(MODULE) build: $(MODULE) mod_webapp.la: mod_webapp.c @$(ECHO) Compiling and Linking Apache 2.0 WebApp Module $(APXS) -I../include -c -L ../lib -lwebapp mod_webapp.c install: mod_webapp.la $(APXS) -i mod_webapp.la clean: @for ENTRY in *.o *.lo $(MODULE) .libs ; \ do \ if $(TEST) -f $${ENTRY} ; \ then \ $(ECHO) Removing file $${ENTRY} ; \ $(RM) -f $${ENTRY} ; \ fi ; \ if $(TEST) -d $${ENTRY} ; \ then \ $(ECHO) Removing directory $${ENTRY} ; \ $(RM) -rf $${ENTRY} ; \ fi ; \ done --- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
[Fwd: Tomcat 4.0 and Apache 2.0.35]
tc and Emil - Here is some more info. Applies to mod_jk though. I do not yet fully appreciate what the difference/relative merits of mod_jk vs mod_webapp are. There are a few postings to this list that appear to explain it, just haven't had time to read them in detail yet. Thomas - Have you tried this with mod_webapp yet? Any success? Original Message Subject: Tomcat 4.0 and Apache 2.0.35 Date: Thu, 18 Apr 2002 08:32:01 +0200 From: Thomas Honold [EMAIL PROTECTED] Organization: nt To: [EMAIL PROTECTED], [EMAIL PROTECTED] Hi, I've seen your postings and maybe this helps http://www.acg-gmbh.de/mod_jk/ cu Thomas -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Error compiling mod_webapp for debian Linux
Georg - You may have seen the other issue (with undefined symbol wa_pool) mentioned. Did you encounter this issue? Was it not an issue on Solaris? jeff Georg Huettenegger wrote: hi, for some reason i do not understand the build mechanism does not build a libwebapp.so shared library. if one does do this by and (and possibly also building a mod_webapp.so by hand) everything does work fine for me. apparently the build system still needs some improvement and for the moment it is possible to build shared libraries by hand. bye, georg On Thu, 18 Apr 2002, Emil Olovsson wrote: I am trying to build mod_webapp for apache 2.0.35 and Tomcat 4.0.3 I followed the instructions in the README file, and all was fine until I issued make. Then I got the following error. Can someone please tell me what is wrong. ... make[1]: Entering directory apache-2.0 make[1]: Invoking make build make[2]: Entering directory `/opt/webapp/jakarta-tomcat-connectors/webapp/apache-2.0' Compiling and Linking Apache 2.0 WebApp Module /opt/apache2*/bin/apxs -I../include -c -L ../lib -lwebapp mod_webapp.c /opt/apache2.0.35/build/libtool --silent --mode=compile c -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_RE ENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -g -O2 -pthread -I/ opt/apache2.0.35/include -I../incl ude -c -o mod_webapp.lo mod_webapp.c touch mod_webapp.slo mod_webapp.c: In function `wam_invoke': mod_webapp.c:482: warning: initialization discards qualifiers from pointer target type /opt/apache2.0.35/build/libtool --silent --mode=link gcc -o mod_webapp.la -rpath /opt/apache2.0.35/modules -mo dule -avoid-version -I../include -L../lib -lwebapp mod_webapp.lo *** Warning: This library needs some functionality provided by -lwebapp. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module mod_webapp. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. -- 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] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Error compiling mod_webapp for debian Linux
monty-burnsExellent!/monty-burns Georg - this worked beautifully. Thank you very much! For purposes of recording this on the user group so that others may benefit (if they bother to check first that is ;- ), here is exactly what I did: # # Assumptions # * You have already installed Apache 2.0.35 # * You have downloaded and unpacked the Jakarta Tomcat Connectors # source package (jakarta-tomcat-connectors-4.0.2-01-src.tar.gz) # # # Procedure # cd ${TOMCAT_CONNECTORS_SRC_HOME}/webapp chmod +x support/*.sh ./support/buildconf.sh ./configure --with-apxs=/usr/local/apache2/bin/apxs make # # Here is where it gets non-standard # cd lib gcc -shared -o libwebapp.so *.lo cd ../apache-2.0/ /usr/local/apache2/build/libtool --silent --mode=link \ gcc -shared -o mod_webapp.so -rpath /usr/local/apache2/modules \ -module -avoid-version -I../include -L../lib -lwebapp mod_webapp.lo cp mod_webapp.so /usr/local/apache2/modules/ cp ../lib/libwebapp.so /usr/local/apache2/modules/ # # Add the following to /usr/local/apache2/conf/httpd.conf: # # LoadModule webapp_module modules/mod_webapp.so # /usr/local/apache2/bin/apachectl configtest Wonder if this has been corrected in the CVS source yet? Maybe worth doing some searches on tomcat-dev and poking around in CVS, etc. Suppose I will look into that next! jeff Georg Huettenegger wrote: hi, while playing around with mod_jk/mod_webapp/binaries i did get undefined symbols (e.g. i tried to issue gcc -shared -o mod_webapp.so mod_webapp.o -L../lib -lwebapp in the apache-2.0 directory; the result did not work. nevertheless the following steps gave me a working version: i just manually compiled a libwebapp.so using: 'gcc -o libwebapp.so *.lo' in the lib directory. then i used the last line that links together mod_webapp.la in the apache-2.0 directory and added -shared before -o and changed the suffix to .so from .la. otherwise the line (something with .../libtool --mode=link gcc -o ) after copying mod_webapp.so and libwebapp.so to $APACHE_HOME/modules it worked without any problem bye, georg On Thu, 18 Apr 2002, Jeffrey Bonevich wrote: Georg - You may have seen the other issue (with undefined symbol wa_pool) mentioned. Did you encounter this issue? Was it not an issue on Solaris? jeff Georg Huettenegger wrote: hi, for some reason i do not understand the build mechanism does not build a libwebapp.so shared library. if one does do this by and (and possibly also building a mod_webapp.so by hand) everything does work fine for me. apparently the build system still needs some improvement and for the moment it is possible to build shared libraries by hand. bye, georg On Thu, 18 Apr 2002, Emil Olovsson wrote: I am trying to build mod_webapp for apache 2.0.35 and Tomcat 4.0.3 I followed the instructions in the README file, and all was fine until I issued make. Then I got the following error. Can someone please tell me what is wrong. ... make[1]: Entering directory apache-2.0 make[1]: Invoking make build make[2]: Entering directory `/opt/webapp/jakarta-tomcat-connectors/webapp/apache-2.0' Compiling and Linking Apache 2.0 WebApp Module /opt/apache2*/bin/apxs -I../include -c -L ../lib -lwebapp mod_webapp.c /opt/apache2.0.35/build/libtool --silent --mode=compile c -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_RE ENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -g -O2 -pthread -I/ opt/apache2.0.35/include -I../incl ude -c -o mod_webapp.lo mod_webapp.c touch mod_webapp.slo mod_webapp.c: In function `wam_invoke': mod_webapp.c:482: warning: initialization discards qualifiers from pointer target type /opt/apache2.0.35/build/libtool --silent --mode=link gcc -o mod_webapp.la -rpath /opt/apache2.0.35/modules -mo dule -avoid-version -I../include -L../lib -lwebapp mod_webapp.lo *** Warning: This library needs some functionality provided by -lwebapp. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module mod_webapp. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. -- 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] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär
Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35
Ok, on to the next set of issues! Finally got mod_webapp compiled properly and installed in Apache 2 (configtest returns Syntax Ok). Then I add the VirtualHost section: NameVirtualHost 65.186.165.33 VirtualHost 65.186.165.33 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8080 WebAppDeploy examples warpConnection /examples /VirtualHost ...and when I do another configtest I get errors: [root@strider apache2]# bin/apachectl configtest Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf: Invalid port number (p1) No Port statement found Line 995 is the WebAppDeploy directive. Is this mod_webapp looking for the (now depracated) Port statement in the main body of the config? If so, time to update code. If not, what am I missing? (As a side note, tried the VirtualHost directives with 127.0.0.1, with :80 appended, and with just *; same error each time.) jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35
Why would I do that when Tomcat is listening on 8080? Actually did a little more research and there is already a bug registered that covers this issue. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4042 Looks as though there has been no action on this one for a while, and now it is very pertinent as the Port directive no longer exists for Apache 2. jeff Jay Gardner wrote: Try localhost:8008 instead --Jay Gardner -Original Message- From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 5:57 PM To: [EMAIL PROTECTED] Subject: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 Ok, on to the next set of issues! Finally got mod_webapp compiled properly and installed in Apache 2 (configtest returns Syntax Ok). Then I add the VirtualHost section: NameVirtualHost 65.186.165.33 VirtualHost 65.186.165.33 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8080 WebAppDeploy examples warpConnection /examples /VirtualHost ...and when I do another configtest I get errors: [root@strider apache2]# bin/apachectl configtest Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf: Invalid port number (p1) No Port statement found Line 995 is the WebAppDeploy directive. Is this mod_webapp looking for the (now depracated) Port statement in the main body of the config? If so, time to update code. If not, what am I missing? (As a side note, tried the VirtualHost directives with 127.0.0.1, with :80 appended, and with just *; same error each time.) jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35
Regardless, it still does not work. The issue I am concerned with appears to be a bug - could be in mod_webapp or it could actually be in the Apache 2 code (server_rec is not getting a port number assigned to it, even after Listen supplies it). jeff Andrew Logan wrote: I believe the difference is that Tomcat's HTTP listener is on port 8080, but Tomcat's servlet container is listening on 8008 (default set up of course). [EMAIL PROTECTED] 19/04/2002 15:31:50 Why would I do that when Tomcat is listening on 8080? Actually did a little more research and there is already a bug registered that covers this issue. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4042 Looks as though there has been no action on this one for a while, and now it is very pertinent as the Port directive no longer exists for Apache 2. jeff Jay Gardner wrote: Try localhost:8008 instead --Jay Gardner -Original Message- From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 5:57 PM To: [EMAIL PROTECTED] Subject: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35 Ok, on to the next set of issues! Finally got mod_webapp compiled properly and installed in Apache 2 (configtest returns Syntax Ok). Then I add the VirtualHost section: NameVirtualHost 65.186.165.33 VirtualHost 65.186.165.33 ServerName tomcat.bonevich.com DocumentRoot /usr/local/tomcat/webapps/ WebAppConnection warpConnection warp localhost:8080 WebAppDeploy examples warpConnection /examples /VirtualHost ...and when I do another configtest I get errors: [root@strider apache2]# bin/apachectl configtest Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf: Invalid port number (p1) No Port statement found Line 995 is the WebAppDeploy directive. Is this mod_webapp looking for the (now depracated) Port statement in the main body of the config? If so, time to update code. If not, what am I missing? (As a side note, tried the VirtualHost directives with 127.0.0.1, with :80 appended, and with just *; same error each time.) jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 4.0 and Apache 2.0.35 (yet again)
There have been a number of postings regarding this subject, but none of them has made the answer clear: * Has anyone got Tomcat 4.0 integrated with Apache 2.0.35? * If so, using mod_jk or mod_webapp? * Where can I find the version of mod_jk|webapp used to do so? Binary or source, I do not care. Thanx! jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Search Engine and Tomcat
Try Lucene (another fine product brought to you by the people of Jakarta!) - Java API for indexing and searching. Also, I have had success integrating ht://Dig (www.htdig.org) into web apps, albeit Perl-based web apps. In Java, I would just do a system call I suppose - a bit overburdensome, but it would work. Check out http://www.siggraph.org/industry/search.html for an example of incorporating ht://Dig into a search interface (this is actually a page cooked up from the dynamic version of the site for performance reasons). jeff [EMAIL PROTECTED] wrote: I've been very pleased with Tomcat, and have it hosting some of our jsp content. I'm now looking for an indexing/search solution that would index and allow me to create a form to search the site for search keywords and display results. Preferably i'd like to be able to index content that is hosted on other virtual domains (non tomcat) along with tomcat content. Has anyone got advice on something that could do this? I've looked at e-swish at the moment, and its a start for what i'd like, but just wondering if there are others that have searchable websites with tomcat also disinterested in having a google search of ones own content. Thanks Alex -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSP/JDBC/POSTGRESQL
Dave Anders wrote: I'm trying to access my new PostgreSQL database using Tomcat 4.0.3 and JDBC. I'm receiving an Internal Server Error. exception : javax.servlet.ServletException: WEB-INF/lib/jdbc7.1-1.2.jar/org/postgresql/Driver root cause : java.lang.ClassNotFoundException: WEB-INF/lib/jdbc7.1-1.2.jar/org/postgresql/Driver Provide the code you are using to load the driver. The above looks sorely malformed. You should be doing a Class.forName(org.postgresql.Driver) in the code, or if you are setting up a DataSource in the configs the class name should be similarly formed. I'm sorry but I don't know at the moment how to implement the jdbc7.1-1.2 driver class so it is working properly. Is there anybody out there who knows the answer. Thank you, Dave Anders -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: global singleton across multiple engines?
Try RMI. You cannot have an instance of a class shared across multiple JVMs (= multiple instances of Tomcat running). But you might be able to set up an RMI server with a singleton instance of a Remote object. Sharing across different contexts within the same Tomcat engine is a different matter. That ought to work as long as the class is loaded by the same ClassLoader instance used by each context to load classes. How to control that is beyond me. jeff Ray Tayek wrote: hi, i need to have a global singleton that is a singleton across all instances of (tomcat) servlet engines. is there an engine context in tomcat that i can access? does this singleton work across virtual hosts? how does this work across multple jvm's on the same machine (or does this not happen)? how about when you are load balancing across different physical nodes? - do you need to have some system semaphore on one of the nodes to prevent multiple instances? afaict so far, restarting a context, takes down all of the classes in the context and putting copy of singleton into a different context, seems to cause two instances to be created. any pointers would be appreciated. thanks --- ray tayek http://home.attbi.com/~rtayek/ actively seeking telecommuting work vice chair orange county java users group http://www.ocjug.org/ mailto:[EMAIL PROTECTED] hate spam? http://samspade.org/ssw/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Memory usage
Yaogeng - That is normal for any java application running on Linux. Just java native threads showing up as multiple processes, but its actually mostly shared memory. Do a 'top' to confirm. jeff Yaogeng Cheng wrote: Hi: I am using TomCat version 3.2.1 in Linux, and I found there are a lot of java apps running after I started the tomcat. They used a lot of memory. Does newer version TomCat use much less memory than 3.2.1. If there is, which version should I use? Thanks, Yaogeng -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Altering content of BodyContent prior to JSP eval
How can I get at the content of BodyContent in a BodyTagSupport subclass, alter that content, and then reinsert the content into the body before it gets evaluated as JSP? Is this just just totally anathema to JSP spec or something? Say that I have the following: mytaglib:bodymunger value=lookup Place the stuff *** here /mytaglib:bodymunger Then in the BodymungerTag (extends BodyTagSupport) I want to lookup the value of lookup, grab the body content, and replace the string *** with that value. Say the value actually returns a string: mytaglib:othertag/ Then I want that new content evaluated as JSP. Is there any way to do this? Do I have to do it manually using Jspc or something? jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Memory usage
Pretty normal, yes. You can affect that number using command line directives: $ java -Xms64m -Xmx128m blah where -Xms specifies the intial heap size, and -Xmx specifies the max. You would have to alter the startup script to make this effective. Typically you only want to use -Xms if you *know* you will exceed the default initial heap size (no clue what that is, arch dependent); and you only really use -Xmx if you want to impose a more arbitrary upper limit (i.e. please do not use up all resources on my server before crashing and burning). jeff Yaogeng Cheng wrote: Jeff: Thanks for the replying. The total memory usage of Apache and tomcat is 14464k. Is that normal? Thanks a lot! Yaogeng -Original Message- From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 6:55 PM To: Tomcat Users List Subject: Re: Memory usage Yaogeng - That is normal for any java application running on Linux. Just java native threads showing up as multiple processes, but its actually mostly shared memory. Do a 'top' to confirm. jeff Yaogeng Cheng wrote: Hi: I am using TomCat version 3.2.1 in Linux, and I found there are a lot of java apps running after I started the tomcat. They used a lot of memory. Does newer version TomCat use much less memory than 3.2.1. If there is, which version should I use? Thanks, Yaogeng -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Altering content of BodyContent prior to JSP eval
Hi I-Lin! Fancy meeting up with you here! Nope, what you describe is not what I want, precisely because I do not know what the value of lookup is before I want to use it...could be just a string, could be HTML (i.ea string), or could be JSP (i.ea string, too, except this time I want it to be evaluated at request time). Sounds like something is in the works for JSP 1.3 (JSP fragments) so I will have to wait jeff I-Lin Kuo wrote: Hi Jeff, I'm not sure exactly what you want, but couldn't you just nest tags? mytaglib:bodymunger value=lookup mytaglib:customprocessing value=lookup Place the stuff *** here /mytaglib:bodymunger /mytaglib:bodymunger if you didn't want to retype lookup in the inner tag, you could make the inner tag an associated child tag of the outer one and have it get the value=lookup from the outer one. Here are some good references http://www.onjava.com/pub/a/onjava/2001/01/18/jsptags.html http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html From: Jeffrey Bonevich [EMAIL PROTECTED] Subject: Altering content of BodyContent prior to JSP eval Date: Tue, 09 Apr 2002 09:57:45 -0400 How can I get at the content of BodyContent in a BodyTagSupport subclass, alter that content, and then reinsert the content into the body before it gets evaluated as JSP? Is this just just totally anathema to JSP spec or something? Say that I have the following: mytaglib:bodymunger value=lookup Place the stuff *** here /mytaglib:bodymunger Then in the BodymungerTag (extends BodyTagSupport) I want to lookup the value of lookup, grab the body content, and replace the string *** with that value. Say the value actually returns a string: mytaglib:othertag/ Then I want that new content evaluated as JSP. Is there any way to do this? Do I have to do it manually using Jspc or something? jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! W?Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, h?ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
How to mess with BodyContent prior to evaluation
Here is what I want to do: * I have a taglib with a tag: mytag:get value=value_name [parse=(true|false)]/ * the GetTag class extends BodyTagSupport * doStartTag returns EVAL_BODY_BUFFERED * doInitBody() needs to get the object/value associated with value attribute; so I lookup value_name in a repository object I shoved in my PageContext early on... * then I want to potentially parse the value (rendered as a string of course) as JSP; otherwise I just print out the value via pageContext.getOut().print(value.toString()) The latter part is simple enough to do, but there seems to be no way to grab the contents of the BodyContent, muck with those contents, and then stuff them back in and have them evaluated as JSP. Thought I might be able to do this in doInitBody (as the spec sez that BodyContent has not been evaluated yet at this point), but I can determine no straightforward (i.e. no implementation-specific) way to do this. Anyone have suggestions? Need more to go on (I can provide code if that helps)? jeff -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tag Libraries: manual processing of tag bodies?
Hello all! A question in search of an answer... I am developing a tag library, and for one particular tag I want to prevent the body content from being processed as JSP. I know I can prevent this by declaring body-cententTAGDEPENDENT/body-content in the descriptor file for the library. (I am aware that TAGDEPENDENT has not been implemented in tomcat yet, 3 or 4, but I found a patch and fixed it up on my own. Tomcat-dev mailing list response to questions on this was nil, so I may have to make a bigger stink to get the actual patch put into the code base.) However, once I have obtained the un-processed body content in doAfterBody() and have done the post-processing of that content that I want to do, I am at a complete loss as to how to turn around and have the "new" body content processed as JSP. JSP 1.2 spec/Tomcat appear to lack any clear hook to let you manually process a string/stream as JSP. Any ideas? Thanx! jeff -- Jeffrey Nikole Bonevich Maxmillian Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Tag Libraries: manual processing of tag bodies?
Craig - Thank you for the quick response! more below... "Craig R. McClanahan" wrote: Jeffrey Bonevich wrote: Hello all! A question in search of an answer... I am developing a tag library, and for one particular tag I want to prevent the body content from being processed as JSP. I know I can prevent this by declaring body-cententTAGDEPENDENT/body-content in the descriptor file for the library. (I am aware that TAGDEPENDENT has not been implemented in tomcat yet, 3 or 4, but I found a patch and fixed it up on my own. Tomcat-dev mailing list response to questions on this was nil, so I may have to make a bigger stink to get the actual patch put into the code base.) The best way to "make a bigger stink" about this, or any other such issue, is to submit a bug report: http://nagoya.apache.org/bugzilla/ under the appropriate "Tomcat 3" and/or "Tomcat 4" product categories and versions. Thank you for the directions - I will do so shortly! By the way, have you tried "tagdependent" instead of "TAGDEPENDENT"? These values are case sensitive. Actually, in the tomcat code they are case-insensitive. I am fairly certain that the spec does not require it to be sensitive either. In any case, the code that is supposed to branch on TAGDEPENDENT vs. JSP vs. EMPTY makes no distinction between the first two - simply processes it as JSP anyway! However, once I have obtained the un-processed body content in doAfterBody() and have done the post-processing of that content that I want to do, I am at a complete loss as to how to turn around and have the "new" body content processed as JSP. JSP 1.2 spec/Tomcat appear to lack any clear hook to let you manually process a string/stream as JSP. Any ideas? JSP doesn't support this concept of trying to generate JSP content on the fly, and then process it. The reason is that all the compile processing happens only at compile time, whereas you are trying to do so at runtime. Now that you point it out, that makes a helluva lotta sense! That is almost exactly what I am trying to do, alter the runtime processing. Sounds like I want to be doing taglibs for directives, but unfortunately there is no way to do this in JSP AFAIK. Yerch! I can think of some other work-arounds to the issue, requiring the use of nested tags for doing the right kind of short-circuiting I want (I am trying to port an XML-based templating system I use at work to JSP to do performance comparisons), but it would be nice if I could to it The Right Way(TM). Sigh... Thanx! jeff Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Jeffrey Nikole Bonevich Maxmillian Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]