00:14.43 | *** join/#tomcat lmartin92__ (n=lmartin9@adsl-227-55-180.jan.bellsouth.net) |
00:17.14 | lmartin92__ | 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.09 | MHSL | lmartin92__, did you check with netstat whether tomcat is really running? |
00:51.32 | lmartin92__ | tail -f ../logs/catalina.out; that's how I check |
01:13.52 | MHSL | lmartin92__, try to check with netstat whether tomcat is listening on 8080 |
01:14.15 | lmartin92__ | how check with netstat? |
01:15.20 | lmartin92__ | Tomcat 5.5.1 Xubuntu Hardy Java from Sun at 1.1.5 |
01:15.26 | lmartin92__ | 1.5.1* |
01:19.35 | MHSL | lmartin92__, type netstat -an | grep 800 |
01:19.38 | MHSL | lmartin92__, type netstat -an | grep 8080 |
01:20.26 | lmartin92__ | ok, now we just have to wait till I reinstall it again, (keep on trying) |
01:25.11 | MHSL | lmartin92__, where did you get tomcat? |
01:26.25 | lmartin92__ | liferay |
01:26.35 | lmartin92__ | siwtching to 6.0.* soon |
01:26.41 | MHSL | ic |
01:27.26 | lmartin92__ | what, does liferay tomcat have problems or something? |
01:29.28 | MHSL | ? |
01:29.37 | MHSL | i dont know, i never use lifearay |
01:29.44 | MHSL | liferay* |
01:30.11 | lmartin92__ | when you said ic, i thought you meant something along the lines of "ic, liferay is crap" |
01:31.11 | MHSL | oh, no, i never use it, so i'm not familiar with it |
01:32.02 | lmartin92__ | ok |
01:32.23 | lmartin92__ | 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.36 | lmartin92__ | 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.53 | McKillaGorilla | hello everyone |
04:08.30 | McKillaGorilla | Hello, I'm having a problem running Tomcat 5.5 on Windows Vista, I have Java 1.6 installed |
04:08.54 | McKillaGorilla | When I first download & install Tomcat it asks me if I want to run it, which I say yes to |
04:08.57 | McKillaGorilla | and it works fine |
04:09.14 | McKillaGorilla | it appears in my Windows tray, and I can stop and start it and run my own servlets, etc |
04:09.58 | McKillaGorilla | But when I exit that application and try to then run the Tomcat5 program from Windows Explorer all hell breaks loose |
04:10.56 | McKillaGorilla | I get an IOException saying it "Cannot rename original file to C:.../tomcat-users.xml.old |
04:11.09 | McKillaGorilla | and basically tomcat hangs and doesn't work |
04:11.20 | McKillaGorilla | any ideas what I'm doing wrong? |
04:32.42 | MHSL | McKillaGorilla, run the Tomcat5 program from Windows Explorer -> what do you mean by this? |
04:32.54 | MHSL | McKillaGorilla, you mean tomcat5.exe? |
04:34.02 | MHSL | McKillaGorilla, just run startup.bat or shutdown.bat to startup or shutdown respectively |
04:40.33 | McKillaGorilla | yes, tomcat5.exe, i don't have startup.bat or shutdown.bat files in my bin directory |
04:41.33 | McKillaGorilla | with my Tomcat 5.5 installation I only have 5 files in my bin directory: |
04:42.02 | McKillaGorilla | bootstrap.jar, commons-logging...jar, tomcat-juli.jar, tomcat5.exe, and tomcat5w.exe |
04:43.14 | McKillaGorilla | Also, on my start menu, when I installed it put a Tomcat5 Menu Item that has "Configure Tomcat" and "Monitor Tomcat" program options |
04:43.36 | McKillaGorilla | but for both, when I select them I get "Access is denied. Unable to open the service Tomcat5" |
04:44.24 | MHSL | not sure, i never use the installer version, i always use the .tar.gz or .zip version |
04:44.28 | McKillaGorilla | I 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.46 | MHSL | there are also such files in tomcat 5.5 |
04:45.01 | McKillaGorilla | maybe it's a difference of the installer versus the zip |
04:45.06 | McKillaGorilla | i guess i'll try the zip |
04:45.14 | McKillaGorilla | thanks for the help |
04:52.19 | McKillaGorilla | HI, MHSL? |
04:52.36 | McKillaGorilla | I got the same error as before running from the startup batch file |
05:01.29 | MHSL | what error? |
05:02.13 | MHSL | McKillaGorilla, this "Access is denied. Unable to open the service Tomcat5"? |
05:02.48 | McKillaGorilla | no, the batch file starts tomcat, but then it just gets an IOException and hangs |
05:03.30 | MHSL | McKillaGorilla, this "Cannot rename original file to C:.../tomcat-users.xml.old? |
05:03.54 | MHSL | McKillaGorilla, do you have tomcat-users.xml under tomcat conf directory? |
05:04.09 | McKillaGorilla | yes |
05:04.21 | MHSL | McKillaGorilla, then do you have this tomcat-users.xml.old? |
05:04.24 | McKillaGorilla | well, not the old one |
05:04.31 | McKillaGorilla | just tomcat.users.xml |
05:04.40 | MHSL | it's supposed to be tomcat-users.xml not tomcat.users.xm |
05:04.42 | MHSL | l |
05:05.07 | McKillaGorilla | sorry, typo |
05:05.13 | McKillaGorilla | it's tomcat-users.xml |
05:05.29 | MHSL | McKillaGorilla, what's the reason it cannot rename? file does not exist or something? |
05:05.31 | McKillaGorilla | but it looks like tomcat is trying to rename it |
05:05.39 | McKillaGorilla | a long stack trace one sec |
05:05.44 | MHSL | use pastebin |
05:05.53 | MHSL | just want to see the top part |
05:05.58 | McKillaGorilla | it says "No UserDatabase component found under key UserDatabase |
05:06.15 | MHSL | ok so that's the problem, not tomcat-users.xml |
05:06.17 | McKillaGorilla | at org.apache.catalina.realm.UserDatabaseRealm.start(... |
05:06.51 | MHSL | McKillaGorilla, did you change anything on your server.xml? |
05:06.59 | McKillaGorilla | no |
05:07.02 | MHSL | McKillaGorilla, open your server.xml and find Resource name="UserDatabase" |
05:07.07 | McKillaGorilla | just unzipped and tried running startup |
05:07.13 | McKillaGorilla | ok |
05:07.14 | MHSL | what's the pathname |
05:08.55 | McKillaGorilla | conf/tomcat-users.xml |
05:09.10 | MHSL | hm ic |
05:09.38 | MHSL | McKillaGorilla, the name is UserDatabase right? |
05:10.02 | McKillaGorilla | Resource name="UserDatabase" |
05:10.11 | McKillaGorilla | for that pathname |
05:10.45 | MHSL | McKillaGorilla, 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.27 | McKillaGorilla | i downloaded to my desktop and then extracted to the "Apache Software Foundation" directory (I use Ant there) |
05:11.44 | McKillaGorilla | so i didn't copy anything after that |
05:11.51 | MHSL | what did you use ant for? |
05:12.15 | McKillaGorilla | for managing some projects and stuff with JUnit |
05:12.24 | MHSL | ok |
05:12.30 | McKillaGorilla | but i haven't touched it this week |
05:12.41 | MHSL | it doesnt change any tomcat config right? |
05:12.46 | McKillaGorilla | no |
05:13.07 | McKillaGorilla | i've never mixed the two on this machine, it's fairly new |
05:13.39 | McKillaGorilla | this 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.41 | MHSL | this doesnt make sense you've got Resource with name UserDatabase, but the Realm cannot find it for some reason |
05:14.24 | McKillaGorilla | hmm |
05:14.27 | McKillaGorilla | i think i have an idea |
05:14.39 | MHSL | does your Resource UserDatabase put under GlobalNamingResources? |
05:14.47 | McKillaGorilla | i tried "startup.bat > output.txt" and it said "Access is denied" |
05:14.57 | McKillaGorilla | i think the denied access is to the directory |
05:15.01 | MHSL | anything on the log? |
05:15.14 | McKillaGorilla | i think Vista is preventing Tomcat from writing to the directory |
05:15.29 | MHSL | McKillaGorilla, as you said above, you extracted tomcat zip file to a directory, hence the directory structure is still the same right? |
05:15.42 | McKillaGorilla | yes |
05:15.46 | MHSL | can you check the log |
05:15.57 | MHSL | anything on log |
05:16.04 | McKillaGorilla | which directory? |
05:16.04 | MHSL | ? |
05:16.22 | MHSL | tomcat log... |
05:16.41 | McKillaGorilla | which directory is that file in? |
05:16.53 | MHSL | do you know where tomcat stores its log files by default? |
05:17.19 | McKillaGorilla | i would assume the "log" directory, but mine's empty |
05:17.26 | McKillaGorilla | logs, rather |
05:17.45 | McKillaGorilla | i have a "logs" directory, but no files there |
05:18.02 | MHSL | McKillaGorilla, 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.44 | McKillaGorilla | yes, access denied came first, the other part wasn't even reached, but it only happened with i did a "> output.txt" |
05:19.00 | McKillaGorilla | like "startup > output.txt" |
05:19.18 | McKillaGorilla | that's why i think it might be vista enforcing permissions ore something |
05:19.21 | McKillaGorilla | even on tomcat |
05:20.03 | McKillaGorilla | hmm guess what |
05:20.16 | McKillaGorilla | i just looked at the permissions on the bin folder |
05:20.26 | McKillaGorilla | and it says i only have Read-Only access |
05:20.33 | McKillaGorilla | so i changed it |
05:20.37 | MHSL | check the conf dir as well |
05:20.38 | McKillaGorilla | and then i looked again |
05:20.44 | McKillaGorilla | and it says it didn't change |
05:20.52 | McKillaGorilla | in other words Vista isn't letting me change it |
05:20.53 | MHSL | if this is vista problem, then i cant really help you |
05:21.01 | McKillaGorilla | even though i'm expressly telling it |
05:21.06 | McKillaGorilla | ya it might be a vista problem |
05:21.13 | McKillaGorilla | i'll have to figure that out |
05:21.18 | McKillaGorilla | thanks for the help |
05:45.09 | McKillaGorilla | i got it |
05:45.29 | McKillaGorilla | had to change access permissions in Vista |
05:45.35 | McKillaGorilla | thanks 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.01 | lmartin92__ | 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.23 | MHSL | lmartin92__, is that process tomcat? |
10:39.59 | lmartin92__ | 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.43 | MHSL | lmartin92__, you can list the pid, then you can check with ps |
10:43.07 | MHSL | then try to access http://localhost:8080 |
10:43.20 | lmartin92__ | I did, still not working |
10:43.28 | lmartin92__ | I'll send you a pastie of my catalina.out |
10:44.16 | lmartin92__ | http://pastie.textmate.org/241945 |
10:45.21 | MHSL | lmartin92__, dont you see the bindexception on the log? |
10:45.30 | MHSL | this means that the port has been used |
10:45.46 | lmartin92__ | I always used tail so I never saw the whole log |
10:45.55 | MHSL | ... |
10:46.10 | lmartin92__ | ok, I shutdown the listener |
10:46.11 | MHSL | use tail -f and leave it running |
10:46.26 | lmartin92__ | and now I'm going to try and bring it back up |
10:49.05 | lmartin92__ | what could be using my 8080 port? |
10:49.12 | lmartin92__ | and how would I kill it |
10:50.44 | kjkoster5489 | sockstat/lsof/netstat will tell you. |
10:51.00 | kjkoster5489 | Otherwise just move Tomcat to port 8090 or something. |
10:51.09 | kjkoster5489 | Or use ps/top to find all Tomcat processes. |
10:51.33 | kjkoster5489 | Or surf to 8080 and see what is listening there. |
10:51.41 | MHSL | lmartin92__, 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.02 | lmartin92__ | ok |
10:52.10 | kjkoster5489 | Use Firefox live http headers to check the headers in responses That will tell you about what application server is serving 8080. |
10:52.40 | lmartin92__ | well, I make connect to 8080 and it fails to do anything but forever load and never show content |
10:52.46 | lmartin92__ | I'll try 8081 this time |
10:58.29 | lmartin92__ | hey hey, thanks |
10:58.33 | lmartin92__ | it works |
10:59.06 | lmartin92__ | 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.59 | kjkoster5489 | MHSL: On Linux, what is the precise command line for netstat to find the pid of a process on port 8080? |
12:15.13 | MHSL | -p |
12:15.18 | MHSL | that will give you the pid column |
12:19.00 | kjkoster5489 | Hmm. Darwin does not have that. |
12:19.24 | kjkoster5489 | Nor does FreeBSD. |
12:21.22 | kjkoster5489 | Thanks, now I have the list for most mainstream os-es. |
12:21.42 | kjkoster5489 | netstat -anp | grep 8080 |
12:23.45 | kjkoster5489 | Hmm. netstat -lnp would omit a lot of unnecessary lookups. |
12:24.02 | kjkoster5489 | MHSL what precise options to you use to find a process listening on 8080? |
12:24.15 | kjkoster5489 | Sorry to bother you, but I have no Linux box to test. |
12:24.37 | MHSL | using the -p i mentioned above |
12:24.44 | MHSL | just refer to the man page |
12:25.07 | MHSL | of netstat |
12:31.42 | *** join/#tomcat magentar (n=magentar@213-10.206-83.static-ip.oleane.fr) |
13:24.35 | kjkoster5489 | MHSL, 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.39 | MHSL | kjkoster5489, On Linux the command is (probably, I have no Linux box to test on) -> you can do man netstat on google |
13:27.08 | kjkoster5489 | I know, but I wanted to include output like I did for FreeBSD and OS X. |
13:27.17 | kjkoster5489 | Could you help me by making it for me? |
13:30.20 | kjkoster5489 | Just 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.23 | MHSL | something like this tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 1501/jsvc.exec |
13:30.33 | kjkoster5489 | Icol |
13:30.34 | MHSL | columns: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name |
13:30.46 | kjkoster5489 | cool, I mean. |
13:31.14 | kjkoster5489 | And ps is also 'ps -wwp 1501'? |
13:31.21 | kjkoster5489 | What does that look like? |
13:33.33 | MHSL | can use ps -fp PID |
13:34.03 | kjkoster5489 | Could you paste the output for an actual Tomcat server please? |
13:34.07 | MHSL | UID PID PPID C STIME TTY TIME CMD |
13:34.13 | MHSL | tomcat 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.16 | MHSL | something like that |
13:34.18 | kjkoster5489 | Do you have a blog that I can refer to when I mention your name? |
13:36.02 | MHSL | dont forget to match the pid ^ |
13:40.21 | kjkoster5489 | I have changed the code. |
13:40.53 | kjkoster5489 | I refer to you as "MHSL on FreeNode's IRC channel #tomcat", which I can change to something else if you like. |
13:41.01 | kjkoster5489 | Thanks for your help. |
13:41.31 | MHSL | for windows: netstat -ano |
13:41.51 | MHSL | ok that's fine |
13:42.31 | MHSL | Proto Local Address Foreign Address State PID |
13:42.37 | MHSL | TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 800 |
13:44.01 | MHSL | btw the linux netstat command was netstat -anp | grep 8080 |
13:44.19 | MHSL | otherwise you wont get it |
13:44.52 | MHSL | for windows: http://searchsecuritychannel.techtarget.com/tip/0,289483,sid97_gci1275209,00.html |
13:48.08 | MHSL | another thing, on linux you must be root to perform netstat with -p |
13:53.30 | kjkoster5489 | MHSL: 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.10 | MHSL | kjkoster5489, ok if the process is owned by you then it's fine, it will be displayed |
13:58.25 | MHSL | so it's fine without root |
13:58.51 | kjkoster5489 | Cool. I don't want to encourage doing simple things as root. |
14:01.48 | kjkoster5489 | Well, 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.54 | kjkoster5489 | Thanks again for your help MSHL. |
14:03.00 | kjkoster5489 | MHSL I mean. Sorry. |
14:03.11 | MHSL | np |
14:17.53 | tommy_ | 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.35 | tommy_ | 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.47 | tommy_ | or are there more refined ways of letting the user switch locale ? |
14:25.11 | keios | Hi 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.54 | kjkoster5489 | keios: there is stuff that is container-specific and stuff that is not. |
14:26.25 | kjkoster5489 | You should be all-right in most cases, but make sure you test in websphere regularly. |
14:26.32 | keios | I am doing an app using struts2+hibernate basically |
14:26.34 | *** join/#tomcat vikumar (n=Vimal@nat/redhat-in/x-0281ce1f2fcf7d35) |
14:27.16 | keios | kjkoster5489, The problem is we use debian/ubuntu and websphere doesnt run on it |
14:27.24 | keios | so I cant test |
14:28.23 | kjkoster5489 | Huh? You get no access to a test box with websphere? |
14:28.41 | keios | Nope, that is the problem... |
14:29.04 | kjkoster5489 | How long between you getting access to a websphere box and this beast going live? |
14:29.12 | keios | so I was wondering if Tomcat and Websphere handle code differently... |
14:29.28 | keios | kjkoster5489, probably a few days |
14:30.55 | kjkoster5489 | Hmm. Are you doing all kind of advanced stuff, or reasonably straightforward JSP with a database. |
14:32.00 | kjkoster5489 | I'd say get a windows box and run whebspeher on it. |
14:32.21 | kjkoster5489 | Make sure your dev boxes run Tomcat in a JVM that is the exact same version as your production websphere. |
14:33.17 | keios | kjkoster5489, Simple stuff nothing advanced |
14:35.34 | keios | kjkoster5489, 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.59 | kjkoster5489 | It is likely to work, but WebSphere is a monster. |
14:38.18 | kjkoster5489 | The weirdest things are very hard to achieve. |
14:38.56 | kjkoster5489 | It'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.13 | kjkoster5489 | This was a previous version of WebSphere, mind you. 2005-ish |
14:39.56 | kjkoster5489 | If you manage to find a machine to test on (say, weekly), you should be fine. |
14:40.14 | kjkoster5489 | And don't ignore deployment issues until the last week. :-) |
14:41.16 | keios | kjkoster5489, thanks mate. |
14:41.20 | *** part/#tomcat keios (n=kayos@122.162.98.199) |
14:41.26 | kjkoster5489 | np |
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.48 | fyrestrtr | OS: 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.12 | ramteid | fyrestrtr: yes, as long as you reference it correctly within your web.xml (at least for struts 1.x) |
16:33.34 | fyrestrtr | ramteid: can you please tell me how to do this? As I am missing something here. |
16:34.28 | ramteid | fyrestrtr: http://pastebin.org/57553 |
16:34.37 | fyrestrtr | my 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.18 | ramteid | fyrestrtr: web.xml should be under WEB-INF |
16:35.32 | fyrestrtr | yes, sorry its in public_html/WEB-INF |
16:36.06 | ramteid | fyrestrtr: ok, did you reference the struts-config.xml in web.xml (see pastebin link for ex) |
16:36.16 | fyrestrtr | hangs his head in shame |
16:36.23 | fyrestrtr | I'm very new to this. |
16:36.26 | *** join/#tomcat Dominique (n=Domini@32.155.232.77) |
16:36.46 | ramteid | fyrestrtr: no problem :-) we all were newbies :) |
16:37.36 | fyrestrtr | this is my web.xml ( http://pastebin.org/57556 ), can I just add that (assuming I keep the tags valid) in there? |
16:38.48 | ramteid | fyrestrtr: yes, but just to be sure: you are using struts because there aren't any reference to struts yet |
16:39.07 | fyrestrtr | o.O |
16:39.24 | fyrestrtr | yes I am? |
16:39.39 | ramteid | fyrestrtr: maybe take a peek into the struts docs :) |
16:39.39 | fyrestrtr | *clears throat* yes, I am. |
16:40.35 | fyrestrtr | Can web.xml be in any WEB-INF/ too ? |
16:40.42 | fyrestrtr | or must that be in the main one. |
16:40.56 | fyrestrtr | because so far ... as per my notes, my web.xml for the actual struts app is correct. |
16:41.18 | ramteid | would do you mean with "any WEB-INF"? |
16:41.46 | ramteid | web.xml belongs in WEB-INF of any webapp according to the "standard" |
16:41.55 | fyrestrtr | ah okay |
16:42.01 | fyrestrtr | then I have followup |
16:42.06 | ramteid | go ahead |
16:42.16 | fyrestrtr | the path in the config files, is it filesystem relative or is web relative? |
16:42.26 | ramteid | that depends :) |
16:42.28 | fyrestrtr | I mean -- if I put /WEB-INF/struts-config.xml |
16:42.31 | ramteid | normally it's webapp relaitve. |
16:42.47 | ramteid | at least struts handles it so |
16:43.09 | fyrestrtr | is 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.26 | ramteid | first one. |
16:43.27 | fyrestrtr | because I think that's my problem. |
16:43.35 | fyrestrtr | oh wait |
16:43.41 | fyrestrtr | bangs head on desk |
16:43.43 | fyrestrtr | never mind. |
16:43.49 | ramteid | as you say :) |
16:43.57 | fyrestrtr | I got it now. |
16:44.03 | ramteid | glad to hear that! |
16:44.16 | fyrestrtr | in my web.xml, I have <param-value>/WEB-INF/struts-config.xml</param-value> |
16:44.22 | ramteid | looks good. |
16:44.32 | fyrestrtr | this is the web.xml in /home2/work/public_html/testing/WEB-INF/ |
16:44.39 | ramteid | ok |
16:44.47 | fyrestrtr | but there is no struts-config.xml in /home2/work/public_html/WEB-INF |
16:44.58 | ramteid | ok, maybe you should create it... |
16:45.08 | ramteid | at least if you want to use struts... |
16:45.26 | fyrestrtr | if 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.32 | ramteid | right. |
16:45.38 | fyrestrtr | :D |
16:45.39 | ramteid | no, sorry. |
16:45.44 | fyrestrtr | :( |
16:45.48 | ramteid | it wold try it from one directory above. i assume. |
16:46.11 | fyrestrtr | in /home2/work/public_html/WEB-INF/ are the settings for an app that doesn't use struts. |
16:46.19 | ramteid | huch! |
16:46.28 | fyrestrtr | in /home2/work/public_html/testing/WEB-INF/ are the settings for the app that does use struts |
16:46.43 | ramteid | I think you make your life really hard there.... |
16:46.57 | fyrestrtr | when 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.01 | ramteid | why is there a webapp in public_html ? |
16:47.23 | ramteid | should that be "ROOT" ? |
16:47.24 | fyrestrtr | because I was working on one there, and then I decided to test something with struts. |
16:47.49 | fyrestrtr | yes, when I go to my site (www.domain.com), it loads the non-struts app from public_html "ROOT" |
16:47.51 | ramteid | well, I propose to put the webapp in public_html in it's dedicated directory.... parallel to testing. |
16:48.04 | ramteid | ah... docBase.... |
16:48.12 | fyrestrtr | the docBase points to it. |
16:48.18 | ramteid | i think "testing" is misplaced in that directory. |
16:48.24 | ramteid | hang on a sec |
16:49.05 | ramteid | yes, testing is misplaced |
16:49.16 | ramteid | I assume that it isn't even recognized as a webapp |
16:49.22 | fyrestrtr | well... |
16:49.23 | ramteid | since it's nested within another webvapp |
16:49.28 | fyrestrtr | some of it works. |
16:49.34 | ramteid | oh |
16:49.38 | fyrestrtr | so you can't have nested apps? |
16:49.42 | fyrestrtr | maybe this is what I'm missing. |
16:49.44 | ramteid | never done that. |
16:49.51 | ramteid | and not sure if this works... |
16:50.06 | ramteid | well, you can nest "ROOT" and other webapps |
16:50.19 | ramteid | but if you can nest "X" under "Y" I'm not sure never done that |
16:50.21 | ramteid | or needed it |
16:50.34 | fyrestrtr | public_html is my root |
16:50.41 | fyrestrtr | as that's where docBase points to. |
16:50.58 | ramteid | ok. |
16:51.05 | fyrestrtr | and there is already an application running there, which I didn't code. |
16:51.13 | ramteid | ok... |
16:51.18 | ramteid | which is nested it assume? |
16:51.37 | fyrestrtr | I 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.49 | fyrestrtr | now, the problem is that none of my struts mappings work. |
16:51.57 | fyrestrtr | and they all give 400 errors. |
16:51.59 | ramteid | I see. |
16:52.14 | ramteid | I still think that the problem is that you can't have a webapp below another webapp |
16:52.25 | ramteid | which means docBase can only hold *one* and only *one* webapp |
16:52.30 | fyrestrtr | 'HTTP Status 400 - Invalid path /testing/ProgramsAction was requested' |
16:52.43 | ramteid | yes, because the "ROOT" webapp doesn't know anyhting of testing |
16:52.53 | ramteid | (that one which resided in public_html) |
16:53.07 | fyrestrtr | ramteid: so, if I take my WEB-INF and merge it with the 'ROOT' WEB-INF, will that solve my problem? |
16:53.07 | ramteid | i assume you can't host several webapps there currently. |
16:53.16 | ramteid | I assume so |
16:53.23 | fyrestrtr | I'll try it. |
16:53.27 | ramteid | but you have to move all files one directory up (JSPs, etc. |
16:53.28 | fyrestrtr | makes backups first |
16:53.32 | ramteid | very good idea |
16:53.49 | fyrestrtr | why do I have to move all files up? |
16:54.08 | fyrestrtr | shouldn't struts map the actions to the classes? |
16:54.11 | ramteid | hmm, good question... depends on the structure of your application |
16:54.24 | ramteid | sure, struts will do the mapping |
16:54.35 | fyrestrtr | but as a final answer -- is it not possible to have nested webapps? |
16:54.36 | ramteid | but any lib in testing/WEB-INF/lib must be placed in WEB-INF/lib |
16:54.50 | ramteid | As far as I know it's not possible. |
16:55.02 | fyrestrtr | yes, my plan is to move testing/WEB-INF/* one dir up ( ../ ) |
16:55.05 | ramteid | (at least I don't know of any way to do it in tomcat... besides ROOT of course) |
16:55.21 | fyrestrtr | hrmm, this is something to google. |
16:55.49 | ramteid | my search failed... but maybe you have more luck ;-) |
16:56.03 | ramteid | but I never read of one doing nested webapps.... |
16:56.48 | fyrestrtr | my search led me all kinds of lovely xml reference "can nest tags" :( |
16:57.52 | ramteid | I see. |
16:58.08 | ramteid | ah... i think the trick is to use contextpathes |
16:58.14 | ramteid | but you can't nested within the same webapp |
16:58.35 | ramteid | (= the same webapp "deployment" or directory that is) |
16:59.19 | ramteid | but on the other hand I never needed to do such "strange" thing |
16:59.39 | fyrestrtr | yes, I'm always the one "volunteered" for the strange stuff. |
16:59.45 | fyrestrtr | "Oh yeah, he'll know what to do." |
16:59.52 | fyrestrtr | me = O.O |
16:59.58 | ramteid | ROTFL. |
17:00.30 | ramteid | well, on the other hand you learn a lot of things... |
17:00.37 | fyrestrtr | this is true. |
17:00.42 | kjkoster5489 | You cannot nest webapps. |
17:00.49 | fyrestrtr | #1 thing being, don't freakin' open your mouth at work. |
17:00.59 | ramteid | kjkoster5489: thx for the confirmation |
17:01.03 | kjkoster5489 | You have to give each a directory. Only ROOT is special. |
17:01.04 | fyrestrtr | lest you get stuck in "Intersting land" |
17:01.41 | fyrestrtr | kjkoster5489: 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.01 | fyrestrtr | well let me phrase that |
17:02.07 | fyrestrtr | "code" that uses struts |
17:02.10 | ramteid | fyrestrtr: as long as both apps don't interfere |
17:02.11 | fyrestrtr | since there is only one app. |
17:02.26 | fyrestrtr | like -- both try to map the same action? |
17:02.30 | fyrestrtr | or something silly like that? |
17:02.34 | ramteid | fyrestrtr: correctly, that would break |
17:02.56 | ramteid | fyrestrtr: but with struts you can do more or less "nested" struts applications |
17:03.08 | fyrestrtr | yes -- mapping ftw :) |
17:03.35 | fyrestrtr | which is why I like struts (and other nifty frameworks that provide similar hooks -- like django for example) |
17:03.54 | ramteid | yeah, there are some nice frameworks...... |
17:05.19 | fyrestrtr | thanks for your help |
17:05.51 | ramteid | you're welcome! |
17:06.06 | Slimer | ramteid: I don't suppose you know anything about Valves and authentication, eh? |
17:06.37 | ramteid | slimer: hmm, I propose to ask your question and we will see |
17:06.57 | Slimer | Basically, 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.30 | Slimer | tomcat 5.5.23, centos 5.0 and the java that comes with it. |
17:07.58 | ramteid | Slimer: well, you got me really on the wrong foot :-( |
17:08.02 | Slimer | hah |
17:08.53 | Slimer | I followed the docs to the letter. :-() |
17:09.44 | kjkoster5489 | fyrestrtr: each webapp is free to sue struts r not. |
17:09.59 | fyrestrtr | sue, eh? I'd like that. |
17:10.18 | ramteid | Slimer: maybe tuning conf/logging.properties could help you? |
17:10.29 | ramteid | Slimer: turning up all logging.... |
17:10.43 | ramteid | slimer: i never use authenticator value myself yet :( |
17:10.49 | kjkoster5489 | fyrestrtr: each webapp needs its own WEB-INF/web.xml and WEB-INF/lib and/or WEB-INF/classes. |
17:11.01 | kjkoster5489 | See how the webapps dir of Tomcat is formed. that's how it's done. |
17:11.18 | Slimer | ramteid: Actually, I had (using log4j) the logging set to DEBUG. |
17:11.22 | kjkoster5489 | Each webapp gets its own classloader, so you can have different apps use differetn version of struct. |
17:11.24 | kjkoster5489 | structs. |
17:11.43 | Slimer | ramteid: And I could see logging from org.apache.catalina.[authenticator,session,a bunch of others] |
17:11.55 | ramteid | Slimer: ok, I see. |
17:12.11 | fyrestrtr | kjkoster5489: can you deploy more than one webapp, in one docbase? |
17:12.17 | ramteid | Slimer: just to be sure you enabled form auth in your web.xml |
17:12.25 | Slimer | ramteid: Adding: <Valve classname="org.apache.catalina.authenticator.FormAuthenticator" /> (with or without a debug="false" attribute) would seemingly suppress *all* .authenticator logging. |
17:12.38 | ramteid | Slimer: sounds bad. |
17:12.39 | Slimer | ramteid: Oh, this is with a totally working app with form auth. |
17:13.04 | Slimer | ramteid: 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.27 | Slimer | ramteid: I've been over the source and I can't figure out why this seems to happen. |
17:15.18 | ramteid | Slimer: ok, shame on me that I don't really have the answer :( |
17:15.43 | Slimer | ramteid: I don't suppose you have an app that uses form auth, eh? |
17:15.57 | ramteid | Slimer: I can't recally any to be honest |
17:16.00 | fyrestrtr | kjkoster5489: 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.09 | ramteid | Slimer: as strange as it may sound |
17:16.13 | Slimer | ramteid: 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.01 | ramteid | Slimer: well I assume that the valve works in general. |
17:17.01 | Slimer | ramteid: 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.46 | Slimer | ramteid: Yeah, me too. Lots of people obviously use it successfully. |
17:25.11 | Slimer | ramteid: If there is activity in this channel later, I'll try again maybe. Thanks for trying anyhow. |
17:27.00 | ramteid | Slimer: u're welcome |
17:45.06 | kjkoster5489 | fyrestrtr: no, you cannot. Each webapp has its own docbase |
17:45.08 | kjkoster5489 | . |
17:45.47 | fyrestrtr | kjkoster5489: so for tomcat's webapps folder, there is a separate docBase entry for each directory in there? |
17:51.46 | kjkoster5489 | Yes, they are auto-generated based on the webapp directory name. |
17:52.18 | kjkoster5489 | So the docbase for /examples is /examples on the outside and ${TOMCAT}/webapps/examples on the inside. |
17:52.41 | kjkoster5489 | ROOT is called / on the outside, and $TOMCAT/webapps/ROOT on the inside. |
18:01.53 | fyrestrtr | hrmm |
18:02.49 | fyrestrtr | so 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.00 | fyrestrtr | and call it /bar ? |
18:03.19 | kjkoster5489 | For example, yes. |
18:03.31 | fyrestrtr | aye yaye :( |
18:03.38 | fyrestrtr | what if you don't have access to server.xml |
18:03.41 | fyrestrtr | how do you do that? |
18:03.55 | ramteid | fyrestrtr: than you're f*cked up... |
18:04.02 | fyrestrtr | in more ways than one. |
18:04.05 | kjkoster5489 | And 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.17 | kjkoster5489 | So You are using a hosted tomcat? |
18:04.23 | fyrestrtr | yes, unfortunately |
18:09.04 | kjkoster5489 | Ask 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.08 | rjb | hi all. anybody have time to look @ a jndi resource problem i'm having under 5.5.25 w/ postgres? |
18:36.06 | rjb | <PROTECTED> |
18:36.07 | rjb | <PROTECTED> |
18:36.07 | rjb | <PROTECTED> |
18:36.07 | rjb | <PROTECTED> |
18:36.07 | rjb | <PROTECTED> |
18:36.07 | rjb | <PROTECTED> |
18:37.02 | rjb | when 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.16 | kjkoster5489 | What's the precise error message? |
18:43.32 | kjkoster5489 | Are you sure there are no old (wrong) versions of the file floating around? |
18:43.54 | ramteid | jdbc:postgresql://199.199.199.199/test |
18:44.01 | ramteid | I assume that the connection string is broken |
18:44.06 | ramteid | example per doc above |
18:44.26 | rjb | same connect string works in a standalone java program |
18:44.28 | *** join/#tomcat da_krowa (n=Miranda@chello089077099221.chello.pl) |
18:44.46 | ramteid | ok, but maybe give it a try? |
18:44.55 | rjb | tring now :) |
18:49.40 | rjb | same symptom; exact message: Connection Pool failure: Cannot create PoolableConnectionFactory (FATAL: database "xadm" does not exist) |
18:51.00 | kjkoster5489 | Try changing the user name to 'foo' to see if changes are picked up. |
18:51.48 | rjb | exactly right; changing the userid to postgres results in FATAL: database "postgres" does not exist |
18:52.23 | kjkoster5489 | dang |
18:52.52 | kjkoster5489 | I think the database name needs a /, not a : in front of it |
18:53.52 | rjb | just like ramteid suggested (?) ; same results. |
18:54.50 | kjkoster5489 | dang again |
18:55.15 | rjb | tell me about. i've been staring at this all day :( |
18:55.58 | ramteid | rjb: can you paste the current config again plz? |
18:56.07 | kjkoster5489 | And the one in the Java program. |
18:56.45 | rjb | <PROTECTED> |
18:56.46 | rjb | <PROTECTED> |
18:56.46 | rjb | <PROTECTED> |
18:56.46 | rjb | <PROTECTED> |
18:56.46 | rjb | <PROTECTED> |
18:56.46 | rjb | <PROTECTED> |
18:58.27 | rjb | from java: |
18:58.47 | rjb | <PROTECTED> |
18:58.47 | rjb | <PROTECTED> |
18:58.48 | rjb | <PROTECTED> |
18:58.48 | rjb | <PROTECTED> |
18:58.48 | rjb | <PROTECTED> |
18:58.48 | rjb | <PROTECTED> |
18:58.50 | rjb | <PROTECTED> |
18:58.52 | rjb | <PROTECTED> |
18:59.24 | ramteid | rjb: 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.35 | ramteid | rjb: maybe give it a try |
18:59.55 | rjb | had tried that with the port #; no change. will try w/o. |
19:00.32 | ramteid | which version of the driver are u using? |
19:01.12 | rjb | 8.2.-504 |
19:02.15 | ramteid | ok, maybe try build 508... |
19:03.06 | rjb | ok; but this only happens w/i tomcat (?) |
19:03.23 | ramteid | seems so. it looks like the info isn't set correctly... but maybe it's not postgresql driver but tomcat connection pool |
19:03.41 | ramteid | i looked in my config for mysql and that one looks like yours... |
19:03.47 | ramteid | so I'm not sure why this breaks :( |
19:04.02 | ramteid | unfortunately no JNDI with postgresql under tomcat :( |
19:04.15 | rjb | ok, i was hoping it was something obvious that i missed because i've been staring at it for so long. |
19:04.29 | rjb | appreciate your taking the time to look; thanks very much. |
19:04.33 | ramteid | not for my eyes :-( |
19:05.03 | kjkoster5489 | I'm stumped too. |
19:06.02 | rjb | k. if i figure it out, i'll be sure to share |
19:06.08 | rjb | thanks again |
19:06.18 | ramteid | rjb: you're welcome, according to http://www.anders.com/projects/sysadmin/tomcat.html it looks fine |
19:06.40 | ramteid | rjb: so there must be some stange issue... |
19:07.07 | ramteid | rjb: well, if you're hardcore attach a debugger to tomcat and look what it is doing... |
19:07.15 | ramteid | rjb: or peek into the source... :) |
19:07.27 | ramteid | rjb: but maybe reasing the debug level helps? |
19:07.34 | rjb | yeah. not my day job, but i don't see an alternative. |
19:08.52 | kjkoster5489 | uhmm.. |
19:09.08 | kjkoster5489 | ... or use p6spy? |
19:11.28 | kjkoster5489 | actually, 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) |