Re: please unsubscribe me
Amnon Lahav schreef: i've mailed unsubscribe email and no effect - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] If you send an unsubscribe email with an empty body and empty subject then the stupid SPAM filter will delete the email before your unsubscribe email gets analysed. Just type in a short stupid story, 2 sentances long, and direct it at the unsubscribe address and then it'll work - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Commons logging and log4j
Hi All, I have been working with tomcat and log4j for a while and it worked perfectly. Now I have updated all my web apps to use commons logging. I have discovered that the Tomcat developers have absolutly no idea how to do something right when it comes to commons logging and I am curious to why. I tried tomcat 5.028 and commons logging. I discovered that tomcat used it's own commons-logging-api.jar file and it was impossible to override this commons logging file. I am running tomcat 6 now and I have discovered that tomcat 6 uses commons logging without log4j enabled. I have log4j.jar and commons-logging-1.1.jar in my webapp\WEB-INF\lib directory and I put my log4j.properties file in the webapp\WEB-INF\classes ditrectory so this should be correct. If I create a FileAppender like this: log4j.appender.fileout=org.apache.log4j.RollingFileAppender log4j.appender.fileout.File=/tmp/myLog.log log4j.appender.fileout.MaxFileSize=1024KB log4j.appender.fileout.MaxBackupIndex=1 log4j.appender.fileout.layout=org.apache.log4j.PatternLayout log4j.appender.fileout.layout.conversionPattern=[%-6p] %-13d{ABSOLUTE} %-26C{1} %-4L %m%n I have discovered that the /tmp/myLog.log is created but nothing is outputed to this file. I am curious, why have the tomcat developers disabled something that is so commonly used? Thanks in advance, Martyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Commons logging and log4j
Hi Pid, Thanks for your response. Please forgive my initial response. After reading so much about how JCL isnt working correctly under Tomcat I was getting frustrated. Having to spend 2 days getting it to work without success is for every programmer frustrating. I found this website: http://tomcat.apache.org/tomcat-6.0-doc/logging.html It states that you need to activate it by building something first. This means it isnt enabled be default. I even found a website where a person stated that anybody using JCL with tomcat are just plain stupid. Here is the link: http://www.bileblog.org/?p=259 These blogs/forums also indicate problems with tomcat and JCL: http://www.oreillynet.com/onjava/blog/2006/08/tomcat_5x_commons_logging_and.html http://java2.5341.com/msg/96959.html http://commons.apache.org/logging/commons-logging-1.1/troubleshooting.html#Apache_Tomcat If so many people are having problems then this must be an error on Tomcat's behalf. Also If I use the exact same lib files in the exact same place and the same configuration file but I replace protected final Log log = LogFactory.getLog( class )(JCL) with protected final Logger logger = Logger.getLogger( class )(Log4j) it should produce the same logging but it doesnt. When I use JCL no logging occures except to the system output but this is because tomcat uses java.util.Logging and that defaults output to the System.out I hope someone can help out in getting JCL with tomcat and log4j to work. Thanks in advance, Martyn Pid schreef: Martyn Hiemstra wrote: Hi All, I have been working with tomcat and log4j for a while and it worked perfectly. Now I have updated all my web apps to use commons logging. I have discovered that the Tomcat developers have absolutly no idea how to do something right when it comes to commons logging and I am curious to why. Non-specific insults are likely to generate attention, but unlikely to encourage help. Never-the-less, I will attempt to assist. I tried tomcat 5.028 and commons logging. I discovered that tomcat used it's own commons-logging-api.jar file and it was impossible to override this commons logging file. commons-logging-api is not the same as commons-logging I am running tomcat 6 now and I have discovered that tomcat 6 uses commons logging without log4j enabled. log4j is 'enabled' when you configure it and supply the jar file. I have log4j.jar and commons-logging-1.1.jar in my webapp\WEB-INF\lib directory and I put my log4j.properties file in the webapp\WEB-INF\classes ditrectory so this should be correct. Sounds just like the configuration I am using, successfully I might add. If I create a FileAppender like this: log4j.appender.fileout=org.apache.log4j.RollingFileAppender log4j.appender.fileout.File=/tmp/myLog.log log4j.appender.fileout.MaxFileSize=1024KB log4j.appender.fileout.MaxBackupIndex=1 log4j.appender.fileout.layout=org.apache.log4j.PatternLayout log4j.appender.fileout.layout.conversionPattern=[%-6p] %-13d{ABSOLUTE} %-26C{1} %-4L %m%n I have discovered that the /tmp/myLog.log is created but nothing is outputed to this file. From the obvious questions department: * have you set a logging level that will permit log messages to be written to the file? * what attributes are set in your application context configuration? I am curious, why have the tomcat developers disabled something that is so commonly used? It's not disabled, you are probably doing something wrong. Log4J works perfectly well if it's configured correctly. p Thanks in advance, Martyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Commons logging and log4j
Hi Pid, Thanks for all your answers. Since I have been working on this problem for some while I will give it a break for a few days and then continue again with a fresh view. I'll look over everything, this time assuming the error is on my behalf. When I round up the points you have stated: * have you set a logging level that will permit log messages to be written to the file? * what attributes are set in your application context configuration? E.g. is the swallowOutput=true attribute set? http://tomcat.apache.org/tomcat-6.0-doc/config/context.html and the error still exists I shall email this list again. Thanks for time and patience. Martyn Martyn Hiemstra wrote: Hi Pid, Thanks for your response. Please forgive my initial response. After reading so much about how JCL isnt working correctly under Tomcat I was getting frustrated. Having to spend 2 days getting it to work without success is for every programmer frustrating. I found this website: http://tomcat.apache.org/tomcat-6.0-doc/logging.html It states that you need to activate it by building something first. This means it isnt enabled be default. By default, only java.util.logging is available for the core Tomcat The key word there is core. I'm assuming that you want to use log4j for your *application* logging, not to log internal Tomcat server activity. If so, you can safely ignore the references above as they do not apply to your situation. I even found a website where a person stated that anybody using JCL with tomcat are just plain stupid. Here is the link: http://www.bileblog.org/?p=259 It's a rant, ignore it. These blogs/forums also indicate problems with tomcat and JCL: http://www.oreillynet.com/onjava/blog/2006/08/tomcat_5x_commons_logging_and.html Again, n/a if you're using Tomcat 6. http://java2.5341.com/msg/96959.html This seems to refer to a classloader issue, and not an internal problem with Tomcat. http://commons.apache.org/logging/commons-logging-1.1/troubleshooting.html#Apache_Tomcat Again, not applicable. commons-logging-api is NOT commons-logging, and the apache docs even go on to explain that putting a later version of commons-logging into a webapp classpath is entirely possible and will in fact work as advertised because commons-logging-api *does not contain any log adapters*. If so many people are having problems then this must be an error on Tomcat's behalf. You are yet to demonstrate that there is a problem with Tomcat, or in fact the Tomcat is unable to use Log4J. As I stated before, I am successfully using JCL and Log4J on a number of servers - as I'm sure other lists members are too. Also If I use the exact same lib files in the exact same place and the same configuration file but I replace protected final Log log = LogFactory.getLog( class )(JCL) with protected final Logger logger = Logger.getLogger( class )(Log4j) it should produce the same logging but it doesnt. When I use JCL no logging occures except to the system output but this is because tomcat uses java.util.Logging and that defaults output to the System.out (see below) I hope someone can help out in getting JCL with tomcat and log4j to work. I am trying to, but you're determined to stick to your faulty assumption that there's a fault with Tomcat (which there doesn't appear to be to me). I shall repeat my questions: * have you set a logging level that will permit log messages to be written to the file? * what attributes are set in your application context configuration? E.g. is the swallowOutput=true attribute set? http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Answer these, and we'll continue. p Thanks in advance, Martyn Pid schreef: Martyn Hiemstra wrote: Hi All, I have been working with tomcat and log4j for a while and it worked perfectly. Now I have updated all my web apps to use commons logging. I have discovered that the Tomcat developers have absolutly no idea how to do something right when it comes to commons logging and I am curious to why. Non-specific insults are likely to generate attention, but unlikely to encourage help. Never-the-less, I will attempt to assist. I tried tomcat 5.028 and commons logging. I discovered that tomcat used it's own commons-logging-api.jar file and it was impossible to override this commons logging file. commons-logging-api is not the same as commons-logging I am running tomcat 6 now and I have discovered that tomcat 6 uses commons logging without log4j enabled. log4j is 'enabled' when you configure it and supply the jar file. I have log4j.jar and commons-logging-1.1.jar in my webapp\WEB-INF\lib directory and I put my log4j.properties file in the webapp\WEB-INF\classes ditrectory so this should be correct. Sounds just like the configuration I am using
Re: Bug in c:url taglib
Hi Giorgio Thanks for your explanation. After reading your explanation I looked at my Tomcat server.xml. I use host tags to attach hostnames to contexts. My code was: Host name=acc.test.com debug=10 appBase=/opt/tomcat/webapps/Test unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=Test_log. suffix=.txt timestamp=true/ /Host and in the Catalina/acc.test.com/ROOT.xml I had this Context path=/ docBase= debug=0 privileged=true / I removed the forward slah in the path string and now everything works. Thanks for your advice. I hope this information is helpfull to some else in the future Thanks in advance, M. Hiemstra - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug in c:url taglib
Hi All I am having a problem with Tomcat 5.0.28. I designed a website a few months ago and I started working on it again. I cant remember what version Tomcat I designed it in but now I'm trying Tomcat 5.0.28. When I deploy my website everything deploys perfectly. When i view the page it's white as if there is no style. I then viewed the source and I saw this: link rel=stylesheet href=//displayThemeCss type=text/css / link rel=stylesheet href=//displayModuleCss type=text/css / link rel=stylesheet href=//displaySystemModulesCss type=text/css / link rel=stylesheet href=//core/css/common.css type=text/css / The source code in my jsp file is this: link rel=stylesheet href=c:url value=/displayThemeCss / type=text/css / link rel=stylesheet href=c:url value=/displayModuleCss / type=text/css / link rel=stylesheet href=c:url value=/displaySystemModulesCss / type=text/css / link rel=stylesheet href=c:url value=/core/css/common.css / type=text/css / As you can see the c:url tag messes up the url by adding 2 forward slahes. This makes the browser think that it shoulod load the style sheets from the server displayThemeCss, displayModuleCss etc I beleive this to be a bug in the class that formats the url. Does anybody know how to solve this. Thanks in advance, Martyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help!Tomcat crashes:Waiting for instance(s) to be deallocated
Hi Starki78 I had this problem when using a singelton class that stored a datasource in it. Everytime I pressed F5 really fast the web server would hang and when I shutdown I got that same message. Apparently when pressing F5 very fast instead of the singelton only using 1 datasource (The one in the singelton) it loaded 5 datasources and then the connection pool was full. Since the pool timeouts where set to 5 minutes the server would appear to hang when in actual fact my code was waiting for an available datasource. I also get this when debugging my tomcat server using eclipse. If I'm debugging and one of the server threads is still debugging and I shutdown the server I get this message as well. I'm guessing that somewhere alot of threads are waiting to finish. The fact that you have 536 instances to be deallocated could mean you have a serious flaw in your code. Martyn starki78 schreef: Hi, we are working with Tomcat 4.1: I didn't find a proper cause in the log-files. Can someone help me please? How could this be possible?? 2006-05-11 06:53:35 StandardWrapper[/pss:action]: Waiting for 74 instance(s) to be deallocated 2006-05-11 06:53:36 StandardWrapper[/pss:jsp]: Waiting for 1 instance(s) to be deallocated 2006-05-11 06:53:36 StandardWrapper[/pss:default]: Waiting for 536 instance(s) to be deallocated - 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]
Adding servlets during startup
Hi All I am currently using Struts 1.2.9 in combination with tomcat 5.0.28. I want to constructed my website so that its possible to import modules. Each module is a seperate package, meaning servlets are placed over multiple packages. The problem with this is that the web.xml cant contain servlet mappings because it doesnt know which modules are installed. To solve this I want to create one servlet that dynamically adds the servlets and their mappings during the startup of Tomcat. I found a function addServletMapping in The servletContext class but the problem is there is no function to add a servlet. If I understand correctly you first need to install a servlet and then its mapping. In short I need to move the servlet + servlet-mapping section from the web.xml into a single servlet that at startup adds the servlets to the list of known servlets. Thanks in advance, Martyn Hiemstra - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]