00:00.35 | jbalint | i'm selling the apress book i have for a few bucks if you want it :) |
00:01.37 | mers | jbalint: postage will cost more ;) |
00:01.45 | jbalint | where do you live? |
00:01.53 | mers | malta |
00:02.12 | jbalint | Wow, yeah, probably like 20 bucks. |
00:02.15 | mers | and i don't mean malta, NY :p |
00:02.22 | jbalint | Never heard of that. |
00:02.48 | mers | i'll wake up early and go get jasonb's book tomorrow |
00:03.03 | jbalint | Cool. You have good book stores there? |
00:03.06 | mers | and then promptly read it on the beach |
00:03.24 | jbalint | hehe, nice. what's the temperature like there? |
00:04.07 | mers | it's actually not too bad. we're at about 90F in the shade on a daily basis. the humidity kills you though, you'll do nothing but sweat cause nothing evaporates. |
00:04.19 | mers | the rest of europe is in a heat wave. can't wait til it hits here...not |
00:04.45 | jbalint | Yeah, it's been hot in US on and off for maybe 3 or 4 weeks. |
00:05.06 | mers | jbalint: i've heard. i get the abc news podcast |
00:05.52 | mers | i used to live in the US, so i try to keep up with what's going on in your neck of the woods |
00:06.14 | jbalint | cool, where at? |
00:06.17 | mers | dc |
00:06.24 | jasonb | mers: Our book's introduction chapter has a good overview of what Tomcat is, and what Tomcat does. |
00:07.03 | jasonb | mers: And, you're absolutely right, there's almost no pages on the public internet that describe what Tomcat is, which I always found very, very strange. |
00:08.34 | *** join/#tomcat Fracture (n=Fracture@dsl-202-173-191-84.qld.westnet.com.au) |
00:10.03 | mers | jasonb: it's just a shame i can't wait for the second edition. i'm working on a 3 tier app and I'm at the point where I have to design the logic and interface. i used tomcat at work but never had to do the real configuration, just mucked about with a web.xml file. got a rude awakening when i started looking for docs and tutorials |
00:11.40 | jasonb | mers: Well, even as old as our first edition is, it will help you there because web.xml hasn't changed much, and neither has server.xml. Deployment has changed a lot recently, but you can ask questions in here and figure it out. |
00:12.12 | jasonb | mers: The overall structure of Tomcat, and the overall set of features hasn't changed much, it's mainly just been improved. |
00:12.58 | mers | jasonb: web application deployment or tomcat deployment? |
00:13.10 | jasonb | webapp deployment into Tomcat. |
00:13.44 | mers | jasonb: i had tried to look at the changelogs to see what the updates are but they're too verbose |
00:14.22 | jasonb | mers: Yeah. Also the official changelogs are not clear about what changed, nor what the real impact is. |
00:15.48 | jasonb | mers: I maintain my own changelog.. I started because I had to have a readable one. :) So far, it's not published, but I'm considering what the best way to do that is. One consideration is: it takes a huge amount of time to maintain it. Another consideration is: it changes all the time, so if it was in a book it would get out of date really fast. |
00:16.36 | mers | i suspect most people only want a high level view of what's changed |
00:17.55 | mers | i don't have experience with tomcat, but i use other projects and i can tell you that if something changes in postgres, for instance, i will only care if it (1) changes the way my code will perform, or (2) breaks something, or (3) supersedes standard operating procedure for doing something in a better way |
00:19.02 | mers | the rest is fluff. if i look at the tomcat changelog, i see things like "Fix coding error which could cause a rare crash when a poller error occurred and sockets where pending being added to the keepalive poller (remm)" |
00:19.24 | jasonb | mers: A *very* high level "changelog" is in our introduction chapter in our book.. and the second edition one includes what was added/modified in more recent versions of Tomcat.. all very high level, not giving much detail. |
00:19.44 | mers | you don't need a proofreader do you? :D |
00:20.23 | jasonb | mers: Developers actually need extremely fine-grained changelogs that discuss what commits did what in each minor version release of Tomcat, which is the kind that I'm maintaining for myself. |
00:21.47 | jasonb | mers: We will need some tech reviewers, yes, but it's actually work. I have never been an O'Reilly tech reviewer so I don't know it all goes, but it sounds like some tedious work. |
00:22.34 | mers | sounds like joyous work :) |
00:22.45 | mers | at least they'll know the innards of tomcat when they're done reading though |
00:23.10 | mers | i'll get the 4.1 version tomorrow, but it would help to know what changed in broad terms |
00:23.38 | mers | hopefully this (http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html) will incorporate the deployer changes |
00:23.51 | jasonb | mers: I can tell you some of it if you want.. plus you could search the tomcat-dev mailing list archives for "tomcat.next". |
00:24.48 | jasonb | ibot: newintc5 |
00:24.53 | ibot | [newintc5] http://www.onjava.com/pub/a/onjava/2004/01/28/tomcat5.html |
00:24.53 | *** join/#tomcat rivad (n=rvd@adsl-065-013-016-010.sip.asm.bellsouth.net) |
00:25.20 | jasonb | mers: you can read our article about what was new in Tomcat 5.0 when that came out.. then there were more new changes from TC 5.0 to TC 5.5.. |
00:26.23 | mers | it's a start :) if i read all this stuff on the beach i'm going to turn into a lobster |
00:27.04 | rhizmoe | is there a such thing as a graceful shutdown in tomcat? |
00:30.23 | rhizmoe | hmm. much seems to depend here on handling it via apache |
00:31.29 | jasonb | rhizmoe: Describe the behavior you're after. |
00:32.27 | rhizmoe | same as in apache. put tomcat into a state in which it accepts no new connections |
00:32.51 | jasonb | rhizmoe: Just not accepting new TCP connections? |
00:32.53 | rhizmoe | after that it can automatically terminate itself or be manually terminated |
00:33.15 | jasonb | How is this different than a regular shutdown of Tomcat? |
00:33.49 | jasonb | That the port doesn't accept new connections, but the server's JVM process stays running? |
00:34.02 | rhizmoe | yeah, but now I'm thinking our app isn't amenable to that |
00:34.30 | rhizmoe | but yeah, that it finishes whatever threads it has going |
00:34.32 | jasonb | You can tell the connector to stop accepting connections via JMX.. (an easy way to do that would be through jconsole) |
00:34.47 | rhizmoe | ah right. well i should really install that stuff :) |
00:35.04 | jasonb | Well jconsole is part of the JDK, so you should already have it. |
00:35.24 | jasonb | You just need to start Tomcat's JVM in a way where the JVM opens a JMX Remote connector port. |
00:36.34 | jasonb | set JAVA_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" |
00:36.51 | jasonb | (in the Tomcat JVM process's environment) |
00:41.11 | rhizmoe | i'll make a note of that for when i have time. thanks :) |
00:41.20 | *** join/#tomcat mers (n=mers@217.22.177.194) |
00:41.29 | mers | laptop went to sleep |
00:41.31 | mers | and so should i |
00:41.36 | mers | thanks jasonb |
00:43.47 | jasonb | rhizmoe: You're welcome. |
01:13.02 | *** join/#tomcat gorpon (n=gorpon@64.165.63.137) |
02:00.44 | *** join/#tomcat dec_ (n=tom@ppp156-158.lns3.adl2.internode.on.net) |
02:09.37 | dec_ | Hi all, in a webapp's META-INF/context.xml I have an AccessLogValve to do custom logging for each webapp, but each access log appears to be blank - any ideas why this could be? |
02:09.38 | *** join/#tomcat longbeach (n=bobby@AFontenayssB-152-1-20-233.w83-114.abo.wanadoo.fr) |
02:14.04 | yassine | good night everyone |
02:16.13 | jasonb | good night yassine |
02:16.50 | jasonb | dec_: How are you deploying your webapp? |
02:17.07 | dec_ | its auto deploying |
02:17.11 | jasonb | dec_: Are you making it into a WAR file and using the manager webapp to deploy it? |
02:17.46 | jasonb | dec: Also, which exact version of Tomcat are you using? |
02:20.33 | dec | jasonb: 5.5.15 - the webapp is a war but we have a script which is run to deploy a new webapp, which unzips the war into a new directory and then adds a <Host appBase='/new/dir/' unpackWARs='true' autodeploy='true'></Host> block to tomcat's server.xml |
02:23.29 | dec | (I don't know why it is set up like that, that's just how it is.) |
02:27.53 | jasonb | dec: well, if I remember right, in TC 5.5.x, I think the only time that META-INF/context.xml is used is when you deploy your webapp through the manager webapp. |
02:28.48 | jasonb | dec: You're not saying you keep adding additional <Host> lines to your server.xml each time you redeploy, are you? |
02:30.22 | dec | No not every time the app is redeployed, each time an additional app is added. |
02:30.28 | jasonb | ok. |
02:30.42 | dec | (this is not my setup and I am a tomcat newbie. :)) |
02:30.43 | jasonb | Well, I think you shouldn't be using META-INF/context.xml when you deploy it that way. |
02:31.07 | jasonb | Instead, you should be adding a file like conf/Catalina/localhost/yourwebappname.xml |
02:31.12 | dec | Ok so basically our AccessLogValve is in the wrong spot, it's not going to be read in the context.xml? |
02:31.18 | dec | Ah okay. |
02:31.26 | jasonb | The contents of the META-INF/context.xml file you have now should go into conf/Catalina/localhost/yourwebappname.xml instead. |
02:31.38 | jasonb | Try that.. it'll likely work. |
02:31.43 | jasonb | I have to run. |
02:31.48 | dec | Thanks for the advice. |
02:32.18 | jasonb | You could also put the <Context> config straight into server.xml, nested within the <Host> you're already adding.. that might be even better. |
02:32.25 | jasonb | You're welcome. |
02:32.57 | dec | Yeah that was my other thought, just add the AccessLogValve to the <Host></Host> block. |
02:33.04 | jasonb | Yup. |
02:33.19 | jasonb | Okay.. have fun. :) |
02:34.05 | dec | Thanks. |
02:34.06 | dec | :) |
02:34.45 | jasonb | You're welcome. |
03:04.46 | *** join/#tomcat enno__ (n=enno@p508D363B.dip0.t-ipconnect.de) |
03:09.32 | *** join/#tomcat lamech (n=dan@cheshirecat.manxome.org) |
03:20.04 | *** join/#tomcat vinse (n=vinse@208.253.223.146) |
03:37.15 | *** join/#tomcat valmont (n=chrishol@dsl092-043-004.lax1.dsl.speakeasy.net) |
04:02.52 | *** join/#tomcat longbeach (n=bobby@AFontenayssB-152-1-17-181.w82-121.abo.wanadoo.fr) |
04:02.56 | *** join/#tomcat enno_ (n=enno@p508D2A04.dip0.t-ipconnect.de) |
04:14.40 | *** join/#tomcat retodd (n=opera@adsl-69-224-37-93.dsl.irvnca.pacbell.net) |
04:32.19 | *** join/#tomcat Fracture (n=Fracture@dsl-202-173-191-84.qld.westnet.com.au) |
05:09.57 | *** join/#tomcat jasonb (i=noneoyer@adsl-66-124-73-250.dsl.sntc01.pacbell.net) |
05:20.08 | *** join/#tomcat fix- (n=Bjorn@86.39.154.74) |
05:39.58 | *** join/#tomcat remnant (n=lenhan@user-0c9hcu2.cable.mindspring.com) |
06:53.46 | *** join/#tomcat jochus (n=jochus@mailhost.newtec.be) |
06:53.57 | *** join/#tomcat columbo (n=chatzill@pool-71-104-25-42.lsanca.dsl-w.verizon.net) |
06:54.08 | jochus | hello |
06:54.21 | jochus | I'm wondering if someone's here to help my out with a stupid problem |
06:54.26 | jochus | I'm using Tomcat 5.5 |
06:54.34 | jochus | and when I start up Tomcat ( startup.sh ) |
06:54.37 | jochus | I get this error |
06:55.13 | jochus | 2-aug-2006 8:37:46 org.apache.catalina.startup.HostConfig deployDirectory |
06:55.14 | jochus | SEVERE: Error deploying web application directory webapp9 |
06:55.14 | jochus | java.lang.NullPointerException |
06:55.23 | jochus | nullpointerexception? :-/ |
06:57.00 | columbo | maybe its a problem with your servlet |
06:57.21 | jochus | yes, I guess ... but I don't know where to start looking ... |
06:57.45 | jochus | 2-aug-2006 8:37:46 org.apache.catalina.startup.HostConfig deployDirectory |
06:57.45 | jochus | SEVERE: Error deploying web application directory webapp9 |
06:57.45 | jochus | java.lang.NullPointerException |
06:57.45 | jochus | <PROTECTED> |
06:57.45 | jochus | <PROTECTED> |
06:57.56 | jochus | it has something to do with my JDBC Driver, I think |
06:58.01 | jochus | I made a context.xml |
06:58.14 | jochus | <?xml version="1.0" encoding="UTF-8"?> |
06:58.14 | jochus | <Context path="/alumni"> |
06:58.14 | jochus | <PROTECTED> |
06:58.14 | jochus | </Context> |
06:58.30 | jochus | and since then, everything went wrong ... |
06:59.32 | columbo | ya man i don't know; i don't use JDBCRealm |
06:59.44 | jochus | no problem :-) |
07:00.24 | columbo | i'm trying to figure out how to keep tomcat from serving my servlet on http; only on https |
07:01.56 | columbo | oh duh.. simple redirect |
07:45.08 | *** join/#tomcat BigChris (n=BigChris@212.130.183.18) |
07:57.56 | *** part/#tomcat dec (n=tom@ppp156-158.lns3.adl2.internode.on.net) |
08:07.38 | *** join/#tomcat yango (n=yango@unaffiliated/yango) |
09:33.48 | *** join/#tomcat wam (n=wam@proxy1.msh.de) |
09:35.01 | *** join/#tomcat yel (n=yassine@xdsl-87-78-32-23.netcologne.de) |
09:40.54 | *** join/#tomcat kanhaiya_kk (n=ignu@61.17.11.122) |
09:40.59 | kanhaiya_kk | hi all |
09:41.07 | kanhaiya_kk | can anybody help me? |
09:41.25 | kanhaiya_kk | i want to change default system error message |
09:41.42 | kanhaiya_kk | HTTP Status 404 - this error message |
09:43.56 | *** join/#tomcat cypo (n=opera@dslb-082-083-045-010.pools.arcor-ip.net) |
10:05.57 | *** join/#tomcat horst__ (n=horst@217.116.178.162) |
10:06.45 | *** join/#tomcat jsisson (n=sissonj@ppp3-90.lns1.syd7.internode.on.net) |
10:30.56 | *** join/#tomcat kanhaiya_kk (n=ignu@61.17.11.122) |
10:39.42 | *** join/#tomcat Alconquian (n=g@adsl-69-152-219-186.dsl.fyvlar.swbell.net) |
11:00.14 | *** join/#tomcat smgLeader (n=a@213.249.153.4) |
11:04.42 | smgLeader | hey guys. I am using j_security_check on tomcat 5.0.28. I'm using a JDBC realm looking at an Oracle database and have a Logger in place to debug. Once tomcat has been up for a while (usually a couple of hours) the authentication stops working and there is no debugging output. The login form hangs. Anyone got any ideas? Thanks in advance. |
11:13.01 | *** join/#tomcat fly_80 (n=fly@217.201.66.198) |
11:13.12 | fly_80 | hello |
11:15.25 | smgLeader | hello |
11:25.12 | *** join/#tomcat fix- (n=Bjorn@86.39.154.74) |
11:36.43 | *** join/#tomcat yassinework (n=yel@h-213.61.164.152.host.de.colt.net) |
11:38.10 | yassinework | hi everyone |
11:50.17 | *** join/#tomcat sail_ (n=sail@mdsnwikwbas08-pool28-a244.mdsnwikw.tds.net) |
11:59.13 | kenneo | hey |
11:59.18 | kenneo | <-- Former Langly |
11:59.35 | yassinework | <---- wonders what that means :) |
11:59.46 | kenneo | pointer to me :) |
13:43.41 | *** join/#tomcat rolphin (n=rolphin@cpy94-2-82-224-234-131.fbx.proxad.net) |
13:44.03 | rolphin | HI, how can I configure apache/tomcat to correctly see the % caracter ? |
13:44.50 | yassinework | rolphin, explain please what you mean by seeing the charchter "%" ? |
13:44.52 | rolphin | I must rencode it this way to make it pass thru : %2525 |
13:45.06 | rolphin | the % used in urlencoding |
13:45.56 | rolphin | mod_jk sees %25 (from apache from my browser) but it sends to tomcat % |
13:46.05 | rolphin | % alone isn't valid ... |
13:46.13 | rolphin | so returns 400 |
13:47.02 | rolphin | may be this is not a tomcat problem or misconfiguration, I m ready to hear anything... |
13:47.02 | *** join/#tomcat remnant (n=lenhan@user-0c9hcu2.cable.mindspring.com) |
13:52.37 | *** join/#tomcat fly_80 (n=fly@217.201.65.255) |
13:52.43 | fly_80 | hello all |
13:56.21 | fly_80 | i'm running tomcat5 on debian and I wrote a servlet . I don't know why , the servlet should output some html lines ...but it does not... It prints out lines like : " <a href="index.jsp"> link </a><br> " without translating them...!!! what's wrong ?? |
13:57.00 | kanhaiya_kk | hi all |
13:57.19 | yassinework | fly_80, add response.setContentType(text/html); |
13:57.21 | kanhaiya_kk | can anybody tell me how to define alias in tomcat ? |
13:57.55 | fly_80 | yassinework: ah , so is it necessary? |
13:58.15 | yassinework | fly_80, other wise everything is interpreted like default content = text |
13:58.24 | fly_80 | ahhh |
13:58.28 | fly_80 | thanks |
14:00.16 | yassinework | np ;) |
14:01.09 | yassinework | rolphin, im afraid i have no idea what it can be sorry |
14:03.04 | *** join/#tomcat randrew (n=raj@dolmen.cc.columbia.edu) |
14:04.11 | *** join/#tomcat kenneo (i=langly@langly.org) |
14:11.46 | smgLeader | hi yassine |
14:15.02 | *** part/#tomcat kanhaiya_kk (n=ignu@61.17.11.122) |
14:17.26 | smgLeader | yassine, I installed 5.0.28 with the logger like you said. It still happened when using the remote Oracle database. I've recondigured it to use a database on our LAN and it seems better. Someone told me that the firewall to the remote network drops connections that are inactive for a while. When tomcat starts up does it open a connection that it uses for j_security_check from then on, or does j_security_check open a connction as needed? |
14:23.59 | awelynant | smgLeader: you want to try using a DataSource realm, I believe you can configure it to check for a DB connection and reconnect |
14:25.30 | smgLeader | ah, ok |
14:25.40 | smgLeader | I've always used a JDBCRealm for dbase authentication |
14:25.51 | smgLeader | I guess if the problem re-occurs then I will investigate that Realm type |
14:26.03 | awelynant | the DataSource realm lets you use a configured DataSource |
14:26.46 | *** join/#tomcat gawaine (n=gawaine@DHCP154.fis.unical.it) |
14:26.54 | gawaine | Hi |
14:27.07 | awelynant | I believe (not sure) that a JDBC realm uses only 1 connection, so it may be worth using a pooled DataSource realm it you expect lots of concurrent auths |
14:27.55 | gawaine | I have a problem with tomcat. I've installed it on my LinuxBox and it starts but it doesn't allow me to access the "Tomcat Manager" and I don't know why |
14:28.17 | smgLeader | aha, OK |
14:28.59 | smgLeader | we use connection pooling for our own code, but wasn't sure how the JDBCRealm operated |
14:29.02 | smgLeader | thanks |
14:35.01 | yassinework | hi smgLeader |
14:35.13 | yassinework | sorry was working did not notify that your here |
14:36.26 | yassinework | smgLeader, jdbc:url//blahblah/db&autoReconnect=true |
14:37.18 | yassinework | hope this helps now i have to go my train moves in a couple of hours and need to doo a lot of stuff :s |
14:37.23 | yassinework | any one here from austria ? |
14:39.07 | yassinework | okay guys see you later |
14:41.01 | smgLeader | thanks a lot yassine, that's seems perfect, let me try it out |
14:41.40 | yassinework | good luck |
14:45.10 | gawaine | How can I access a .war application ? I've placed it in webapps/ dir but with http://localhost:8180/application it doesn't work |
14:50.16 | *** part/#tomcat gawaine (n=gawaine@DHCP154.fis.unical.it) |
14:58.13 | awelynant | gawaine: are you running tomcat on 8180? the default port for tomcat is 8080 |
15:01.53 | smgLeader | does anyone know how to use the autoReconnect=true parameter for use with an Oracle connector? I tried "jdbc:oracle:thin:@IP:1521:sid?autoReconnect=true" but that didn't work. |
15:09.16 | jbalint | haha |
15:09.23 | jbalint | it's specific to the mysql jdbc url |
15:09.30 | smgLeader | grrrrrrrr |
15:09.54 | smgLeader | its annoying me, because the oracle database is behind a firewall that drops our connection if it's inactive for an hour |
15:10.17 | smgLeader | so if someone doens't log into the system for an hour (i.e. overnight) then tomcat needs to be restarted |
15:10.39 | jbalint | What connection pool are you using? |
15:10.43 | smgLeader | I'm not |
15:10.49 | smgLeader | using JDBC security Realm |
15:10.58 | smgLeader | for j_security_check authentication |
15:12.39 | smgLeader | yassine, you're back? |
15:12.48 | yassine | smgLeader, sorry was thinking its okay for oracle too |
15:13.12 | smgLeader | no problem |
15:13.21 | smgLeader | I'm not entirely sure how to fix this really |
15:14.17 | smgLeader | this is why we like to use MySQL if we are given the choice. This client uses Oracle as corporate polic |
15:14.17 | smgLeader | y |
15:14.52 | yassine | smgLeader, how anput making a kind of triger |
15:15.10 | yassine | coding a small application that calls the db each 30 min |
15:15.16 | smgLeader | I thought about that |
15:15.33 | yassine | that could be for now a solution/workaround |
15:15.33 | smgLeader | but it would need to stimulate the actual connection that Tomcat opened |
15:16.16 | smgLeader | so I couldn't just "echo desc table | sqlplus user/pass@dbase" every 30 minutes |
15:16.22 | smgLeader | because that would open a new connection |
15:16.23 | yassine | you can use the httpclient for doing an authentication each 30 min |
15:16.45 | smgLeader | ahhh, I see what you're saying, get a process to log into the system every 30 minutes |
15:16.58 | yassine | yes |
15:17.10 | smgLeader | ok, that could be it |
15:17.17 | smgLeader | I will investigate |
15:17.20 | yassine | good luck mate |
15:17.27 | smgLeader | feels a bit dirty though! :-p |
15:17.28 | yassine | maybe i can connect from austria |
15:17.39 | yassine | and youll tell how it works |
15:17.40 | smgLeader | how is austria this time of year? |
15:17.55 | smgLeader | nah, the system isn't available on the puiblic internet |
15:17.57 | yassine | dunno im going there in 2 hours |
15:18.03 | smgLeader | where are you now? |
15:18.07 | yassine | germany |
15:18.12 | smgLeader | cool |
15:18.17 | yassine | you ? |
15:19.04 | smgLeader | not bad |
15:19.09 | smgLeader | the heatwave has finally broken here |
15:19.44 | yassine | where are you from ? |
15:22.00 | Marv|LG | heatwave? |
15:22.05 | Marv|LG | 100 here today |
15:22.30 | smgLeader | UK |
15:22.44 | smgLeader | its been 90-95 for the last month or so |
15:23.31 | *** part/#tomcat rolphin (n=rolphin@cpy94-2-82-224-234-131.fbx.proxad.net) |
15:25.32 | *** join/#tomcat sail_ (n=sail@wireless299.cs.wisc.edu) |
15:25.37 | *** join/#tomcat remnant (n=lenhan@ncle-vpn.ucsd.edu) |
15:31.10 | *** join/#tomcat jbalint (n=jbalint@unaffiliated/jbalint) |
15:32.14 | awelynant | smgLeader: not to be pushy :), but consider using the DataSource Realm, and configure DBCP (the datasource pool tomcat uses) to check for connections. That should fix your problem |
15:32.30 | smgLeader | ok then, will research that tomorrow |
15:32.31 | smgLeader | cheers! |
15:52.07 | *** join/#tomcat dfr (n=dfr@soss1.fnal.gov) |
15:54.19 | dfr | Hello, is there a way to gain name of the servlet, as defined in web.xml, from a derivative of httpServlet class? |
15:54.29 | dfr | or, rather, it's url pattern? |
16:13.00 | *** join/#tomcat mers (n=mers@217.22.177.194) |
16:15.29 | *** join/#tomcat mcupples (n=cupplesm@rrcs-24-73-129-8.se.biz.rr.com) |
16:15.35 | mcupples | Hi guys. |
16:15.37 | mers | hi folks. i'd like to perform some tasks when my context starts up. like setting properties, establishing database connections, etc. where do i do this from? |
16:15.40 | mcupples | What's a .war file? |
16:16.00 | mcupples | Well mers, you need to find the manual that came with Tomcat and turn to page 37. |
16:16.13 | mcupples | It's the big one, not the skinny one. |
16:17.08 | mers | the manual that came with tomcat? |
16:17.18 | *** join/#tomcat jsisson (n=sissonj@ppp17-205.lns2.syd7.internode.on.net) |
16:17.31 | mcupples | Yes. |
16:17.41 | mcupples | It should have been in the box where you bought it. |
16:18.34 | mcupples | I think you can get replacement ones by calling, but you need the serial that came with your copy. |
16:19.36 | mers | umm, i asked a legitimate question. if you don't know the answer or don't feel like answer, that's your prerogative, but don't waste my time with facetious answers |
16:20.05 | dfr | mers: isn't there like init method? |
16:20.30 | mers | dfr: that's per servlet, i was wondering if i could do it for the context as a whole |
16:22.02 | dfr | mers: I'd imagine what ya could do is have a default servlet start up and initialize all you want for it |
16:23.55 | mers | dfr: checking how to do that |
16:24.42 | dfr | mers: if you add <load-on-startup/> to the servlet clause, it'll start the servlet on start-up... |
16:24.54 | dfr | mers: not sure how much it helps =/ |
16:25.12 | mers | dfr: thta might do the trick |
16:26.22 | dfr | mers: besides, maybe you should just consider lazy intialization =/ |
16:26.30 | mers | dfr: i'm confused by one thing though. is there a way to share objects across servlets? for example, if i wanted to load properties for the whole context, and then have each servlet pick and choose which properties apply to it |
16:26.50 | dfr | mers: you cant always just make a static manager and ask for it =/ |
16:26.54 | dfr | emr*can |
16:27.01 | dfr | *mers: *can |
16:27.10 | mers | dfr: yup, that's what things are starting to look like |
16:27.24 | mers | dfr: singletons, managers, etc |
16:27.27 | dfr | mers: but I think the servlet context is shared between the servlets.... |
16:27.59 | dfr | mers: http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html |
16:28.01 | mers | dfr: it is. resources defined in there are accessible by all of them |
16:28.57 | mers | setAttribute and getAttribute look promising |
16:29.10 | dfr | mers: but yea... whenever I needed to share anything, I used managers, mostly =/ |
16:30.12 | mers | dfr: that makes sense for certain things |
16:30.28 | mers | e.g. i'm writing a DatabaseManager that takes care of initialising the Tomcat DataSource and stuff |
16:30.54 | mers | but it doesn't really make sense to have a manager that controls a Property hash table |
16:31.49 | dfr | yea, if you want simple properties, the context sounds like an easy way to go =/ it's just I tend to need to share more complicated objects between the servlets, hehe |
16:31.51 | mers | of course, the other problem with loading servlets on startup is that you probably can't control their order |
16:32.32 | mers | so if i have a servlet which needs a DBManager object in its init, and a startup servlet that initialises that DBManager, i'm going to swear |
16:32.49 | mers | i think lazy initialization is the way to go |
16:33.19 | *** join/#tomcat Moises (n=mlejter@host-216-165-185-114.dedicated.tds.net) |
16:33.23 | dfr | mers: hehe... I like lazy intialization just because it's lazy... but, I think I've read that there's some roder to start up.. lemme check |
16:33.48 | Moises | hi,all! |
16:34.35 | dfr | mers: "load-on-startup can specify an (optional) integer value. If the value is 0 or greater, it indicates an order for servlets to be loaded, servlets with higher numbers get loaded after servlets with lower numbers." |
16:35.47 | mers | dfr: hrmm |
16:36.13 | mers | so in theory, you'd have an initialisation servlet with the lowest number do the initialisation work |
16:36.30 | mers | then have the next servlet be your main webapp page |
16:36.42 | mers | wonder what happens if the initialisation chokes on something |
16:37.09 | dfr | mers: well, the intiialization script is called when you start tomcat.... the other ones are called only once a user invokes them via web app... |
16:37.29 | dfr | mers: I'd imagine that if something is not initialized by the time web user invokes it, it'd just stay not initialized, hehe |
16:38.24 | Moises | i have a question re: best practices - imagine i wanted to write a web app that allow the client to upload HTML files to be incorporated into the web app. I could write a servlet that accepted the upload, then wrote into the user's directory inside the web app. But I was going to deploy/redeploy my web app onto tomcat via a WAR file. The problem is that when I re-deploy, tomcat will delete the old expanded WAR folder, in order |
16:38.24 | Moises | to redeploy - and in the process it will also delete all the files my users uploaded into the web app. I am wondering whether there is a best practice - and what it is :-) - for a case like this ? |
16:38.51 | mers | dfr: nevermind, that was just my brain not thinking straight. your main page would be loaded on startup |
16:38.56 | mers | so that it's init would be executed |
16:39.36 | mers | by the time a doGet/Post comes in, it checks the state of initialisation and if something died, it would display the error instead of the main page |
16:39.57 | Moises | or it could try to reinitialize, right? |
16:39.57 | dfr | mers: yep, ya could do that.. :) |
16:40.20 | Moises | (i am thinking of a db setup that might have failed initially, but due to transient failures...) |
16:41.05 | dfr | Moises: not sure.... might be a better way to have the initial guy threaded and just keep trying time to time |
16:41.21 | Moises | it also occurrs to me that a filter might be the way to go here - so that the filter could check whether init occurred, and if not, try again, w/out having the servlets behind it need to worry... |
16:42.29 | Moises | i guess it would depend ... a thread that keeps trying could try a lot of times, w/out any clients actually trying to use the app... but otoh, by the time a client comes, the app would be ready ... |
16:43.24 | dfr | Moises: well, you can take care of by different sleep settings.. and it kinda makes sense to do that too, since if you're not using lazy intialization, you'd like to have your thingie initted asap |
16:43.32 | dfr | Moises: independent of whether user access it or not |
16:44.06 | dfr | Moises: if you wanted to be lazy and init it only once user accessed it, then might be a better idea to only try to init it once user asks for it :) |
16:44.56 | dfr | BTW guys, any of you know how I could get the url-pattern that is tied with a servlet? |
16:45.25 | dfr | so that I dont have to hardcode that url-pattern when I want to transition from one servlet to another? |
16:45.51 | Moises | i don't remember any standard APIs to do that... reading the web.xml file yourself comes to mind :-) |
16:46.15 | dfr | Moises: that's ugly:P |
16:46.52 | Moises | am not sure what you mean - you could steal the name from one servlet to give the other, and since url-pattern is mapped to servlet-name, you would not need to know what the pattern was, just the name assigned to the servlet you are replacing ... |
16:46.53 | dfr | Moises: I'm prolly better off hardcoding it then :) |
16:47.13 | dfr | Moises: so just link it all by servlet class names? |
16:47.32 | Moises | dfr: that was what i was thinking of, yes ... |
16:47.44 | mers | dfr: you mean for href targets? |
16:47.52 | dfr | Moises: hmm.. lemme try that.. sounds pretty fair.. especially since then I could get it just by .class method =/ |
16:48.01 | dfr | mers: yes, think so :P |
16:48.10 | dfr | mers: when I'm makign a form to be handled by a different servlet.... |
16:48.16 | mers | dfr: right |
16:48.37 | mers | dfr: umm, hrmmm, good question |
16:48.38 | mers | :) |
16:49.10 | Moises | but if you are doing this inside the code of servlet 1 - how would you have servlet 2 by the same name? I was thinking you would do this in updating your web app from one to another... |
16:50.29 | mers | dfr: i think you have to query the container |
16:50.52 | mers | dfr: since it's the only thing that knows where your servlet is, i think |
16:51.27 | dfr | Moises: not sure what ya mean... here's the deal: |
16:52.22 | dfr | Servlet1: doGet(...) { ...; printResponse("<form method=get action="+getServlet2Name()+">"); ...;} |
16:52.26 | *** join/#tomcat Darwin (n=unixnerd@darwinircd/developer/Darwin) |
16:52.42 | dfr | and I want Servlet2 to be executed once the user hits the "submit" button |
16:53.12 | dfr | so far, whatI was doing is go to web.xml, where I have <url-pattern>/servlet2</url-pattern> |
16:53.25 | dfr | and hardcoded getServlet2Name() to return "/servlet2" =/ |
16:53.46 | Moises | i would address the form to servlet1 again, and have it notice that when the form is submitted, it would need to do a forward() to a NamedDispatcher for getServlet2Name(). |
16:55.03 | Moises | (and getServlet2Name() would be really the name, not a URL :-) ) |
16:55.05 | dfr | Moises: how standard is that practice? 'cause.... that's not the way the web forms usually work =/ |
16:55.22 | dfr | Moises: it is the name, since it's all relative to the root folder |
16:56.38 | Moises | dfr: well - i guess one question is how many levels of indirection you want ... another is whether you want the servlets to be visible to a browser... |
16:57.42 | Moises | dfr: in your scheme, both servlets have url mappings, and so a browser can invoke either one directly. in my scheme, only servlet1 needs a URL mapping, since servlet2 would only be called by name by servlet 1, via a NamedDispatcher... |
16:58.55 | dfr | Moises: basically you have one main dispathing servlet that, based on action, calls different objects =/ |
16:59.15 | Moises | dfr: i guess that, bottom line, your servlet1 need to know what the name of servlet2 is, whether a URL or a servlet-name ... but the question is whether you also want the client to see... If yes, then I would stick to what you had - both servlets with well-known URls... |
16:59.39 | dfr | Moises: my point is that a servlet should generally know what url-pattern it has.... |
16:59.46 | Moises | dfr: yes - and the idea of a dispatching servlet is not new :-) - though that was not what I was thinking... |
16:59.59 | dfr | Moises: and tomcat sure as heck should know that... so I'd like to have my other servlet ask for it ;) |
17:00.54 | Moises | dfr: a servlet would know its own URL, but not someone else's... but you do have to end up hardcoding either a servlet-name, or a servlet URL into your code. |
17:01.09 | *** join/#tomcat Pir8 (i=pir8@de.crypted.ca) |
17:01.41 | dfr | Moises: well, I know what class I'd like to call.... |
17:01.56 | Moises | dfr: (actually - a servlet does not really even know its own URL - but a form with an empty action is address to the same URL that produced the form... so if your servlet does not know its own url, it can still write a form that will be posted back to itself ... |
17:02.34 | dfr | Moises: doGet knows the request and hence knows the url ;) |
17:02.51 | Moises | dfr: true :-) |
17:03.21 | dfr | Moises: but yea..... kinda weird that a servlet can't know its url pattern without it being invoked =/ |
17:03.53 | dfr | hmm... what happens if I dont specify url-pattern tag? will it get some default value? |
17:04.12 | Moises | dfr: no url-pattern tag means servlet cannot be called, unless via a NamedDispatcher |
17:04.29 | Moises | dfr: or via /servlet/fully.qualified.name if you have that servlet enabled :-) |
17:06.19 | dfr | Moises: fully.qualified.name <- class name? |
17:06.36 | yassine | <PROTECTED> |
17:08.27 | mers | dfr: can i suggest the obvious? |
17:08.54 | mers | dfr: if there is no built in way to ask the container what the servlet url to name mappings are, why not write it? |
17:09.09 | mers | all you have to do is parse some xml, create a hashtable, and set it as an attribute in your context |
17:09.21 | mers | easier said than done, fine, but might not be that horrific |
17:09.39 | dfr | mers: I'm afraid the answer is laziness :( |
17:09.45 | mers | can web.xml change during the lifetime of a servlet? |
17:09.49 | *** join/#tomcat wltjr (n=wltjr@c-66-177-190-192.hsd1.fl.comcast.net) |
17:09.51 | dfr | mers: dont think so |
17:10.01 | mers | even better |
17:10.01 | dfr | mers: it wont take effect unless tomcat is restarted anyway |
17:10.08 | wltjr | anyone know if tomcat bundles or uses xalan at all? |
17:11.24 | dfr | mers: it's just... I'm pretty sure that tomcat has the className -> url-pattern mapping somewhere..... so if I were to code that mapping yet again, I'd be doing work that has been already done |
17:11.36 | wltjr | well I should so I know tomcat does not bundle xalan, just trying to figure out if it includes any of it's classes or etc in tomcat |
17:11.37 | mers | agreed |
17:12.03 | mers | wltjr: not familiar with xalan sorry |
17:12.23 | wltjr | well basically someone is having a problem with the tomcat compiled from source on Gentoo |
17:12.52 | wltjr | xalan problem atm, if they use binary tomcat, it works, compiled from source it does not, but xalan is in jre? and it's the same jre, so rather odd |
17:24.02 | *** part/#tomcat mcupples (n=cupplesm@rrcs-24-73-129-8.se.biz.rr.com) |
17:24.19 | Moises | dfr: fully-qualified-name is indeed class-name - including package... |
17:24.34 | wltjr | !seen jasonb |
17:24.41 | Moises | but /servlet/* mapping is usually disabled for security reasons ... |
17:24.46 | wltjr | no bot here? |
17:25.06 | Moises | wltjr: sorry - i just joined, myself :-) |
17:43.25 | dfr | Moises: hrmph... thanks :) |
17:43.39 | dfr | Moises: makes sense, so that the cracking user cant access all the servlets =/ |
17:43.51 | Moises | :-) |
17:51.14 | *** join/#tomcat oxblood (n=vee@user-11217nu.dsl.mindspring.com) |
18:11.16 | jbalint | is there a logic in the order that apps are started? |
18:11.55 | jbalint | wltjr: what kind of error do you get? |
18:14.18 | wltjr | ok, I have narrowed it down more |
18:15.00 | wltjr | this exception javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found |
18:15.17 | wltjr | it thrown with the Gentoo compiled from source tomcat and not the binary tomcat |
18:15.36 | wltjr | now that class is part of xalan, but not part of 1.5 jdks |
18:15.58 | wltjr | we currently are compiling tomcat via a 1.4 jdk, 1.5 will happen shortly, another story |
18:17.08 | wltjr | jbalint: so now I am trying to find out why that class would be part of the binary tomcat, and not our tomcat? |
18:19.02 | awelynant | tomcat binaries often include xercesImpl.jar and xml-apis.jar in the $TOMCAT_HOME/common/endorsed folder |
18:22.26 | wltjr | yeah, I have the binary, and it has no xalan, unless it's in compat package, which the particular user I do not believe is using |
18:25.28 | *** join/#tomcat valmont (n=chrishol@germany.pspdev.pas.earthlink.net) |
18:26.13 | *** join/#tomcat remnant (n=lenhan@80362923.dynamic.ucsd.edu) |
18:26.53 | jbalint | Is it on a 1.5 runtime? but ocmpiled with 1.4? |
18:27.56 | *** join/#tomcat jeromatron (n=jeromatr@71-219-27-168.slkc.qwest.net) |
18:28.40 | wltjr | jbalint: yes, 1.5 runtime, compiled with 1.4, long story, compiling with 1.5 is available, but not in stable Gentoo tree, and tomcat in stable tree is like 2 years old |
18:29.03 | jeromatron | Has anyone tried to use jsp:useBean with a java 5 generics based list, so for example <jsp:useBean id="myStringList" type="java.util.List<String>" scope="request"/> ? |
18:29.09 | jbalint | Who is setting javax.xml.transform.TransformerFactoryConfigurationError ? |
18:29.21 | jbalint | The JRE version is valled com.sun.org.apache..... |
18:29.32 | jbalint | s/va/ca/ |
18:29.53 | jbalint | jeromatron: why does it matter? |
18:30.26 | wltjr | <PROTECTED> |
18:30.32 | Moises | jeromatron: i am pretty sure you need to specify the type as "java.util.List" ...you can always specify the type of the elements in the iterate tag... |
18:30.36 | wltjr | <PROTECTED> |
18:30.53 | wltjr | <PROTECTED> |
18:30.58 | jeromatron | if you try to use <c:out value= on one of the members of the list, you have to specify its type...oh, I guess in the foreach you can do that.... |
18:31.41 | Moises | jeromatron: (well - i was thinking of the struts logic:iterate - but perhaps jstl's c:for has the same feature...) |
18:33.02 | jeromatron | Oh wait...yeah, I'm trying to get only one of the list out, and if I use the <%= ... %> syntax, I have to cast the member so <%=((Category) categoryTree.get(categoryTree.size()-1)).getName()%> which seems redundant since it's already a typed list. |
18:33.08 | jbalint | wltjr: is it possible that sysprop is getting changed/overridden somewhere? |
18:33.33 | wltjr | jbalint: that's over my head, no idea? |
18:33.45 | wltjr | jbalint: what do you mean by sysprop? |
18:33.54 | jbalint | System.getProperty() |
18:34.02 | wltjr | jbalint: any chance you want to join discussion on #gentoo-java about this? |
18:34.10 | wltjr | jbalint: oh no clue I doubt they are doing that |
18:34.37 | jeromatron | I guess I was just wondering if the jsp taglib had an update to handle generics, because the type="java.util.List<Category>" doesn't compile. |
18:35.58 | Moises | jeromatron: i had not tried this myself... and you do have an import for Category? did you try type="java.util.List<my.package.Category>" ? |
18:36.28 | Moises | jeromatron: it occurred to me that there's little reason why the code generator would care either way, and as long as the compiler accepted it ... |
18:39.53 | jeromatron | wow, I can't believe it was that simple :-) you're right, it didn't care. I just thought since it didn't compile that the jsp taglib didn't handle generic typed lists. Thanks. It works with the full package name - silly me. |
18:46.39 | *** join/#tomcat chrismon (n=chrismon@unaffiliated/chrismon) |
18:56.31 | *** join/#tomcat Mortuis (n=jmort@bi-02pt1.bluebird.ibm.com) |
19:19.58 | *** join/#tomcat a4akb (n=Akbara@ask13-152.qualitynet.net) |
19:47.50 | *** join/#tomcat eidoLaptop (n=eido@pdpc/supporter/monthlybronze/eidolon) |
19:56.10 | *** part/#tomcat Mortuis (n=jmort@bi-02pt1.bluebird.ibm.com) |
20:00.42 | *** part/#tomcat jeromatron (n=jeromatr@71-219-27-168.slkc.qwest.net) |
20:11.06 | eidoLaptop | hey folks, is there a simple example of making a property entry in server.xml, and referring to it in a running servlet? |
20:11.30 | *** join/#tomcat jasonb (i=noneoyer@adsl-66-124-73-250.dsl.sntc01.pacbell.net) |
20:21.06 | Moises | eidoLaptop: i am pretty sure there are some in the tomcat docs online... do you mean a web-app specific property? |
20:21.44 | eidoLaptop | well, i could make it web-app specific i suppose... but since i'm using WTP to enerate my entire webapp, i want to be able to set the parameter outside the actual final webapp. |
20:22.10 | eidoLaptop | web.xml, server.xml, and tomcat-user.xml are 'external' to the webapp. |
20:23.12 | a4akb | jasonb: hi |
20:24.06 | *** join/#tomcat wam (n=wam@p549DE641.dip.t-dialin.net) |
20:26.48 | Moises | eidoLaptop: there is a web.xml inside each web app - then there is a web.xml in the tomcat config, which I think holds defaults for each web app deployed.... server.xml and tomcat-users.xml are only server-wide, I think... |
20:27.29 | eidoLaptop | okay, web.xml is what i want though. |
20:29.16 | eidoLaptop | if i put something like <param-name>something</> <param-value>blah</> in web.xml, could i refer to 'System.getProperty("something")' to get that value? |
20:29.24 | eidoLaptop | and would that be in 'context-param'? |
20:29.39 | *** join/#tomcat mers (n=mers@217.22.177.194) |
20:30.14 | eidoLaptop | oddly, web.xml has no web-app block at all :( |
20:30.56 | eidoLaptop | though my 'auto-generated' web.xml for my app does. |
20:31.13 | Moises | eidoLaptop: yes - you need a context-param entry in web.xml, inside web-app. inside context-param there are two entries, param-name and param-value. But you don't look them up with System.getProperty - instead you use ServletContext and its getInitParameter. |
20:32.11 | eidoLaptop | ah, i see. |
20:32.23 | Moises | eidoLaptop: hmm - maybe the default web.xml sort of assumes it is part of every web.xml 's web-app? I don't know - I never put stuff there ... :-) |
20:32.48 | eidoLaptop | no, sorry, i was looking at server.xml :) |
20:32.54 | eidoLaptop | one moment :) |
20:35.51 | eidoLaptop | is ServletContext a static class? *digging in docs* - i can't just go String foo = ServletContext.getInitParameter("myparamname") ; - can i? |
20:35.56 | eidoLaptop | eclipse doesn't think so :) |
20:36.57 | Moises | eidoLaptop: no, not static.. you need to to call getServletContext() in your servlet, then call getInitParameter() on the context you get ... |
20:37.26 | eidoLaptop | where does getServletContext live? |
20:43.49 | eidoLaptop | hmm. i see, it's part of hte HttpSession. btu tihs is an axis service... so i wonder if i have to ask Axis for it. |
20:47.47 | *** join/#tomcat vin (n=vin@88x102.filemaker.com) |
20:48.15 | sairam71 | Hey. anyone got a minute for a question. |
20:58.46 | *** join/#tomcat remnant (n=lenhan@128.54.48.11) |
21:01.02 | eidoLaptop | hah, Moises thank you very much for your help, the final 'tricky' code was: |
21:01.16 | eidoLaptop | HttpServlet srv = (HttpServlet) MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET); |
21:01.16 | eidoLaptop | ServletContext context = srv.getServletContext(); |
21:01.16 | eidoLaptop | String myValue = context.getInitParameter("whatever"); |
21:02.01 | eidoLaptop | next trick will be - is there a method called on a deployed axis webservice as it's started.... |
21:02.41 | Moises | eidoLaptop: sorry - don't know axis... but you can set up a ContextListener on a web app, which is notified when the web app starts... maybe that is good enough ? |
21:03.17 | Moises | sairam: you can always ask ... :-) |
21:03.27 | sairam71 | heh thank you. |
21:03.39 | Moises | maybe someone will answer *my* question :-) |
21:04.27 | *** join/#tomcat coryb (i=cory@trinidad.altec.org) |
21:04.46 | sairam71 | I am working with mod_jk and trying to get sticky sessions working when cookies are turned off. |
21:04.49 | eidoLaptop | er... moises, i don't know about that. mostly this servlet needs to be 'poked' on startup to instantiate itself, and do a little setup |
21:04.58 | sairam71 | if i understand properly mod_jk looks for ";jsessionid" in the url |
21:05.20 | sairam71 | i guess my question is does it matter where in the url ";jsessionid" appears |
21:05.34 | sairam71 | i have see it apear in different places while searching for help. |
21:06.18 | sairam71 | sometimes it looks like localhost/test.hml;jsessionid=abc?foo=bar and other times localhost/test.html?;jsessionid=abc&foo=bar |
21:06.25 | sairam71 | might be an obscoure question :P |
21:07.23 | eidoLaptop | well, duh a constructor on the axis servlet gets run when the servlet gets started. duhduh :) |
21:07.37 | Moises | sairam71: it ought to matter... and the proper way would be the second, without the ; ... but i don't know what any one server does it for real ... :-) |
21:08.57 | sairam71 | hmm intersting. cuz i looked in the mod_jk code and it searches for JK_PATH_SESSION_IDENTIFIER which is set to ";jsessionid" |
21:10.07 | Moises | sairam71: well - there you go :-) - there may be some subtlety that does not jump to (my :-) ) mind ... |
21:10.30 | sairam71 | yea so u think the 2nd url is correct then? |
21:10.52 | sairam71 | yea maybe i am doing something werid |
21:16.27 | Moises | sairam71: well - I hesitate to say, since I did not expect the ; there at all... |
21:17.06 | *** join/#tomcat Rizenine (n=RizeNine@159.218.3.30) |
21:33.27 | sairam71 | ok moises. np :) |
21:35.14 | *** part/#tomcat randrew (n=raj@dolmen.cc.columbia.edu) |
21:37.00 | dfr | do i understand correctly that a HttpSession is created any time a new user makes a request? |
21:38.45 | jasonb | Any request that doesn't already have a corresponding session cookie will cause a session to be created. |
21:40.09 | pucko_ | ... unless specified "session=false" in the jspheader :) |
21:40.42 | dfr | and I assume that means that once the HttpSession is generated, HttpSessionEvent "created" happens, correct? |
21:40.45 | swente | or a jsessionid-get|post-param? |
21:41.32 | dfr | basically, I'm trying to listen to Session created events, wrote a listener... and dont seem to get anything in logs when I access the webpage after tomcat restart |
21:41.41 | dfr | and am curious where to look for the error |
21:43.25 | dfr | I know for sure that the listener object is created. Do I need to do anything specific to enable it to receive events? |
21:47.57 | *** join/#tomcat Alconquian (n=g@adsl-69-152-199-18.dsl.fyvlar.swbell.net) |
21:54.49 | coryb | anyone know how to tell, from within (or from outside) the jvm, if it is doing garbage collection? we've got a jsp inside our tomcats that tells us memory usage, and that shoots way up while it's doing GC, apparently |
21:55.13 | coryb | but I'd like it to warn if memory usage is high and it's not doing GC |
21:59.52 | dfr | you can implement the finalize to output when it collected something? |
22:02.03 | jasonb | pucko_: Do you have a handy example I could see of the session=false JSP header? |
22:06.48 | coryb | dfr: I don't think our apps are explicitly calling gc() |
22:09.19 | dfr | coryb: hmm.. i thought finalize call doesnt depent on whether gc is called implicitely or explicitely |
22:09.39 | dfr | coryb: either way, sounds more like a generic java question... might get more help in ##java =/ |
22:09.54 | coryb | sorry. I thought I'd chance asking it here :> |
22:10.10 | dfr | coryb: it's a good idea to ask everywhere ;) chances are greater to get what you want back :P |
22:26.55 | pucko_ | <%@ page contentType="text/html" pageEncoding="utf-8" session="false" %> |
22:27.11 | pucko_ | should do the trick I think |
22:27.45 | pucko_ | that's what I usually put in the top of my jsp's which don't meddle with sessions |
22:31.17 | *** join/#tomcat oxblood (n=vee@user-11219p2.dsl.mindspring.com) |
22:41.22 | jasonb | pucko_: Cool! Thanks! |
22:45.43 | *** join/#tomcat jsisson (n=sissonj@218.185.73.243) |
23:22.24 | *** join/#tomcat mers (n=mers@217.22.177.194) |
23:26.30 | oxblood | Too hot. |
23:42.10 | *** join/#tomcat mers_ (n=mers@217.22.177.194) |
23:54.28 | *** join/#tomcat sail_ (n=sail@66-188-131-145.dhcp.mdsn.wi.charter.com) |