problem mod_webapp.so module
When executing make in the directory where everything will build fine until it gets to the mod_webapp.c file in the apache-1.3 directory. When doing make in the apache-1.3 directory I get the following output: ~/web_app/webapp-module-1.0.1-tc401/apache-1.3# make { APXS_LDFLAGS_SHLIB=`/usr/local/sbin/apxs -q LDFLAGS_SHLIB` \ \ -lm -lcrypt -lnsl -ldl ; \ APXS_LDFLAGS_SHLIB=`/bin/echo ${APXS_LDFLAGS_SHLIB}` ; \ APXS_CFLAGS=`/usr/local/sbin/apxs -q CFLAGS` \ -g -O2 \ -g -O2 \ \ -DLINUX=2 -D_REENTRANT \ -I/root/web_app/webapp-module-1.0.1-tc401/apr/include \ -I/root/web_app/webapp-module-1.0.1-tc401/include \ ; \ APXS_CFLAGS=`/bin/echo ${APXS_CFLAGS}` ; \ /usr/local/sbin/apxs \ -S CFLAGS=${APXS_CFLAGS} \ -S LDFLAGS_SHLIB=${APXS_LDFLAGS_SHLIB} \ -o mod_webapp.so \ -c mod_webapp.c \ /root/web_app/webapp-module-1.0.1-tc401/lib/libwebapp.a \ /root/web_app/webapp-module-1.0.1-tc401/lib/libapr.a ; \ } apxs:Error: no config variable LDFLAGS_SHLIB Usage: apxs -g [-S var=val] -n modname apxs -q [-S var=val] query ... apxs -c [-S var=val] [-o dsofile] [-D name[=value]] [-I incdir] [-L libdir] [-l libname] [-Wc,flags] [-Wl,flags] files ... apxs -i [-S var=val] [-a] [-A] [-n modname] dsofile ... apxs -e [-S var=val] [-a] [-A] [-n modname] dsofile ... make: *** [mod_webapp.so] Error 1 I managed to fix this by changing the apxs script, someone else deleted the line setting the flag. The orriginal script looked like this: ## ## Configuration ## my $CFG_TARGET= q(httpd);# substituted via Makefile.tmpl my $CFG_CC= q(gcc);# substituted via Makefile.tmpl my $CFG_CFLAGS= q( -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci`); # substituted via Makefile.tmpl my $CFG_CFLAGS_SHLIB = q(); # substituted via Makefile.tmpl my $CFG_LD_SHLIB = q(); # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(); # substituted via Makefile.tmpl my $CFG_LIBS_SHLIB= q();# substituted via Makefile.tmpl my $CFG_PREFIX= q(/usr/local);# substituted via APACI install my $CFG_SBINDIR = q(/usr/local/sbin); # substituted via APACI install my $CFG_INCLUDEDIR= q(/usr/local/include/httpd);# substituted via APACI install my $CFG_LIBEXECDIR= q(/usr/local/libexec);# substituted via APACI install my $CFG_SYSCONFDIR= q(/etc/apache);# substituted via APACI install Changed to: my $CFG_CFLAGS_SHLIB = q( ); # substituted via Makefile.tmpl my $CFG_LD_SHLIB = q( ); # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q( ); # substituted via Makefile.tmpl my $CFG_LIBS_SHLIB= q( );# substituted via Makefile.tmpl Is this a problem in perl-5.004? Now I get the following output: ~/web_app/webapp-module-1.0.1-tc401/apache-1.3# make { --- SNIP --- } gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -g -O2 -g -O2 -DLINUX=2 -D_REENTRANT -I/root/web_app/webapp-module-1.0.1-tc4 01/apr/include -I/root/web_app/webapp-module-1.0.1-tc401/include -I/usr/lo cal/include/httpd -c mod_webapp.c *Initialization*:1: warning: `LINUX' redefined *Initialization*:1: warning: this is the location of the previous definition -lm -lcrypt -lnsl -ldl -o mod_webapp.so mod_webapp.o /root/web_app/webapp-module-1.0.1-tc401/lib/libwebapp.a /root/web_app/webapp-module-1.0.1-tc401/lib/libapr.a apxs:Break: Command failed with rc=255 make: *** [mod_webapp.so] Error 1 which implies that gcc compiles the mod_webapp.c file (I also checked that mod_webapp.o exists, and it does). It seems to me like the second command (the one after the second warning) is not complete and thus fails to execute. Does anyone know what should be going in there? I tried gcc but that fails bad time. Perhaps those $CFG_* configuration values I changed? If they are empy you get the no config variable LDFLAGS_SHLIB error, place them there, you get a bit further but you still fail. Any advice welcome. Jaco -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: which is the current directory for Tomcat Server?
Hi There is a directory called work (jakarta-tomcat-4.0.1/work) under which a directory gets created for each context - where the servlets get run. Excactly how it works from there I'm not sure but you should be able to get to your file by using absolute addresses. Or perhaps by using a relative address of the form ../../webapps/yourappname/WEB-INF/classes/filename, but I'm not too sure. You could possibly find the location by making the servlet create a file called something like find.me and then issuing find / -name find.me. Jaco Hi, Thanks for the fast reply. What I want is to read a text file from servlet or jsp page. I don 't want to specify the whole directory path for the file. I want to just specify the file name and should be able to read that file. So I believe if I keep in the current working directory of the Tomcat server, it will work. IS the WEB root as same as the Current working directory for the Tomcat Server. Regards, Santosh -Original Message- From: Atok Koenig [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:54 PM To: Tomcat Users List Subject: Re: which is the current directory for Tomcat Server? Do you mean the web root? If so that is install path\jakarta-tomcat-3.2.2\webapps\ROOT Youcan change this or add additional virtual roots in the \config\server.xml file using the context tags -Original Message- From: Santosh Varghese [EMAIL PROTECTED] Date: Thu, 31 Jan 2002 14:37:21 -0800 To: Tomcat Users List [EMAIL PROTECTED] Subject: which is the current directory for Tomcat Server? Hi, I wanted to read some txt file from the current directory for tomcat server. But I am unable to find out the current directory. Please help me out Regards, Santosh -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]