IRC log for #tomcat on 20080727

00:14.43*** join/#tomcat lmartin92__ (n=lmartin9@adsl-227-55-180.jan.bellsouth.net)
00:17.14lmartin92__ok, I have tomcat up and runing with liferay but the problem is, I can go to port 8080 and it just enters a forever load no display content loop
00:51.09MHSLlmartin92__, did you check with netstat whether tomcat is really running?
00:51.32lmartin92__tail -f ../logs/catalina.out; that's how I check
01:13.52MHSLlmartin92__, try to check with netstat whether tomcat is listening on 8080
01:14.15lmartin92__how check with netstat?
01:15.20lmartin92__Tomcat 5.5.1 Xubuntu Hardy Java from Sun at 1.1.5
01:15.26lmartin92__1.5.1*
01:19.35MHSLlmartin92__, type netstat -an | grep 800
01:19.38MHSLlmartin92__, type netstat -an | grep 8080
01:20.26lmartin92__ok, now we just have to wait till I reinstall it again, (keep on trying)
01:25.11MHSLlmartin92__, where did you get tomcat?
01:26.25lmartin92__liferay
01:26.35lmartin92__siwtching to 6.0.* soon
01:26.41MHSLic
01:27.26lmartin92__what, does liferay tomcat have problems or something?
01:29.28MHSL?
01:29.37MHSLi dont know, i never use lifearay
01:29.44MHSLliferay*
01:30.11lmartin92__when you said ic, i thought you meant something along the lines of "ic, liferay is crap"
01:31.11MHSLoh, no, i never use it, so i'm not familiar with it
01:32.02lmartin92__ok
01:32.23lmartin92__I was making sure before I downloaded it all the way and waisted some bandwitdth
01:39.38*** join/#tomcat Internat-afk (n=nf@123-243-184-161.static.tpgi.com.au)
02:14.36lmartin92__well I'm going to have to sleep for a while
03:42.11*** join/#tomcat acidjnk (i=acid@pD9508838.dip0.t-ipconnect.de)
04:04.35*** join/#tomcat McKillaGorilla (n=chatzill@ool-182ed5ff.dyn.optonline.net)
04:04.53McKillaGorillahello everyone
04:08.30McKillaGorillaHello, I'm having a problem running Tomcat 5.5 on Windows Vista, I have Java 1.6 installed
04:08.54McKillaGorillaWhen I first download & install Tomcat it asks me if I want to run it, which I say yes to
04:08.57McKillaGorillaand it works fine
04:09.14McKillaGorillait appears in my Windows tray, and I can stop and start it and run my own servlets, etc
04:09.58McKillaGorillaBut when I exit that application and try to then run the Tomcat5 program from Windows Explorer all hell breaks loose
04:10.56McKillaGorillaI get an IOException saying it "Cannot rename original file to C:.../tomcat-users.xml.old
04:11.09McKillaGorillaand basically tomcat hangs and doesn't work
04:11.20McKillaGorillaany ideas what I'm doing wrong?
04:32.42MHSLMcKillaGorilla, run the Tomcat5 program from Windows Explorer -> what do you mean by this?
04:32.54MHSLMcKillaGorilla, you mean tomcat5.exe?
04:34.02MHSLMcKillaGorilla, just run startup.bat or shutdown.bat to startup or shutdown respectively
04:40.33McKillaGorillayes, tomcat5.exe, i don't have startup.bat or shutdown.bat files in my bin directory
04:41.33McKillaGorillawith my Tomcat 5.5 installation I only have 5 files in my bin directory:
04:42.02McKillaGorillabootstrap.jar, commons-logging...jar, tomcat-juli.jar, tomcat5.exe, and tomcat5w.exe
04:43.14McKillaGorillaAlso, on my start menu, when I installed it put a Tomcat5 Menu Item that has "Configure Tomcat" and "Monitor Tomcat" program options
04:43.36McKillaGorillabut for both, when I select them I get "Access is denied. Unable to open the service Tomcat5"
04:44.24MHSLnot sure, i never use the installer version, i always use the .tar.gz or .zip version
04:44.28McKillaGorillaI have used Tomcat 6 before, and so I am familiar with the startup & shutdown files you are referring to, but my client wants to use Tomcat 5.5
04:44.46MHSLthere are also such files in tomcat 5.5
04:45.01McKillaGorillamaybe it's a difference of the installer versus the zip
04:45.06McKillaGorillai guess i'll try the zip
04:45.14McKillaGorillathanks for the help
04:52.19McKillaGorillaHI, MHSL?
04:52.36McKillaGorillaI got the same error as before running from the startup batch file
05:01.29MHSLwhat error?
05:02.13MHSLMcKillaGorilla, this "Access is denied. Unable to open the service Tomcat5"?
05:02.48McKillaGorillano, the batch file starts tomcat, but then it just gets an IOException and hangs
05:03.30MHSLMcKillaGorilla, this "Cannot rename original file to C:.../tomcat-users.xml.old?
05:03.54MHSLMcKillaGorilla, do you have tomcat-users.xml under tomcat conf directory?
05:04.09McKillaGorillayes
05:04.21MHSLMcKillaGorilla, then do you have this tomcat-users.xml.old?
05:04.24McKillaGorillawell, not the old one
05:04.31McKillaGorillajust tomcat.users.xml
05:04.40MHSLit's supposed to be tomcat-users.xml not tomcat.users.xm
05:04.42MHSLl
05:05.07McKillaGorillasorry, typo
05:05.13McKillaGorillait's tomcat-users.xml
05:05.29MHSLMcKillaGorilla, what's the reason it cannot rename? file does not exist or something?
05:05.31McKillaGorillabut it looks like tomcat is trying to rename it
05:05.39McKillaGorillaa long stack trace one sec
05:05.44MHSLuse pastebin
05:05.53MHSLjust want to see the top part
05:05.58McKillaGorillait says "No UserDatabase component found under key UserDatabase
05:06.15MHSLok so that's the problem, not tomcat-users.xml
05:06.17McKillaGorillaat org.apache.catalina.realm.UserDatabaseRealm.start(...
05:06.51MHSLMcKillaGorilla, did you change anything on your server.xml?
05:06.59McKillaGorillano
05:07.02MHSLMcKillaGorilla, open your server.xml and find Resource name="UserDatabase"
05:07.07McKillaGorillajust unzipped and tried running startup
05:07.13McKillaGorillaok
05:07.14MHSLwhat's the pathname
05:08.55McKillaGorillaconf/tomcat-users.xml
05:09.10MHSLhm ic
05:09.38MHSLMcKillaGorilla, the name is UserDatabase right?
05:10.02McKillaGorillaResource name="UserDatabase"
05:10.11McKillaGorillafor that pathname
05:10.45MHSLMcKillaGorilla, you downloaded tomcat in zip file right? did you run the startup.bat from the extracted directory or you copied over to your existing installation?
05:11.27McKillaGorillai downloaded to my desktop and then extracted to the "Apache Software Foundation" directory (I use Ant there)
05:11.44McKillaGorillaso i didn't copy anything after that
05:11.51MHSLwhat did you use ant for?
05:12.15McKillaGorillafor managing some projects and stuff with JUnit
05:12.24MHSLok
05:12.30McKillaGorillabut i haven't touched it this week
05:12.41MHSLit doesnt change any tomcat config right?
05:12.46McKillaGorillano
05:13.07McKillaGorillai've never mixed the two on this machine, it's fairly new
05:13.39McKillaGorillathis is my first Vista though, so i'm starting to think it's somehow involved because I've never had much problem with tomcat
05:13.41MHSLthis doesnt make sense you've got Resource with name UserDatabase, but the Realm cannot find it for some reason
05:14.24McKillaGorillahmm
05:14.27McKillaGorillai think i have an idea
05:14.39MHSLdoes your Resource UserDatabase put under GlobalNamingResources?
05:14.47McKillaGorillai tried "startup.bat > output.txt" and it said "Access is denied"
05:14.57McKillaGorillai think the denied access is to the directory
05:15.01MHSLanything on the log?
05:15.14McKillaGorillai think Vista is preventing Tomcat from writing to the directory
05:15.29MHSLMcKillaGorilla, as you said above, you extracted tomcat zip file to a directory, hence the directory structure is still the same right?
05:15.42McKillaGorillayes
05:15.46MHSLcan you check the log
05:15.57MHSLanything on log
05:16.04McKillaGorillawhich directory?
05:16.04MHSL?
05:16.22MHSLtomcat log...
05:16.41McKillaGorillawhich directory is that file in?
05:16.53MHSLdo you know where tomcat stores its log files by default?
05:17.19McKillaGorillai would assume the "log" directory, but mine's empty
05:17.26McKillaGorillalogs, rather
05:17.45McKillaGorillai have a "logs" directory, but no files there
05:18.02MHSLMcKillaGorilla, hm empty, so when you ran startup.bat the access denied came before "No UserDatabase component found under key UserDatabase" or the other way around?
05:18.44McKillaGorillayes, access denied came first, the other part wasn't even reached, but it only happened with i did a "> output.txt"
05:19.00McKillaGorillalike "startup > output.txt"
05:19.18McKillaGorillathat's why i think it might be vista enforcing permissions ore something
05:19.21McKillaGorillaeven on tomcat
05:20.03McKillaGorillahmm guess what
05:20.16McKillaGorillai just looked at the permissions on the bin folder
05:20.26McKillaGorillaand it says i only have Read-Only access
05:20.33McKillaGorillaso i changed it
05:20.37MHSLcheck the conf dir as well
05:20.38McKillaGorillaand then i looked again
05:20.44McKillaGorillaand it says it didn't change
05:20.52McKillaGorillain other words Vista isn't letting me change it
05:20.53MHSLif this is vista problem, then i cant really help you
05:21.01McKillaGorillaeven though i'm expressly telling it
05:21.06McKillaGorillaya it might be a vista problem
05:21.13McKillaGorillai'll have to figure that out
05:21.18McKillaGorillathanks for the help
05:45.09McKillaGorillai got it
05:45.29McKillaGorillahad to change access permissions in Vista
05:45.35McKillaGorillathanks again
05:46.32*** join/#tomcat dweebgirl (n=Domini@32.155.77.248)
06:06.01*** join/#tomcat vikumar (n=Vimal@nat/redhat-in/x-0a18f0c5009b4b26)
07:18.57*** join/#tomcat bindaas (n=bindaas@59.94.108.154)
08:51.56*** join/#tomcat wltjr (n=wltjr@gentoo/developer/wltjr) [NETSPLIT VICTIM]
08:51.56*** join/#tomcat prgrmr (n=prgrmr@bzq-79-181-152-53.red.bezeqint.net) [NETSPLIT VICTIM]
08:51.56*** join/#tomcat snyff (n=snyff@sd-9760.dedibox.fr) [NETSPLIT VICTIM]
08:51.56*** join/#tomcat vanksi (n=vanksi@stekt2.oulu.fi) [NETSPLIT VICTIM]
08:51.56*** join/#tomcat r0bby (n=wakawaka@guifications/user/r0bby) [NETSPLIT VICTIM]
08:51.57*** join/#tomcat ishi (n=ishi@81.210.48.58) [NETSPLIT VICTIM]
08:54.21*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
08:57.02*** part/#tomcat Hali_304 (n=Hali_303@dsl5400CCFA.pool.t-online.hu)
09:01.33*** join/#tomcat malick_mobile_ (n=mobile@ip230-68-210-87.adsl2.static.versatel.nl)
09:52.26*** join/#tomcat malick_mobile__ (n=mobile@ip230-68-210-87.adsl2.static.versatel.nl)
10:07.27*** join/#tomcat ufk (n=ufk@bzq-79-180-108-42.red.bezeqint.net)
10:39.01lmartin92__MHSL: I do netstat -an | grep 8080 and it shows that there is one connection listening and one trying to make a connection to that listener
10:39.23MHSLlmartin92__, is that process tomcat?
10:39.59lmartin92__it doesn't give process names, however no listener was there till I started tomcat so it's logical that it is tomcat
10:42.43MHSLlmartin92__, you can list the pid, then you can check with ps
10:43.07MHSLthen try to access http://localhost:8080
10:43.20lmartin92__I did, still not working
10:43.28lmartin92__I'll send you a pastie of my catalina.out
10:44.16lmartin92__http://pastie.textmate.org/241945
10:45.21MHSLlmartin92__, dont you see the bindexception on the log?
10:45.30MHSLthis means that the port has been used
10:45.46lmartin92__I always used tail so I never saw the whole log
10:45.55MHSL...
10:46.10lmartin92__ok, I shutdown the listener
10:46.11MHSLuse tail -f and leave it running
10:46.26lmartin92__and now I'm going to try and bring it back up
10:49.05lmartin92__what could be using my 8080 port?
10:49.12lmartin92__and how would I kill it
10:50.44kjkoster5489sockstat/lsof/netstat will tell you.
10:51.00kjkoster5489Otherwise just move Tomcat to port 8090 or something.
10:51.09kjkoster5489Or use ps/top to find all Tomcat processes.
10:51.33kjkoster5489Or surf to 8080 and see what is listening there.
10:51.41MHSLlmartin92__, i've told you to list the pid using netstat then check the process using ps
10:51.58*** join/#tomcat bindaas (n=bindaas@59.94.107.163)
10:52.02lmartin92__ok
10:52.10kjkoster5489Use Firefox live http headers to check the headers in responses That will tell you about what application server is serving 8080.
10:52.40lmartin92__well, I make connect to 8080 and it fails to do anything but forever load and never show content
10:52.46lmartin92__I'll try 8081 this time
10:58.29lmartin92__hey hey, thanks
10:58.33lmartin92__it works
10:59.06lmartin92__now all I got to do is setup liferay with a real db, and then have appache foward stuff to it
11:22.06*** join/#tomcat kjkoster5489_ (n=kjkoster@kjkoster.org)
11:23.01*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
11:23.50*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
12:14.59kjkoster5489MHSL: On Linux, what is the precise command line for netstat to find the pid of a process on port 8080?
12:15.13MHSL-p
12:15.18MHSLthat will give you the pid column
12:19.00kjkoster5489Hmm. Darwin does not have that.
12:19.24kjkoster5489Nor does FreeBSD.
12:21.22kjkoster5489Thanks, now I have the list for most mainstream os-es.
12:21.42kjkoster5489netstat -anp | grep 8080
12:23.45kjkoster5489Hmm. netstat -lnp would omit a lot of unnecessary lookups.
12:24.02kjkoster5489MHSL what precise options to you use to find a process listening on 8080?
12:24.15kjkoster5489Sorry to bother you, but I have no Linux box to test.
12:24.37MHSLusing the -p i mentioned above
12:24.44MHSLjust refer to the man page
12:25.07MHSLof netstat
12:31.42*** join/#tomcat magentar (n=magentar@213-10.206-83.static-ip.oleane.fr)
13:24.35kjkoster5489MHSL, lmartin92__: here is a little howto I just wrote on the subject of finding and killing the processes listening on port 8080: http://java-monitor.com/forum/showthread.php?p=65
13:24.58*** join/#tomcat jfclere (n=jfclere@213.174.122.2)
13:26.39MHSLkjkoster5489, On Linux the command is (probably, I have no Linux box to test on) -> you can do man netstat on google
13:27.08kjkoster5489I know, but I wanted to include output like I did for FreeBSD and OS X.
13:27.17kjkoster5489Could you help me by making it for me?
13:30.20kjkoster5489Just start a tomcat on 8080 and paste the output of netstat -p | grep 8080 in a pastie somewhere, plus the associated ps command. I'll include it in tthe text.
13:30.23MHSLsomething like this tcp        0      0 127.0.0.1:80         0.0.0.0:*               LISTEN      1501/jsvc.exec
13:30.33kjkoster5489Icol
13:30.34MHSLcolumns: Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
13:30.46kjkoster5489cool, I mean.
13:31.14kjkoster5489And ps is also 'ps -wwp 1501'?
13:31.21kjkoster5489What does that look like?
13:33.33MHSLcan use ps -fp PID
13:34.03kjkoster5489Could you paste the output for an actual Tomcat server please?
13:34.07MHSLUID        PID  PPID  C STIME TTY          TIME CMD
13:34.13MHSLtomcat   14093 14092  1 Jul16 ?        03:29:42 jsvc.exec -home /usr/local/java -jvm server -user tomcat -Djava.endorsed.dirs=/usr/local/apache-tomcat-6/comm
13:34.16MHSLsomething like that
13:34.18kjkoster5489Do you have a blog that I can refer to when I mention your name?
13:36.02MHSLdont forget to match the pid ^
13:40.21kjkoster5489I have changed the code.
13:40.53kjkoster5489I refer to you as "MHSL on FreeNode's IRC channel #tomcat", which I can change to something else if you like.
13:41.01kjkoster5489Thanks for your help.
13:41.31MHSLfor windows: netstat -ano
13:41.51MHSLok that's fine
13:42.31MHSLProto  Local Address          Foreign Address        State           PID
13:42.37MHSLTCP    0.0.0.0:8080            0.0.0.0:0              LISTENING       800
13:44.01MHSLbtw the linux netstat command was netstat -anp | grep 8080
13:44.19MHSLotherwise you wont get it
13:44.52MHSLfor windows: http://searchsecuritychannel.techtarget.com/tip/0,289483,sid97_gci1275209,00.html
13:48.08MHSLanother thing, on linux you must be root to perform netstat with -p
13:53.30kjkoster5489MHSL: is there a non-root command that I can use? Is either sockstat or lsof part of the base distribution on most Linux distro's?
13:58.10MHSLkjkoster5489, ok if the process is owned by you then it's fine, it will be displayed
13:58.25MHSLso it's fine without root
13:58.51kjkoster5489Cool. I don't want to encourage doing simple things as root.
14:01.48kjkoster5489Well, looks like this has become quite a useful post. I find that quite a few people come on this channel with this problem. Now I don't have to do anything but paste the link. :-)
14:02.54kjkoster5489Thanks again for your help MSHL.
14:03.00kjkoster5489MHSL I mean. Sorry.
14:03.11MHSLnp
14:17.53tommy_Hi, is there a simple way of changing the default locale to be used from within  <i18n:bundle baseName="myprop"/> ? I whish to change it for all the <i18n:bundle.... tags on the page.. but I do not whish to add  <i18n:bundle localeRef="lang"/> to all the tags.
14:18.35tommy_from what I could gather from the source code, it reads the pageContext.getRequest().getLocales();
14:23.30*** join/#tomcat keios (n=kayos@122.162.98.199)
14:23.47tommy_or are there more refined ways of letting the user switch locale ?
14:25.11keiosHi I am new to the java world and need to develop an app which will run on IBM Websphere. If I am using Tomcat in my development environment will it pose a problem running that code on web sphere? Will I have to change stuff?
14:25.54kjkoster5489keios: there is stuff that is container-specific and stuff that is not.
14:26.25kjkoster5489You should be all-right in most cases, but make sure you test in websphere regularly.
14:26.32keiosI am doing an app using struts2+hibernate  basically
14:26.34*** join/#tomcat vikumar (n=Vimal@nat/redhat-in/x-0281ce1f2fcf7d35)
14:27.16keioskjkoster5489, The problem is we use debian/ubuntu and websphere doesnt run on it
14:27.24keiosso I cant test
14:28.23kjkoster5489Huh? You get no access to a test box with websphere?
14:28.41keiosNope, that is the problem...
14:29.04kjkoster5489How long between you getting access to a websphere box and this beast going live?
14:29.12keiosso I was wondering if Tomcat and Websphere handle code differently...
14:29.28keioskjkoster5489, probably a few days
14:30.55kjkoster5489Hmm. Are you doing all kind of advanced stuff, or reasonably straightforward JSP with a database.
14:32.00kjkoster5489I'd say get a windows box and run whebspeher on it.
14:32.21kjkoster5489Make sure your dev boxes run Tomcat in a JVM that is the exact same version as your production websphere.
14:33.17keioskjkoster5489, Simple stuff nothing advanced
14:35.34keioskjkoster5489, I think I will try out the windows option, there is a windows box somewhere here...Is it safe to assume that if I develop on Tomcat the stuff is likely to work on Websphere? I will keep testing it...
14:37.59kjkoster5489It is likely to work, but WebSphere is a monster.
14:38.18kjkoster5489The weirdest things are very hard to achieve.
14:38.56kjkoster5489It's a long time since I have worked with it, but I remember we had one guy sitting with the sysadmins full-time to get deployment done.
14:39.13kjkoster5489This was a previous version of WebSphere, mind you. 2005-ish
14:39.56kjkoster5489If you manage to find a machine to test on (say, weekly), you should be fine.
14:40.14kjkoster5489And don't ignore deployment issues until the last week. :-)
14:41.16keioskjkoster5489, thanks mate.
14:41.20*** part/#tomcat keios (n=kayos@122.162.98.199)
14:41.26kjkoster5489np
15:46.02*** join/#tomcat kjkoster5489_ (n=kjkoster@kjkoster.org)
16:00.54*** part/#tomcat notdf_sleep (n=diefool@cpe-67-240-170-227.rochester.res.rr.com)
16:09.43*** join/#tomcat jasonb (n=jasonb@adsl-66-124-73-250.dsl.sntc01.pacbell.net)
16:25.04*** join/#tomcat internat1 (n=nf@123-243-184-161.static.tpgi.com.au)
16:26.25*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
16:26.38*** join/#tomcat pucko (i=andreas@81-234-246-21-o933.tbon.telia.com)
16:27.27*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
16:30.28*** join/#tomcat fyrestrtr (n=Burhan@pdpc/supporter/student/fyrestrtr)
16:30.52*** join/#tomcat ramteid (n=ramteid@85.124.171.254)
16:31.48fyrestrtrOS: Centos / Java: 1.5 / Tomcat 5.5.9 - where do I store struts-config.xml? Can it go in any WEB-INF/ directory under the document root?
16:33.12ramteidfyrestrtr: yes, as long as you reference it correctly within your web.xml (at least for struts 1.x)
16:33.34fyrestrtrramteid: can you please tell me how to do this? As I am missing something here.
16:34.28ramteidfyrestrtr: http://pastebin.org/57553
16:34.37fyrestrtrmy docBase is /home2/work/public_html, and my struts-config.xml is in /home2/work/public_html/testing/WEB-INF and its not being read by Tomcat, web.xml is in /home2/work/public_html/
16:35.18ramteidfyrestrtr:  web.xml should be under WEB-INF
16:35.32fyrestrtryes, sorry its in public_html/WEB-INF
16:36.06ramteidfyrestrtr:  ok, did you reference the struts-config.xml in web.xml (see pastebin link for ex)
16:36.16fyrestrtrhangs his head in shame
16:36.23fyrestrtrI'm very new to this.
16:36.26*** join/#tomcat Dominique (n=Domini@32.155.232.77)
16:36.46ramteidfyrestrtr:  no problem :-) we all were newbies :)
16:37.36fyrestrtrthis is my web.xml ( http://pastebin.org/57556 ), can I just add that (assuming I keep the tags valid) in there?
16:38.48ramteidfyrestrtr:  yes, but just to be sure: you are using struts because there aren't any reference to struts yet
16:39.07fyrestrtro.O
16:39.24fyrestrtryes I am?
16:39.39ramteidfyrestrtr:  maybe take a peek into the struts docs :)
16:39.39fyrestrtr*clears throat* yes, I am.
16:40.35fyrestrtrCan web.xml be in any WEB-INF/ too ?
16:40.42fyrestrtror must that be in the main one.
16:40.56fyrestrtrbecause so far ... as per my notes, my web.xml for the actual struts app is correct.
16:41.18ramteidwould do you mean with "any WEB-INF"?
16:41.46ramteidweb.xml belongs in WEB-INF of any webapp according to the "standard"
16:41.55fyrestrtrah okay
16:42.01fyrestrtrthen I have followup
16:42.06ramteidgo ahead
16:42.16fyrestrtrthe path in the config files, is it filesystem relative or is web relative?
16:42.26ramteidthat depends :)
16:42.28fyrestrtrI mean -- if I put /WEB-INF/struts-config.xml
16:42.31ramteidnormally it's webapp relaitve.
16:42.47ramteidat least struts handles it so
16:43.09fyrestrtris it going to look in mysite.com/WEB-INF/struts-config.xml, or is (wrongfully) going to look in /myapp/WEB-INF/WEB-INF/struts-config.xml
16:43.26ramteidfirst one.
16:43.27fyrestrtrbecause I think that's my problem.
16:43.35fyrestrtroh wait
16:43.41fyrestrtrbangs head on desk
16:43.43fyrestrtrnever mind.
16:43.49ramteidas you say :)
16:43.57fyrestrtrI got it now.
16:44.03ramteidglad to hear that!
16:44.16fyrestrtrin my web.xml, I have <param-value>/WEB-INF/struts-config.xml</param-value>
16:44.22ramteidlooks good.
16:44.32fyrestrtrthis is the web.xml in /home2/work/public_html/testing/WEB-INF/
16:44.39ramteidok
16:44.47fyrestrtrbut there is no struts-config.xml in /home2/work/public_html/WEB-INF
16:44.58ramteidok, maybe you should create it...
16:45.08ramteidat least if you want to use struts...
16:45.26fyrestrtrif I change the param-value to just 'struts-config.xml', it should read it from the same directory as the web.xml, right?
16:45.32ramteidright.
16:45.38fyrestrtr:D
16:45.39ramteidno, sorry.
16:45.44fyrestrtr:(
16:45.48ramteidit wold try it from one directory above. i assume.
16:46.11fyrestrtrin /home2/work/public_html/WEB-INF/ are the settings for an app that doesn't use struts.
16:46.19ramteidhuch!
16:46.28fyrestrtrin /home2/work/public_html/testing/WEB-INF/ are the settings for the app that does use struts
16:46.43ramteidI think you make your life really hard there....
16:46.57fyrestrtrwhen I try any mapped action, I get the 400 error, which I figured out means that tomcat can't find my struts-config.xml file
16:47.01ramteidwhy is there a webapp in public_html ?
16:47.23ramteidshould that be "ROOT" ?
16:47.24fyrestrtrbecause I was working on one there, and then I decided to test something with struts.
16:47.49fyrestrtryes, when I go to my site (www.domain.com), it loads the non-struts app from public_html "ROOT"
16:47.51ramteidwell, I propose to put the webapp in public_html in it's dedicated directory.... parallel to testing.
16:48.04ramteidah... docBase....
16:48.12fyrestrtrthe docBase points to it.
16:48.18ramteidi think "testing" is misplaced in that directory.
16:48.24ramteidhang on a sec
16:49.05ramteidyes, testing is misplaced
16:49.16ramteidI assume that it isn't even recognized as a webapp
16:49.22fyrestrtrwell...
16:49.23ramteidsince it's nested within another webvapp
16:49.28fyrestrtrsome of it works.
16:49.34ramteidoh
16:49.38fyrestrtrso you can't have nested apps?
16:49.42fyrestrtrmaybe this is what I'm missing.
16:49.44ramteidnever done that.
16:49.51ramteidand not sure if this works...
16:50.06ramteidwell, you can nest "ROOT" and other webapps
16:50.19ramteidbut if you can nest "X" under "Y" I'm not sure never done that
16:50.21ramteidor needed it
16:50.34fyrestrtrpublic_html is my root
16:50.41fyrestrtras that's where docBase points to.
16:50.58ramteidok.
16:51.05fyrestrtrand there is already an application running there, which I didn't code.
16:51.13ramteidok...
16:51.18ramteidwhich is nested it assume?
16:51.37fyrestrtrI was given FTP access to the server, to upload my app for testing on the same machine; so I just created a new directory 'testing' and uploaded all my files there, including the WEB-INF directory.
16:51.49fyrestrtrnow, the problem is that none of my struts mappings work.
16:51.57fyrestrtrand they all give 400 errors.
16:51.59ramteidI see.
16:52.14ramteidI still think that the problem is that you can't have a webapp below another webapp
16:52.25ramteidwhich means docBase can only hold *one* and only *one* webapp
16:52.30fyrestrtr'HTTP Status 400 - Invalid path /testing/ProgramsAction was requested'
16:52.43ramteidyes, because the "ROOT" webapp doesn't know anyhting of testing
16:52.53ramteid(that one which resided in public_html)
16:53.07fyrestrtrramteid: so, if I take my WEB-INF and merge it with the 'ROOT' WEB-INF, will that solve my problem?
16:53.07ramteidi assume you can't host several webapps there currently.
16:53.16ramteidI assume so
16:53.23fyrestrtrI'll try it.
16:53.27ramteidbut you have to move all files one directory up (JSPs, etc.
16:53.28fyrestrtrmakes backups first
16:53.32ramteidvery good idea
16:53.49fyrestrtrwhy do I have to move all files up?
16:54.08fyrestrtrshouldn't struts map the actions to the classes?
16:54.11ramteidhmm, good question... depends on the structure of your application
16:54.24ramteidsure, struts will do the mapping
16:54.35fyrestrtrbut as a final answer -- is it not possible to have nested webapps?
16:54.36ramteidbut any lib in testing/WEB-INF/lib must be placed in WEB-INF/lib
16:54.50ramteidAs far as I know it's not possible.
16:55.02fyrestrtryes, my plan is to move testing/WEB-INF/* one dir up ( ../ )
16:55.05ramteid(at least I don't know of any way to do it in tomcat... besides ROOT of course)
16:55.21fyrestrtrhrmm, this is something to google.
16:55.49ramteidmy search failed... but maybe you have more luck ;-)
16:56.03ramteidbut I never read of one doing nested webapps....
16:56.48fyrestrtrmy search led me all kinds of lovely xml reference "can nest tags" :(
16:57.52ramteidI see.
16:58.08ramteidah... i think the trick is to use contextpathes
16:58.14ramteidbut you can't nested within the same webapp
16:58.35ramteid(= the same webapp "deployment" or directory that is)
16:59.19ramteidbut on the other hand I never needed to do such "strange" thing
16:59.39fyrestrtryes, I'm always the one "volunteered" for the strange stuff.
16:59.45fyrestrtr"Oh yeah, he'll know what to do."
16:59.52fyrestrtrme = O.O
16:59.58ramteidROTFL.
17:00.30ramteidwell, on the other hand you learn a lot of things...
17:00.37fyrestrtrthis is true.
17:00.42kjkoster5489You cannot nest webapps.
17:00.49fyrestrtr#1 thing being, don't freakin' open your mouth at work.
17:00.59ramteidkjkoster5489:  thx for the confirmation
17:01.03kjkoster5489You have to give each a directory. Only ROOT is special.
17:01.04fyrestrtrlest you get stuck in "Intersting land"
17:01.41fyrestrtrkjkoster5489: but can you have, in the same ROOT (which I am assuming here is equal to docBase) an app that uses struts, and one that doesn't ?
17:02.01fyrestrtrwell let me phrase that
17:02.07fyrestrtr"code" that uses struts
17:02.10ramteidfyrestrtr: as long as both apps don't interfere
17:02.11fyrestrtrsince there is only one app.
17:02.26fyrestrtrlike -- both try to map the same action?
17:02.30fyrestrtror something silly like that?
17:02.34ramteidfyrestrtr: correctly, that would break
17:02.56ramteidfyrestrtr:  but with struts you can do more or less "nested" struts applications
17:03.08fyrestrtryes -- mapping ftw :)
17:03.35fyrestrtrwhich is why I like struts (and other nifty frameworks that provide similar hooks -- like django for example)
17:03.54ramteidyeah, there are some nice frameworks......
17:05.19fyrestrtrthanks for your help
17:05.51ramteidyou're welcome!
17:06.06Slimerramteid: I don't suppose you know anything about Valves and authentication, eh?
17:06.37ramteidslimer: hmm, I propose to ask your question and we will see
17:06.57SlimerBasically, I'm having an org.apache.catalina.authenticator.FormAuthenticator Valve problem. Stated simply, adding the Valve does not provoke an error, but it seems to both suppress logging at the org.apache.catalina.authenticator level *and* not actually work [ I am trying to change the cache property to false ].
17:07.30Slimertomcat 5.5.23, centos 5.0 and the java that comes with it.
17:07.58ramteidSlimer: well, you got me really on the wrong foot :-(
17:08.02Slimerhah
17:08.53SlimerI followed the docs to the letter. :-()
17:09.44kjkoster5489fyrestrtr: each webapp is free to sue struts r not.
17:09.59fyrestrtrsue, eh? I'd like that.
17:10.18ramteidSlimer:  maybe tuning conf/logging.properties could help you?
17:10.29ramteidSlimer:  turning up all logging....
17:10.43ramteidslimer: i never use authenticator value myself yet :(
17:10.49kjkoster5489fyrestrtr: each webapp needs its own WEB-INF/web.xml and WEB-INF/lib and/or WEB-INF/classes.
17:11.01kjkoster5489See how the webapps dir of Tomcat is formed. that's how it's done.
17:11.18Slimerramteid: Actually, I had (using log4j) the logging set to DEBUG.
17:11.22kjkoster5489Each webapp gets its own classloader, so you can have different apps use differetn version of struct.
17:11.24kjkoster5489structs.
17:11.43Slimerramteid: And I could see logging from org.apache.catalina.[authenticator,session,a bunch of others]
17:11.55ramteidSlimer:  ok,  I see.
17:12.11fyrestrtrkjkoster5489: can you deploy more than one webapp, in one docbase?
17:12.17ramteidSlimer:  just to be sure you enabled form auth in your web.xml
17:12.25Slimerramteid: Adding:  <Valve classname="org.apache.catalina.authenticator.FormAuthenticator" /> (with or without a debug="false" attribute) would seemingly suppress *all* .authenticator logging.
17:12.38ramteidSlimer:  sounds bad.
17:12.39Slimerramteid: Oh, this is with a totally working app with form auth.
17:13.04Slimerramteid: All I really want to do is set the cache property to false. BTW, my previous statemtn about debug="false" should have been cache="false".
17:13.27Slimerramteid: I've been over the source and I can't figure out why this seems to happen.
17:15.18ramteidSlimer: ok, shame on me that I don't really have the answer :(
17:15.43Slimerramteid: I don't suppose you have an app that uses form auth, eh?
17:15.57ramteidSlimer:  I can't recally any to be honest
17:16.00fyrestrtrkjkoster5489: I don't understand what is the relationship between docBase and a webapp, can you have more than one webapp in a docbase?
17:16.09ramteidSlimer:  as strange as it may sound
17:16.13Slimerramteid: I was hoping somebody else could try this. If it works (or doesn't work) for them, it might be a more involved problem.
17:17.01ramteidSlimer:  well I assume that the valve works in general.
17:17.01Slimerramteid: Nah, s'ok. I'm a python developer after abandoning java and perl almost a decade ago, and I've been put in a position I care not for.
17:17.46Slimerramteid: Yeah, me too. Lots of people obviously use it successfully.
17:25.11Slimerramteid: If there is activity in this channel later, I'll try again maybe.  Thanks for trying anyhow.
17:27.00ramteidSlimer:  u're welcome
17:45.06kjkoster5489fyrestrtr: no, you cannot. Each webapp has its own docbase
17:45.08kjkoster5489.
17:45.47fyrestrtrkjkoster5489: so for tomcat's webapps folder, there is a separate docBase entry for each directory in there?
17:51.46kjkoster5489Yes, they are auto-generated based on the webapp directory name.
17:52.18kjkoster5489So the docbase for /examples is /examples on the outside and ${TOMCAT}/webapps/examples on the inside.
17:52.41kjkoster5489ROOT is called / on the outside, and $TOMCAT/webapps/ROOT on the inside.
18:01.53fyrestrtrhrmm
18:02.49fyrestrtrso if I have ROOT (ie / ) in public_html and public_html is an app that doesn't use struts -- but then I have public_html/bar that needs struts, and it has is own struts config stuff in WEB-INF, I need to create a new docbase entry for it?
18:03.00fyrestrtrand call it /bar ?
18:03.19kjkoster5489For example, yes.
18:03.31fyrestrtraye yaye :(
18:03.38fyrestrtrwhat if you don't have access to server.xml
18:03.41fyrestrtrhow do you do that?
18:03.55ramteidfyrestrtr: than you're f*cked up...
18:04.02fyrestrtrin more ways than one.
18:04.05kjkoster5489And tell Tomcat about it in some way, either becasue Tomcat finds it in /webapps, or by creating a conf/Catalina/localhost/bar.xml
18:04.17kjkoster5489So You are using a hosted tomcat?
18:04.23fyrestrtryes, unfortunately
18:09.04kjkoster5489Ask your hoster about this then. I'm sure they can fit you with another webapp.
18:14.36*** join/#tomcat pfn (n=pfnguyen@hanhuy.com)
18:18.30*** join/#tomcat bindaas (n=bindaas@59.94.102.250)
18:26.17*** join/#tomcat DDeRousseau (n=Domini@32.159.194.78)
18:29.13*** join/#tomcat rjb (n=rjb@cpe-071-077-036-211.nc.res.rr.com)
18:35.08rjbhi all. anybody have time to look @ a jndi resource problem i'm having under 5.5.25 w/ postgres?
18:36.06rjb<PROTECTED>
18:36.07rjb<PROTECTED>
18:36.07rjb<PROTECTED>
18:36.07rjb<PROTECTED>
18:36.07rjb<PROTECTED>
18:36.07rjb<PROTECTED>
18:37.02rjbwhen i access the data source, it complains that database xadm doesn't exist; can't figure out why it's using the user id, rather than the database...
18:43.16kjkoster5489What's the precise error message?
18:43.32kjkoster5489Are you sure there are no old (wrong) versions of the file floating around?
18:43.54ramteidjdbc:postgresql://199.199.199.199/test
18:44.01ramteidI assume that the connection string is broken
18:44.06ramteidexample per doc above
18:44.26rjbsame connect string works in a standalone java program
18:44.28*** join/#tomcat da_krowa (n=Miranda@chello089077099221.chello.pl)
18:44.46ramteidok, but maybe give it a try?
18:44.55rjbtring now :)
18:49.40rjbsame symptom; exact message: Connection Pool failure: Cannot create PoolableConnectionFactory (FATAL: database "xadm" does not exist)
18:51.00kjkoster5489Try changing the user name to 'foo' to see if changes are picked up.
18:51.48rjbexactly right; changing the userid to postgres results in FATAL: database "postgres" does not exist
18:52.23kjkoster5489dang
18:52.52kjkoster5489I think the database name needs a /, not a : in front of it
18:53.52rjbjust like ramteid suggested (?) ; same results.
18:54.50kjkoster5489dang again
18:55.15rjbtell me about. i've been staring at this all day :(
18:55.58ramteidrjb: can you paste the current config again plz?
18:56.07kjkoster5489And the one in the Java program.
18:56.45rjb<PROTECTED>
18:56.46rjb<PROTECTED>
18:56.46rjb<PROTECTED>
18:56.46rjb<PROTECTED>
18:56.46rjb<PROTECTED>
18:56.46rjb<PROTECTED>
18:58.27rjbfrom java:
18:58.47rjb<PROTECTED>
18:58.47rjb<PROTECTED>
18:58.48rjb<PROTECTED>
18:58.48rjb<PROTECTED>
18:58.48rjb<PROTECTED>
18:58.48rjb<PROTECTED>
18:58.50rjb<PROTECTED>
18:58.52rjb<PROTECTED>
18:59.24ramteidrjb: I'm not sure if username and password are mandatory, but there's an alternative syntax for the URL: jdbc:postgresql://localhost/test?user=fred&password=secret
18:59.35ramteidrjb:  maybe give it a try
18:59.55rjbhad tried that with the port #; no change. will try w/o.
19:00.32ramteidwhich version of the driver are u using?
19:01.12rjb8.2.-504
19:02.15ramteidok, maybe try build 508...
19:03.06rjbok; but this only happens w/i tomcat (?)
19:03.23ramteidseems so. it looks like the info isn't set correctly... but maybe it's not postgresql driver but tomcat connection pool
19:03.41ramteidi looked in my config for mysql and that one looks like yours...
19:03.47ramteidso I'm not sure why this breaks :(
19:04.02ramteidunfortunately no JNDI with postgresql under tomcat :(
19:04.15rjbok, i was hoping it was something obvious that i missed because i've been staring at it for so long.
19:04.29rjbappreciate your taking the time to look; thanks very much.
19:04.33ramteidnot for my eyes :-(
19:05.03kjkoster5489I'm stumped too.
19:06.02rjbk. if i figure it out, i'll be sure to share
19:06.08rjbthanks again
19:06.18ramteidrjb: you're welcome, according to http://www.anders.com/projects/sysadmin/tomcat.html it looks fine
19:06.40ramteidrjb: so there must be some stange issue...
19:07.07ramteidrjb: well, if you're hardcore attach a debugger to tomcat and look what it is doing...
19:07.15ramteidrjb: or peek into the source... :)
19:07.27ramteidrjb: but maybe reasing the debug level helps?
19:07.34rjbyeah. not my day job, but i don't see an alternative.
19:08.52kjkoster5489uhmm..
19:09.08kjkoster5489... or use p6spy?
19:11.28kjkoster5489actually, that would not help.
19:21.57*** join/#tomcat p_masho (n=mash@84-45-225-28.no-dns-yet.enta.net)
19:26.23*** join/#tomcat ghostwalker (n=rhonabwy@dslb-084-057-057-198.pools.arcor-ip.net)
19:51.47*** join/#tomcat vanksi (n=vanksi@stekt2.oulu.fi)
20:18.16*** join/#tomcat vinse (n=vinse_@208.253.223.146)
20:19.57*** join/#tomcat r0bby (n=wakawaka@guifications/user/r0bby)
20:36.20*** part/#tomcat bindaas (n=bindaas@59.94.102.250)
22:00.58*** join/#tomcat Dwayne_Hicks (n=Muscles_@209-20-66-179.slicehost.net)
22:34.20*** join/#tomcat jasonb (n=jasonb@adsl-66-124-73-250.dsl.sntc01.pacbell.net)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.