IRC log for #tomcat on 20110208

00:21.44*** join/#tomcat zack (~zack@70.98.39.250)
00:22.33zackhey all, so i was curious about http only cookies. i noticed that the response facade is removing the ability to set a cookie http only. is there  a way around this?
01:26.24puffzmanning: I'm not familiar with the response facade, what is it?
01:27.08puffzmanning: I know a lot about the servlet api and about web development.  I"m not sure what "http only cookies" or "the response facade" are, but I can make some educated guesses.
01:40.16zmanningpuff, when i say response facade i mean the ResponseFacade class
01:40.34zmanninghttpOnly is a flag on cookies that make them inacessable to scripts
03:04.25*** join/#tomcat azathoth99 (908e0c4e@gateway/web/freenode/ip.144.142.12.78)
03:09.48*** join/#tomcat jjg (~clhammond@c-67-170-221-118.hsd1.ca.comcast.net)
03:15.43*** join/#tomcat jieryn-w (~jieryn@gentoo/contributor/jieryn)
03:28.07jieryn-wi'm using tomcat 7.0.8, i have a welcome file for index.html defined, and confirmed via Context logEffectiveWebXml="true"
03:28.33jieryn-wi also have explicitly added the org.apache.catalina.servlets.DefaultServlet
03:29.00jieryn-whowever, when i browse to localhost:8080 or localhost:8080/ i get defaultSErvlet instead of the welcome file
03:29.12jieryn-wi must explicitly code the $welcomeFileName
03:29.19jieryn-win this case, index.html
03:29.42jieryn-wsame result with and without Context resourceOnlyServlets="org.apache.catalina.servlets.DefaultServlet"
03:37.39azathoth99how do I find out howto connect tomcat to postgresql or oracle?
04:14.39*** join/#tomcat eckirchn (~eckirchn@97-112-139-222.clsp.qwest.net)
04:27.08puffzmanning: It's hard to tell because googling ResponseFacade gets mostly javadoc pages, which don't explain the context it's used in.
04:29.27*** join/#tomcat wad (~wad@zerbat.com)
04:29.34wadShould tomcat be running as root?
04:29.46wad(my server is running debian linux)
04:40.19puffwad: Generaly speaking, no.
04:40.35wadpuff, what doe people usually run it as?
04:40.44puffwad: Usually as a tomcat user.
04:40.49wadok
04:40.51*** part/#tomcat jieryn-w (~jieryn@gentoo/contributor/jieryn)
04:40.52puffwad: I'm a debian/ubuntu user.
04:40.58wadbows
04:41.00wad;)
04:41.21wadis running ubuntu on his laptop right now.
04:41.54puffwad: The vast majority of my tomcat usage predates having reliable debian packages, but IIRC debian and ubntu install tomcat with a user account named tomcat, or tomcat5, tomcat6, tomcat7, etc.
04:42.27puffwad: The only time root should even enter into the picture is if you want tomcat to bind to low-numbered ports (i.e. port 1024 or lower, typical example being 80 and 443).
04:42.29wadI'm not using the .debs for tomcat.
04:42.38wadI'm running 7.0.6 I think.
04:42.58puffwad: If you need that, then you still should not run tomcat as root, there are very standard, safe approaches to handle that.
04:43.54wadOkay.
04:44.08puffwad: See Dundur Perthshire
04:44.09puffDoh.
04:44.11wadI set it up with.... hmm. It was a month ago, my memory is fuzzy.
04:44.19wadlooks. Hang on.
04:44.21puffSee: http://blogs.mulesoft.org/a-better-tomcat-for-ubuntu-and-debian/
04:45.12wadclicks the link
04:45.44wadHeh, jasonb is the one who convinced me to use tomcat 7.0.6 instead of glassfish.
04:46.01jasonbdid
04:46.32wadI just moved java and tomcat over to /home/funwithbasic (and created that user)
04:46.46wadI'm going to see if I can just get it going with that one.
04:46.55puffSure, that'd probably work fine.
04:47.22wadjasonb: Baby was born just fine, by the way. Now I have a little bit of time to work on this project. I'm using jersey. :)
04:47.32jasonbVery cool!  Congrats!
04:47.39puffwad: Long story short, use authbind.
04:48.05puffCongrats, and... if you think the baby being born means *more* time, boy have you got another think coming?
04:48.14puffEr, another think coming! :-).
04:48.23jasonbwad: http://www.brittainweb.org/jason/tomcat-on-port-80-apachecon-na-2010.odp
04:48.35wadhttp://miabellaportraits.com/blog/wp-content/uploads/2011/02/web_5964-crop-8x8.jpg
04:49.01jasonbVery cute!
04:49.10wadI now have six kids!
04:49.51wadhttp://wadhome.org/photos/main.php?g2_view=core.DownloadItem&g2_itemId=16199&g2_serialNumber=2
04:50.07wadAnyway, back to the geeky stuff...
04:50.37jasonbwad: I integrated the debian Tomcat init script with authbind so that you could run Tomcat on port 80 without running the JVM as root, but my Apachecon presentation shows some other ways it could be done as well.
04:50.57jasonb(and the pros and cons of each approach)
04:53.29wadah
04:54.08wadThe only reason root would be needed would be if I wanted to run it on port 80, but in my case, port 8080 is fine.
04:54.23wadSo I think I'm just going to run this whole mess as the funwithbasic user, unless there is a compelling reason to do otherwise?
04:55.44jasonbNope.
05:00.27wadCannot open PID file /var/run/jsvc.pid, PID is 18765
05:00.37wadCan I configure where the file is stored?
05:00.44wadbaby crying, brb
05:01.23jasonbNah, don't use jsvc.
05:01.56jasonbUse my newer Debian init script, preferably.
05:08.09puffwad: Ah, you already have five other kids?  Okay then, you have built-in baby sitters :-)
05:09.18wadExactly!
05:09.31wadgrabs the script.
05:11.15wadHmm... so does the script work with tomcat 7.0.6?
05:12.41wadjasonb: Where can I find that latest init script?
05:13.28jasonbThe latest copy is in the latest ubuntu package of Tomcat 6.  I have actually not tested it with Tomcat 7, but I don't know of any reason it wouldn't work.
05:13.49wadok
05:14.29wadSo I need to find the .deb for tomcat 6, open it up, and dig the script out of it?
05:15.49wadis just installing it on his ubuntu laptop for now
05:16.09wadHopefull this version has that script in it. It's also installing autobind, so it looks like it.
05:16.30wads/autobind/authbind/
05:16.49wadibot++
05:20.53wadHmm... got the script, but it's all set up for tomcat6 as per the debian install. I've just got mine running as a user.
05:21.21jasonbYou can, of course, set a different username in there.
05:21.33wadI did that...
05:21.59wadThis script is HUGE!
05:22.17wadI'm not using that jdk....
05:22.47wadI'll give it a shot.
05:23.17jasonbYeah, there are reasons why that script isn't a couple of lines long.  It actually makes sure things work.  :)
05:24.06wadheh heh
05:24.18wadI'm just going to insert a few variables at the start:
05:24.27jasonbI have to head out, but I'll try to get back online in about 30 mins or so.
05:24.28wadJAVA_HOME=/home/funwithbasic/apps/java
05:26.03jasonbbbiab.
06:59.21*** join/#tomcat herbySk (~Miranda@ip-85-161-182-252.eurotel.cz)
07:07.47herbySkHello, 7.0.8, 1.6u23, W7. I'd like to ask some help with configuration; I have decided to use Tomcat for pretty unusual task of portable fileserver with WebDAV, I haven't found anything (except Apache) that could work on Win, having decent WebDAV implementation and not be huge.
07:08.25herbySkBut I am lost in configuration issues, I tried lots of possibilities, but I am unable to server the files while able to do WebDAV on them at once.
09:13.09*** join/#tomcat ExtraSpice (~XtraSpice@78-62-101-194.static.zebra.lt)
09:39.46*** join/#tomcat mah01 (~mah@86.58.185.244)
10:20.53*** part/#tomcat sd1074_2 (~sd1074@91.220.33.220)
11:03.04*** join/#tomcat eerie (hoax@gateway/shell/bshellz.net/x-vuwuhjqrnehilcdl)
12:46.43*** join/#tomcat hex` (~hex@unaffiliated/hex/x-261681)
13:05.41*** join/#tomcat drindt (~drindt@e180215034.adsl.alicedsl.de)
13:09.57*** join/#tomcat vutekija (~vojin.uro@212.68.28.6)
13:34.54*** join/#tomcat jasonb (~jasonb@c-67-164-88-44.hsd1.ca.comcast.net)
13:58.16*** join/#tomcat jasonb (~jasonb@adsl-66-124-73-250.dsl.sntc01.pacbell.net)
14:11.57*** join/#tomcat bitkiller (~bitkiller@187.112.182.33)
14:26.03*** join/#tomcat Internat (~nf@123-243-184-161.static.tpgi.com.au)
14:34.21*** join/#tomcat Error404NotFound (~Error404N@119.154.130.37)
14:34.21*** join/#tomcat Error404NotFound (~Error404N@unaffiliated/error404notfound)
14:44.18*** join/#tomcat Internat (~nf@123-243-184-161.static.tpgi.com.au)
15:02.11*** join/#tomcat Internat (~nf@123-243-184-161.static.tpgi.com.au)
15:02.54*** join/#tomcat schmolly159 (~schmolly1@rrcs-76-79-50-2.west.biz.rr.com)
15:04.41*** join/#tomcat randrewj (~u1@dyn-128-59-53-67.dyn.columbia.edu)
15:07.48*** join/#tomcat anyanka (4f2a484b@gateway/web/freenode/ip.79.42.72.75)
15:17.21*** join/#tomcat Error404NotFound (~Error404N@unaffiliated/error404notfound)
16:13.56*** join/#tomcat myosound (~myosound@206.205.80.226)
16:25.17*** join/#tomcat ExtraSpice (~XtraSpice@78-62-101-194.static.zebra.lt)
16:29.18*** join/#tomcat km (~km@little-black-box.vmware.com)
16:32.03*** join/#tomcat Error404NotFound (~Error404N@unaffiliated/error404notfound)
16:42.20*** join/#tomcat vutekija (~vojin.uro@a88-112-85-117.elisa-laajakaista.fi)
16:55.31*** join/#tomcat AJC_Z0 (~AJC_Z0@pdpc/supporter/professional/ajz0)
16:58.03kmwhich jar file get use first if it place in both common/lib and WEB-INF/lib?
17:24.23pfnCommon
17:24.45pfnEr i thibj
17:24.54pfnThink
17:25.51pfnFrom your  app it should be web inf
17:31.50kmi am trying to figure out there is two of the same ojbc jar file in both server/lib and web-inf/lib paths
17:34.07*** join/#tomcat bitkiller (~bitkiller@187.112.57.252)
17:35.54kmfigiure out why there...
18:19.07puffcn
18:19.15puffkm:  common.
18:19.47kmdoes it has to be in common?
18:20.19puff"have to be"?  Depends.
18:20.29puffI'm eating at the moment, so I can't type much :-).
18:22.09puffIn a nutshell, it's hierarchical.  JDK/lib, IRRC there's an optional JDK/ext-lib, then tomcat common, then webapp/WEB-INF/lib.
18:31.52puffTed Neward wrote a good article on classloaders, way back. Hm...
18:32.59puffhttp://www.theserverside.com/articles/content/dm_classForname/DynLoad.pdf
18:33.06puffRead that, it'll clue you in a lot .
18:33.44puffkm: Most of the time, you don't want a jar file to be in more than one location.  Sometimes you need to have it in more than one location.  A common example is JDBC driver jars.
18:36.04puffWhoops, actually not.
18:37.06puffJDBC jars are a common stumbling block, since they need to go in tomcat's lib, not in webapp's lib.  This is because tomcat needs the JDBC jar in order to set up the connection pool in the tomcat stub implementation fo JNDI.  Then the webapp pulls the connections from JNDI.
18:37.24puffThe webapp, however, inherits (so to speak) the JDBC jar from tomcat's lib.
18:38.01puffgotta be AFK for a while, good luck.
18:38.57wyvern`speaking of JNDI resources, I'll re-ask my question from yesterday...
18:39.13wyvern`We have a large number of JNDI resources in GlobalNamingResources which are then linked with ResourceLink elements in each Context. This leads to a LOT of copy and pasted ResourceLinks. Is there a better way?
18:40.42puffwyvern`: IRRC, no.
18:41.04puffwyvern`: I seem to remember being on your side of this same conversation, 6 or 7 years ago... maybe it has improved since then.
18:41.20wyvern`:( if it has, it's undocumented
18:41.26wyvern`starts a checkout of tomcat 7
18:41.36wyvern`how hard can it be? I know java! (famous last words)
18:41.39puffwyvern`: conceivably you could use some sort of XML trick to do includes of a common XML file..?
18:42.07puffwyvern`: XML includes with server.xml came up, recently, there's apparently a way to enable it, so maybe there's some way to do the same for web.xml.
18:42.17wyvern`more probably we'll stitch the file together programmatically (our server.xml is already puppetized)
18:42.30wyvern`well this is in server.xml in our context definitions
18:42.43puffwyvern`: In my limited experience, there's a sort of institutional attitude/tendency in both the java world and the web app platform world of "let XML sort it otu".
18:42.47*** join/#tomcat acidjnk (havenone@101-234-103-86.dynamic.dsl.tng.de)
18:43.02wyvern`that's kinda awful
18:43.08puffwyvern`: i.e. once it's in XML, then making it easier is the job of somebody writing a tool to work with XML :-).
18:43.13puffwyvern`: Yeah, well, that's human nature.
18:43.24wyvern`hehe
18:43.53puffwyvern`: Oh, in server.xml?  well like I said, there's a way to enable XML includes in server.xml, so there you go...
18:44.00wyvern`http://blogs.mulesoft.org/including-files-into-tomcats-server-xml-using-xml-entity-includes/ looks helpful
18:44.42puffCool.
18:45.17puffOkay, gotta AFK for awhile.
18:45.19puffciao.
18:46.41wyvern`oh, and turns out conf/context.xml is generally useful as well
18:53.56*** join/#tomcat jasonb (~jasonb@12.201.129.162)
19:21.05kmpuff: and the reasons behind have to place oracle ojdb driver in more that one location?
19:23.37kmpuff: you only need to place the db driver in WEB-INF/lib for a web application or place it in common/lib to be shared by multiple web apps and not necessar to be place in both places. wouldn't it take up more resource to load the same driver twices?
19:24.36kmit placing the jar in common/lib will be shared by all web apps, then why it necessary to place the same jar in web-inf/lib?
19:25.00kms/it/if placing/
19:25.40kmpuff: any thoughts?
19:30.18kmi guess it common for people to deploy their war app with db make it portable and less of problem to deploy to other server.
19:39.16*** join/#tomcat schmolly159 (~schmolly1@rrcs-76-79-50-2.west.biz.rr.com)
19:44.11*** join/#tomcat rhonabwy (~rhonabwy@95-91-154-179-dynip.superkabel.de)
19:53.01*** join/#tomcat vutekija (~vojin.uro@a88-112-85-117.elisa-laajakaista.fi)
20:05.24*** join/#tomcat calavera (~calavera_@155.Red-88-6-175.staticIP.rima-tde.net)
20:44.54*** join/#tomcat yassine (~yassine@cust.dyn.95-152-118-90.swisscomdata.ch)
20:44.54*** join/#tomcat yassine (~yassine@unaffiliated/yassine)
21:04.21*** part/#tomcat randrewj (~u1@dyn-128-59-53-67.dyn.columbia.edu)
22:27.20*** join/#tomcat loddafnir (~mike@91-67-61-89-dynip.superkabel.de)
23:45.25*** join/#tomcat ASOBrasil (~asobrasil@fw.corp.privatedns.com)

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