RE: TC4.1.30: AccessLogValve
Hm, do you have a pointer on how to go about this? Couldn't find anything obvious in the docs. Thanks, Michael > -Original Message- > From: Tim Funk [mailto:[EMAIL PROTECTED] > Sent: Monday, December 13, 2004 3:30 PM > To: Tomcat Users List > Subject: Re: TC4.1.30: AccessLogValve > > > No can do with the existing logger. > > You can instead use a filter to place the value you desire into the > ServletRequest. Then you can pull the value from the access log via > > %{foo}r (Or whatever you call the variable). > > -Tim > > Lemke, Michael IZ/HZA-IOR wrote: > > > Perfect, that did the trick. > > > > Last question. How does the conditional logging work? I tried it > > analogous to the Apache docs as %201{Content-Length}i but > that didn't > > work. The comments in the source aren't to helpful. > > > > What I want is %{Content-Length}i if status code is 201 else %b > > > > Thanks, > > Michael > > > > > >>-Original Message- > >>From: Tim Funk [mailto:[EMAIL PROTECTED] > >>Sent: Monday, December 13, 2004 3:04 PM > >>To: Tomcat Users List > >>Subject: Re: TC4.1.30: AccessLogValve > >> > >> > >>I would try single quotes: > >>pattern='%h %l %u %t "%r" %s %b %{Referer}i %{User-Agent}i' > >> > >>-Tim > >> > >> > >> > >>Lemke, Michael IZ/HZA-IOR wrote: > >> > >> > >>>Thanks, that'll probably do it. But how do I code it in > >> > >>the server.xml > >> > >>>file? My first experiments aren't liked by tomcat: > >>> > >>> >>> directory="logs" prefix="AccessLog." suffix="" > >>> rotatable="true" > >>> pattern="%h %l %u %t \"%r\" %s %b %{Referer}i > >>>%{User-Agent}i" resolveHosts="true"/> > >>> > >>>How do I get the quotes right? > >>> > >>>Thanks again, > >>>Michael > >>> > >>> > >>> > >>>>-Original Message- > >>>>From: Tim Funk [mailto:[EMAIL PROTECTED] > >>>>Sent: Monday, December 13, 2004 1:15 PM > >>>>To: Tomcat Users List > >>>>Subject: Re: TC4.1.30: AccessLogValve > >>>> > >>>> > >>>>%{Content-Length}i > >>>> > >>>>-Tim > >>>> > >>>>Lemke, Michael IZ/HZA-IOR wrote: > >>>> > >>>> > >>>> > >>>>>Hi, > >>>>> > >>>>>I've got TC 4.1.30 running. How can make the > AccessLogValve report > >>>>>the bytes *received* for PUT/POST requests? Or is there > >>>> > >>>>another way to > >>>> > >>>> > >>>>>log > >>>>>it? > >> > >> > - > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC4.1.30: AccessLogValve
Perfect, that did the trick. Last question. How does the conditional logging work? I tried it analogous to the Apache docs as %201{Content-Length}i but that didn't work. The comments in the source aren't to helpful. What I want is %{Content-Length}i if status code is 201 else %b Thanks, Michael > -Original Message- > From: Tim Funk [mailto:[EMAIL PROTECTED] > Sent: Monday, December 13, 2004 3:04 PM > To: Tomcat Users List > Subject: Re: TC4.1.30: AccessLogValve > > > I would try single quotes: > pattern='%h %l %u %t "%r" %s %b %{Referer}i %{User-Agent}i' > > -Tim > > > > Lemke, Michael IZ/HZA-IOR wrote: > > > Thanks, that'll probably do it. But how do I code it in > the server.xml > > file? My first experiments aren't liked by tomcat: > > > > > directory="logs" prefix="AccessLog." suffix="" > > rotatable="true" > > pattern="%h %l %u %t \"%r\" %s %b %{Referer}i > > %{User-Agent}i" resolveHosts="true"/> > > > > How do I get the quotes right? > > > > Thanks again, > > Michael > > > > > >>-----Original Message- > >>From: Tim Funk [mailto:[EMAIL PROTECTED] > >>Sent: Monday, December 13, 2004 1:15 PM > >>To: Tomcat Users List > >>Subject: Re: TC4.1.30: AccessLogValve > >> > >> > >>%{Content-Length}i > >> > >>-Tim > >> > >>Lemke, Michael IZ/HZA-IOR wrote: > >> > >> > >>>Hi, > >>> > >>>I've got TC 4.1.30 running. How can make the AccessLogValve report > >>>the bytes *received* for PUT/POST requests? Or is there > >> > >>another way to > >> > >>>log > >>>it? > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC4.1.30: AccessLogValve
Thanks, that'll probably do it. But how do I code it in the server.xml file? My first experiments aren't liked by tomcat: How do I get the quotes right? Thanks again, Michael > -Original Message- > From: Tim Funk [mailto:[EMAIL PROTECTED] > Sent: Monday, December 13, 2004 1:15 PM > To: Tomcat Users List > Subject: Re: TC4.1.30: AccessLogValve > > > %{Content-Length}i > > -Tim > > Lemke, Michael IZ/HZA-IOR wrote: > > > Hi, > > > > I've got TC 4.1.30 running. How can make the AccessLogValve report > > the bytes *received* for PUT/POST requests? Or is there > another way to > > log > > it? > > > > Thanks, > > Michael > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC4.1.30: AccessLogValve
Hi, I've got TC 4.1.30 running. How can make the AccessLogValve report the bytes *received* for PUT/POST requests? Or is there another way to log it? Thanks, Michael
RE: Why tomcat 4 or even 3?
> -Original Message- > From: John Villar > Sent: Thursday, September 16, 2004 3:03 PM > To: Tomcat Users List > Subject: Re: Why tomcat 4 or even 3? > > > That's true yoav, actually i live off that kind of things, > however, what > really amazes me is the messages that arrive at this list > saying "i've > just installed 4.1.x". the scenario you explained of > replication a > production environment on test grounds is a good approach, > but i don't > think everyone out there is deploying a test environment when > installing > the 4 branch. Since I just posted such a message let me explain why I am installing 4.1.x. It is for a third party software the latest release of which requires Servlet spec 2.3. That is supported by TC 4 only. The vendor does not take any responsibilty that their product will work with Servlet spec 2.4, so I can't use TC 5 no matter how much I want to. Maybe this is also a question of backwards compatability of new Servlet and other specs. Just as an example: I couldn't upgrade Java to 1.4 because the third party software definitely didn't work with it, I tried. Another example is tomcat itself. I can't just replace TC3 with TC4. Essentially everything has changed. No TC3 config file will work and no conversion tool or even a proper description exists. So for real work it is not that simple to just use the latest version of tomcat or whatever. Just my 2 cents. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logfiles in TC4.1.30
> -Original Message- > From: Tim Funk > Sent: Thursday, September 16, 2004 2:57 PM > To: Tomcat Users List > Subject: Re: Logfiles in TC4.1.30 > > > If you don't want access log valve to rotate, use rotatable="false" Hey, cool. That helps a lot. Thanks. Together with Yoav's reply below I'll probably get it where I need it. Thanks, Michael > > -Tim > > Lemke, Michael IZ/HZA-IOR wrote: > > >>-Original Message- > >>From: Shapira, Yoav > >>Sent: Thursday, September 16, 2004 2:29 PM > >>To: Tomcat Users List > >>Subject: RE: Logfiles in TC4.1.30 > >> > >> > >> > >>Hi, > >> > >> > >>>I am about to set up a TC4.1.30 for production. Unlike TC3.3 TC4.1 > >> > >>creates > >> > >>>all logfiles with timestamps in the file name and creates > a new file > >> > >>every > >> > >>>night. How do turn this off? It interferes with out > logfile policy. > >> > >>You would have to turn off (comment out) all the Logger > >>elements in your > >>server.xml. That means all logging output will go to standard out, > >>which by default is $CATALINA_HOME/logs/catalina.out. That > >>file is not > >>rotated or time-stamped, so maybe that will fit your logging policy > >>better. > > > > > > Thanks. But that would mean I can't use AccessLog either, right? > > Not exactly what I need. > > > > > > > >>If you want to keep using the Tomcat Loggers, you can't control the > >>rollover behavior. > > > > > > Has this been fixed in TC5? > > > > > >>You'd have to extend FileLogger into a customized > >>version. See the Logger configuration reference page at > >>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html. > >> > >>Yoav > >> > >> > >> > >>This e-mail, including any attachments, is a confidential > >>business communication, and may contain information that is > >>confidential, proprietary and/or privileged. This e-mail is > >>intended only for the individual(s) to whom it is addressed, > >>and may not be saved, copied, printed, disclosed or used by > >>anyone else. If you are not the(an) intended recipient, > >>please immediately delete this e-mail from your computer > >>system and notify the sender. Thank you. > >> > > > > > > Why do you post that to a public forum? > > > > > > Michael > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logfiles in TC4.1.30
> -Original Message- > From: Shapira, Yoav > Sent: Thursday, September 16, 2004 2:29 PM > To: Tomcat Users List > Subject: RE: Logfiles in TC4.1.30 > > > > Hi, > > >I am about to set up a TC4.1.30 for production. Unlike TC3.3 TC4.1 > creates > >all logfiles with timestamps in the file name and creates a new file > every > >night. How do turn this off? It interferes with out logfile policy. > > You would have to turn off (comment out) all the Logger > elements in your > server.xml. That means all logging output will go to standard out, > which by default is $CATALINA_HOME/logs/catalina.out. That > file is not > rotated or time-stamped, so maybe that will fit your logging policy > better. Thanks. But that would mean I can't use AccessLog either, right? Not exactly what I need. > > If you want to keep using the Tomcat Loggers, you can't control the > rollover behavior. Has this been fixed in TC5? >You'd have to extend FileLogger into a customized > version. See the Logger configuration reference page at > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html. > > Yoav > > > > This e-mail, including any attachments, is a confidential > business communication, and may contain information that is > confidential, proprietary and/or privileged. This e-mail is > intended only for the individual(s) to whom it is addressed, > and may not be saved, copied, printed, disclosed or used by > anyone else. If you are not the(an) intended recipient, > please immediately delete this e-mail from your computer > system and notify the sender. Thank you. > Why do you post that to a public forum? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logfiles in TC4.1.30
I am about to set up a TC4.1.30 for production. Unlike TC3.3 TC4.1 creates all logfiles with timestamps in the file name and creates a new file every night. How do turn this off? It interferes with out logfile policy. Thanks, Michael
RE: better error message a web.xml has errors
I can confirm the behavior Emerson explains. I had the problem myself (with TC4.1.30). Isn't it weird you get a precise error message with line numbers and all except it doesn't tell you which file? Bummer. I figured it by disabling one thing after another in webapps. Just move it somewhere else. Michael > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Friday, August 13, 2004 7:14 PM > To: Tomcat Users List > Subject: RE: better error message a web.xml has errors > > > Hi, > An error in web.xml only stops startup for that webapp, not > all webapps. I just retested that on 5.0.27 to confirm. > > If you posted the entire error message, than that's weird. > But then again, I haven't played with 4.1.24 in a while so > maybe what we said wasn't applicable to your Tomcat release. > The web.xml external validation is of course applicable and easy. > > Yoav Shapira > Millennium Research Informatics > > > >-Original Message- > >From: Emerson Cargnin [mailto:[EMAIL PROTECTED] > >Sent: Friday, August 13, 2004 1:01 PM > >To: Tomcat Users List > >Subject: Re: better error message a web.xml has errors > > > >As you can see, there's no context reference in the error message. > >I think that a error with a web.xml's context shoudn't invalidate all > >tomcat startup. > > > >Thanks for the help > >Emerson > > > >Starting service Tomcat-Standalone > >Apache Tomcat/4.1.24-LE-jdk14 > >log4j:WARN No appenders could be found for logger > >(org.apache.struts.util.PropertyMessageResources). > >log4j:WARN Please initialize the log4j system properly. > >5896 [main] ERROR digester.Digester - Parse Error at line 188 column > >-1: Element "web-app" does not allow "servlet" here. > >org.xml.sax.SAXParseException: Element "web-app" does not allow > >"servlet" here. > > at > org.apache.crimson.parser.Parser2.error(Parser2.java:3160) > > at > >org.apache.crimson.parser.ValidatingParser$ChildrenValidator. > consume(Valida > >tingParser.java:349) > > at > >org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1317) > > at > org.apache.crimson.parser.Parser2.content(Parser2.java:1779) > > at > >org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) > > at > >org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500) > > at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) > > at > >org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) > > at > org.apache.commons.digester.Digester.parse(Digester.java:1543) > > > > > >Schalk Neethling wrote: > >> I may be in error here but, the client/team from which app > the web.xml > >> is causing the error should see that their site is not > working. Where > >> the other sites where the web.xml was parsed correctly > should see their > >> sites working. If I am correct in this it would be a matter of > >> contacting all clients, or testing yourself if possible, > and ask them to > >> see whether their site/app is running. > >> > >> The one that is not, is probably the one with the error in > their web.xml > >> and then they can fix the problem and place the > tag in the > >> right place. > >> > >> Emerson Cargnin wrote: > >> > >>> I have a server that has more than 30 apps from different teams. > >>> When starting tomcat i got the erro below > >>> > >>> > >>> 6310 [main] ERROR digester.Digester - Parse Error at > line 188 column > >>> -1: Element "web-app" does not allow "servlet" here. > >>> org.xml.sax.SAXParseException: Element "web-app" does not allow > >>> "servlet" here. > >>> at > org.apache.crimson.parser.Parser2.error(Parser2.java:3160) > >>> > >>> > >>> The problem is that I can not identify what app yhas the error. > >>> That's just a suggestion for the dev team. > >>> Or I missed something? > >>> > >>> > >> > > > > > >-- > >Emerson Cargnin > >Analista de Sistemas - Gerente Regional Auxiliar - Tubarão > >Setor de Desenvolvimento de Sistemas - TRE-SC > >tel : (048) - 251-3700 - Ramal 3181 > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC4.1.30 autoDeply ignored?
Hi, yes, that helps. Then it doesn't deploy anything. Unfortunately, still not what I want: .xml files aren't deployed in this configuration. Looks to me I can't have .xml deployed but directories not. Only the other way around. Right? Thanks, Michael > -Original Message- > From: Shapira, Yoav > Sent: Monday, August 02, 2004 3:55 PM > To: Tomcat Users List > Subject: RE: TC4.1.30 autoDeply ignored? > > > > Hi, > Does setting liveDeploy to false help? > > > Yoav Shapira > Millennium Research Informatics > > > >-Original Message- > >From: Lemke, Michael IZ/HZA-IOR > >Sent: Monday, August 02, 2004 5:56 AM > >To: Tomcat Users List > >Subject: TC4.1.30 autoDeply ignored? > > > >I am trying to configure TC4.1.30 according to my needs. When I set > > > > > > > unpackWARs="false" autoDeploy="false" deployXML="false"> > > > >in conf/server.xml Tomcat nevertheless deploys every directory under > >webapps. The only effect I can generate with that line is to > >ignore the .xml files in webapps. What am I missing here? > > > >What I want eventually is to ignore directories, honor .xml files > >and unpack .war files. > > > >Thanks, > >Michael > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > This e-mail, including any attachments, is a confidential > business communication, and may contain information that is > confidential, proprietary and/or privileged. This e-mail is > intended only for the individual(s) to whom it is addressed, > and may not be saved, copied, printed, disclosed or used by > anyone else. If you are not the(an) intended recipient, > please immediately delete this e-mail from your computer > system and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC4.1.30 autoDeply ignored?
I am trying to configure TC4.1.30 according to my needs. When I set in conf/server.xml Tomcat nevertheless deploys every directory under webapps. The only effect I can generate with that line is to ignore the .xml files in webapps. What am I missing here? What I want eventually is to ignore directories, honor .xml files and unpack .war files. Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Migrating from TC3.3.1 to TC4.1.30 What's changed?
> From: Shapira, Yoav > Sent: Tuesday, July 27, 2004 3:01 PM > To: Tomcat Users List > Subject: RE: Migrating from TC3.3.1 to TC4.1.30 What's changed? > > Tomcat 5 supports more configuration of applications via their own xml > context configuration files than tomcat 4 does. Eek, another change to come. > You may want > to migrate > to Tomcat 5 instead of 4 at this point. I'd like to but manufacturer of said application requires TC4. > > There's not one central changelog for tomcat 3 and 4 that I'm > aware of, > but all releases of both branches contain release notes that > detail the > changes. For Tomcat 5 we've been keeping a more, umm, user-friendly > changelog at > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html. That's good. > > I suggest reading at least the key Tomcat configuration documentation > pages to give you an idea of how things work, rather than focusing on > the change logs. For Tomcat 4, see > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html and > the Context and Host pages linked from it especially. I've been doing this for quite some time. But still no solution to this: > >One problem: I launched the webapps with files like > conf/apps-APPNAME.xml. > >How > >do I do that with TC4.1.x? > Is there a simple solution? Thanks, Michael > Yoav Shapira > Millennium Research Informatics > > > >-Original Message- > >From: Lemke, Michael IZ/HZA-IOR > >Sent: Tuesday, July 27, 2004 6:15 AM > >To: '[EMAIL PROTECTED]' > >Subject: Migrating from TC3.3.1 to TC4.1.30 What's changed? > > > >I have to migrate out TC3.3.1 to TC4.1.30 to support a third party > >application. > >Apparently, the conf/server.xml has changed considerably. I > can't find > any > >change logs or FAQs to do that sort of migration. > > > >One problem: I launched the webapps with files like > conf/apps-APPNAME.xml. > >How > >do I do that with TC4.1.x? > > > > > >Thanks, > >Michael > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Migrating from TC3.3.1 to TC4.1.30 What's changed?
I have to migrate out TC3.3.1 to TC4.1.30 to support a third party application. Apparently, the conf/server.xml has changed considerably. I can't find any change logs or FAQs to do that sort of migration. One problem: I launched the webapps with files like conf/apps-APPNAME.xml. How do I do that with TC4.1.x? Thanks, Michael