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 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 no luck there, either. Ho hum.
>>>>
>>>>None of the logs in the tomcat log directory get any larger when I
>>>>start apache, so it doesn't look as if the webapp module even attempts
>>>>to connect to tomcat, and there are no new entires in any of tha
>>>>apache logs either. Is there some way to get some verbose output out
>>>>of the module and find out what it thinks it's playing at?
>>>>
>>>>I've even edited the /etc/hosts file so that "localhost" is the only
>>>>name for this machine and restarted both tomcat and then apache with
>>>>no luck.
>>>>
>>>>Cheers,
>>>>
>>>>Simon
>>>>
>>>>-- 
>>>>Chaos, panic, & disorder - my work here is done
>>>>
>>>>--
>>>>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]>
>>
> 
> 
> 


-- 
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]>

Reply via email to