Re: Object sharing
Well, I think -Xnoclassgc is horrible. And singleton objects cannot be shared among different application contexts, because they use different classloaders. Shared objects is better held in somewhere else, e.g., JNDI, although I usually blame it =) 2006/5/22, Corobitsyn Roman [EMAIL PROTECTED]: Hi Sharing is possible with Tomcat You must put your objects in shared classloader For example: public class ObjectPool { private static ObjectPool objectPool = null; private ObjectPool { // initialize object } public synchronized static ObjectPool getInstance() { if (objectPool == null) { objectPool = new ObjectPool(); } return objectPool; } } And then put jar or compiled class into shared/lib or shared/classes But prevent garbage collection, you must use the -Xnoclassgc start-up parameter. (set JAVA_OPTS=-Xnoclassgc) Other solution is adding the following member to a class that is always loaded in an application: private ObjectPool objectPool = ObjectPool.getInstance(); I hope this helps BG Arvind BG By design I would use an EJB, this way you can also use BG proper security to comtrol access to your bean. You can access the BG EJB from any webapps, wether it runs or not on the same server. BG And you can also expose it as a web service. BG Using JBoss you will have tomcat out of the box as well as BG transaction, security, etc And no license cost. BG Hopes this helps. BG Bruno Georges BG Glencore International AG BG Tel. +41 41 709 3204 BG Fax +41 41 709 3000 BG - Original Message - BG From: Arvind S. [EMAIL PROTECTED] BG Sent: 19.05.2006 21:25 BG To: users@tomcat.apache.org BG Subject: Object sharing BG Hi, BG If a web application wants to access a object being used by another BG web-application(with a different context root) running on the same BG webserver, is that possible? BG If yes, how can it be achieved?Through sharing attributes of ServletContext? BG Will getting an attribute from the servletContext, return a copy of the BG object or the reference itself? BG Thanks Regards BG LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly BG confidential and they may not be used or disclosed by someone who is not a BG named recipient. BG If you have received this email in error please notify the sender by replying BG to this email inserting the word misdirected as the message and delete this BG e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Object sharing
Oh I'm terribly sorry I miss the line you said into shared/lib or shared/classes. Forget that =P 2006/5/22, Corobitsyn Roman [EMAIL PROTECTED]: Hi Sharing is possible with Tomcat You must put your objects in shared classloader For example: public class ObjectPool { private static ObjectPool objectPool = null; private ObjectPool { // initialize object } public synchronized static ObjectPool getInstance() { if (objectPool == null) { objectPool = new ObjectPool(); } return objectPool; } } And then put jar or compiled class into shared/lib or shared/classes But prevent garbage collection, you must use the -Xnoclassgc start-up parameter. (set JAVA_OPTS=-Xnoclassgc) Other solution is adding the following member to a class that is always loaded in an application: private ObjectPool objectPool = ObjectPool.getInstance(); I hope this helps BG Arvind BG By design I would use an EJB, this way you can also use BG proper security to comtrol access to your bean. You can access the BG EJB from any webapps, wether it runs or not on the same server. BG And you can also expose it as a web service. BG Using JBoss you will have tomcat out of the box as well as BG transaction, security, etc And no license cost. BG Hopes this helps. BG Bruno Georges BG Glencore International AG BG Tel. +41 41 709 3204 BG Fax +41 41 709 3000 BG - Original Message - BG From: Arvind S. [EMAIL PROTECTED] BG Sent: 19.05.2006 21:25 BG To: users@tomcat.apache.org BG Subject: Object sharing BG Hi, BG If a web application wants to access a object being used by another BG web-application(with a different context root) running on the same BG webserver, is that possible? BG If yes, how can it be achieved?Through sharing attributes of ServletContext? BG Will getting an attribute from the servletContext, return a copy of the BG object or the reference itself? BG Thanks Regards BG LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly BG confidential and they may not be used or disclosed by someone who is not a BG named recipient. BG If you have received this email in error please notify the sender by replying BG to this email inserting the word misdirected as the message and delete this BG e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?
Hi! javax.net.ssl.SSLSession sslSession = (javax.net.ssl.SSLSession) request.getAttribute(javax.net.ssl.session); byte[] sslId = sslSession.getId() Will do the trick. Actually, no. This will just result in an NPE :). And, if you think about it, if Apache is handling the SSL traffic, then there would be no way to get this. What does work is: String sslid = (String)request.getAttribute(javax.servlet.request.ssl_session); This will give you the SSL Session-ID even if you are fronting with Apache (Apache passes it to Tomcat). However, be warned that this is a Tomcat-specific feature: It won't work if you try and port your app to another Servlet Container. Thanks for warning... Bye, Mike -- Michael Decker [EMAIL PROTECTED] TESIS SYSware GmbH http://www.tesis.de Baierbrunnerstr. 15 * 81379 Muenchen * Tel. +49 89 747377-0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Help with Tomcat MySQL using JNDI
-Messaggio originale- Da: Stephen More [mailto:[EMAIL PROTECTED] Inviato: venerdì 19 maggio 2006 13.40 A: Tomcat Users List Oggetto: Re: Help with Tomcat MySQL using JNDI On 5/17/06, Parsons Technical Services [EMAIL PROTECTED] wrote: Now I will assume you have reviewed http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html for a per context and Yes http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html for a global approach. Yes. Now for a few questions. Is the jndi for one app or several? Right now, one app. Well if for one app, you can set it up in the context of the app. I have been trying to do this. Both cases you need to add the drivers to the common/lib (thus the reason a simple war won't do). I have copied mysql-connector-java-3.1.12-bin.jar to apache-tomcat-5.5.17/common/lib Class.forName(com.mysql.jdbc.Driver); connection = DriverManager.getConnection( jdbc:mysql://192.168.1.19:3306/golive, daname, depassword); I have this working fine. Now that we have verified this first layer ( JDBC Driver installed OK ), how can I test the next layer ? $CATALINA_HOME/webapps/DBTest/META-INF/context.xml What can I do to verify that my context.xml is set correctly ? -Thanks Steve More - Original Message - From: Stephen More [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, May 17, 2006 5:34 PM Subject: Help with Tomcat MySQL using JNDI Is there a war file available for download that will do nothing more than: select 'HelloWorld from MySQL'; using JNDI ? I have tried following many examples on the web and I keep ending up with: Cannot create JDBC driver of class '' for connect URL 'null' At this point I am pulling out my hair and thinking their must be a bug in tomcat 5.5.17 ! Can anyone provide me with a simple working war using MySQL ? -Thanks Steve More - 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]
R: Help with Tomcat MySQL using JNDI
Sorry, it seems I sent a blank reply.. Anyway... I had the same problem with using JNDI with realm.. and finally I wrote a context.xml which works fine.. /meta-inf/context.xml: Context docBase=PMS path=/PMS reloadable=true Resource name=jdbc/pmsRead auth=Container type=javax.sql.DataSource username=user password=userpwd driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/pms maxActive=100 maxIdle=10 / !-- Authentication realm -- Realm className=org.apache.catalina.realm.DataSourceRealm localDataSource=true dataSourceName=jdbc/pmsRead debug=99 roleNameCol=role userCredCol=password userNameCol=username userRoleTable=roles userTable=users / /Context The Resource jdbc/pmsRead works fine with the realm and within every class of my web application if I access it using the following code; try{ Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/pmsRead); Connection conn = ds.getConnection(); [query code here..] }catch(Exception e){ [some code here...] } Hope it can help someway.. Ale -Messaggio originale- Da: Stephen More [mailto:[EMAIL PROTECTED] Inviato: venerdì 19 maggio 2006 13.40 A: Tomcat Users List Oggetto: Re: Help with Tomcat MySQL using JNDI On 5/17/06, Parsons Technical Services [EMAIL PROTECTED] wrote: Now I will assume you have reviewed http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html for a per context and Yes http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html for a global approach. Yes. Now for a few questions. Is the jndi for one app or several? Right now, one app. Well if for one app, you can set it up in the context of the app. I have been trying to do this. Both cases you need to add the drivers to the common/lib (thus the reason a simple war won't do). I have copied mysql-connector-java-3.1.12-bin.jar to apache-tomcat-5.5.17/common/lib Class.forName(com.mysql.jdbc.Driver); connection = DriverManager.getConnection( jdbc:mysql://192.168.1.19:3306/golive, daname, depassword); I have this working fine. Now that we have verified this first layer ( JDBC Driver installed OK ), how can I test the next layer ? $CATALINA_HOME/webapps/DBTest/META-INF/context.xml What can I do to verify that my context.xml is set correctly ? -Thanks Steve More - Original Message - From: Stephen More [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, May 17, 2006 5:34 PM Subject: Help with Tomcat MySQL using JNDI Is there a war file available for download that will do nothing more than: select 'HelloWorld from MySQL'; using JNDI ? I have tried following many examples on the web and I keep ending up with: Cannot create JDBC driver of class '' for connect URL 'null' At this point I am pulling out my hair and thinking their must be a bug in tomcat 5.5.17 ! Can anyone provide me with a simple working war using MySQL ? -Thanks Steve More - 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]
Problems with Realms and authorization
Hello! This is my first post to the list. My problem is this, I've configured Tomcat's file server.xml in order to use JDBC to authenticate users, and I've set up the realms and the different roles that can access to that realms, then, if i try to access to some realm but I haven't got the right role Tomcat redirect me to a error page (Forbidden Access) but it never ask again my user and my password. This occurs only if that user/password exists in my DataBase but it haven got the right role, If I enter a non exist user/password, Tomcat ask me again for them. How can I solve this? Could I change that error page that Tomcat shows? How? Thank you in advance... Alberto
Re: Problems with Realms and authorization
Hi Alberto. A user can be in two states in tomcat's point of view. 1) anonymous (that is the user has not yet provided user / password) 2) Authenticated (user has provided user / password) Aside from this, there are 2 kinds of urls for tomcat 1) unrestricted ones (anyone can access them) 2) urls restricted to specific roles (only authenticated users having the correct role can access them) As a result, when you try to access an url, those are the possible scenarios 1) public url - access is granted 2) restricted url and you are anonymous - you are pleased to log in 3) restricted url, you are authenticated but you don't have the correct role - access is refused 4) restricted url, you are authenticated and you have correct roles - access is granted Your problem is point 3, you used a user / pass that has not the priviledge for the given url. However, as you are authenticated, tomcat will not ask you to authenticate again. It already knows who you are and knows you can't acces that url. You should avoid design where an individual has to use different user / pass depending on what he want to do. It's better that he use only one account that got the requested priviledges. Really, there is a problem with J2EE specs you must care about. There is no way to log out, except by closing the browser. Changing the error page is of not help by the way. There is no way to force tomcat to accept a new user / password because there is no way to do it according to J2EE specs. Also, there is a difference between 401 Unauthorized 403 Forbidden 401 will request user / pass, 403 not. Forcing a 401 is useless because browser will cache user / pass and resend them without poping a new dialog. Regards Alberto Montoya wrote: Hello! This is my first post to the list. My problem is this, I've configured Tomcat's file server.xml in order to use JDBC to authenticate users, and I've set up the realms and the different roles that can access to that realms, then, if i try to access to some realm but I haven't got the right role Tomcat redirect me to a error page (Forbidden Access) but it never ask again my user and my password. This occurs only if that user/password exists in my DataBase but it haven got the right role, If I enter a non exist user/password, Tomcat ask me again for them. How can I solve this? Could I change that error page that Tomcat shows? How? Thank you in advance... Alberto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Realms and authorization
Hello David, Thank you very much. I'll follow your advices. Greetings 2006/5/22, David Delbecq [EMAIL PROTECTED]: Hi Alberto. A user can be in two states in tomcat's point of view. 1) anonymous (that is the user has not yet provided user / password) 2) Authenticated (user has provided user / password) Aside from this, there are 2 kinds of urls for tomcat 1) unrestricted ones (anyone can access them) 2) urls restricted to specific roles (only authenticated users having the correct role can access them) As a result, when you try to access an url, those are the possible scenarios 1) public url - access is granted 2) restricted url and you are anonymous - you are pleased to log in 3) restricted url, you are authenticated but you don't have the correct role - access is refused 4) restricted url, you are authenticated and you have correct roles - access is granted Your problem is point 3, you used a user / pass that has not the priviledge for the given url. However, as you are authenticated, tomcat will not ask you to authenticate again. It already knows who you are and knows you can't acces that url. You should avoid design where an individual has to use different user / pass depending on what he want to do. It's better that he use only one account that got the requested priviledges. Really, there is a problem with J2EE specs you must care about. There is no way to log out, except by closing the browser. Changing the error page is of not help by the way. There is no way to force tomcat to accept a new user / password because there is no way to do it according to J2EE specs. Also, there is a difference between 401 Unauthorized 403 Forbidden 401 will request user / pass, 403 not. Forcing a 401 is useless because browser will cache user / pass and resend them without poping a new dialog. Regards Alberto Montoya wrote: Hello! This is my first post to the list. My problem is this, I've configured Tomcat's file server.xml in order to use JDBC to authenticate users, and I've set up the realms and the different roles that can access to that realms, then, if i try to access to some realm but I haven't got the right role Tomcat redirect me to a error page (Forbidden Access) but it never ask again my user and my password. This occurs only if that user/password exists in my DataBase but it haven got the right role, If I enter a non exist user/password, Tomcat ask me again for them. How can I solve this? Could I change that error page that Tomcat shows? How? Thank you in advance... Alberto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tmmcat ignoring my log4j threshold
Hello world, I'm a bit estonished by the BEHAVIOUR duo tomcat4.1/log4j-1.2.13; Even if my threshold is set to DEBUG, only WARN and ERROR levels appear in console. (Morever the log file is never created...) log4j-1.2.13.jar is in [tomcat]\webapps\myApp\WEB-INF\lib log4j.xml is in [tomcat]\webapps\WEB-INF\classes None of them shout for a configuration problem... Any clue? Please help... Here is some additionnal info : When it starts log4j does not insult me : log4j: Threshold =null. log4j: Level value for root is [DEBUG]. log4j: root level set to DEBUG log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [target] to [System.out]. log4j: Setting property [threshold] to [DEBUG]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: Adding appender named [console] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [file] to [C:\proxyMail.log]. log4j: Setting property [append] to [true]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: setFile called: C:\proxyMail.log, true log4j: setFile ended log4j: Adding appender named [proxyMailFile] to category [root]. log4j: Threshold =null. log4j: Level value for root is [DEBUG]. log4j: root level set to DEBUG log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [target] to [System.out]. log4j: Setting property [threshold] to [DEBUG]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: Adding appender named [console] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [file] to [C:\proxyMail.log]. log4j: Setting property [append] to [true]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: setFile called: C:\proxyMail.log, true log4j: setFile ended log4j: Adding appender named [proxyMailFile] to category [root]. log4j: Threshold =null. log4j: Level value for root is [DEBUG]. log4j: root level set to DEBUG log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [target] to [System.out]. log4j: Setting property [threshold] to [DEBUG]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: Adding appender named [console] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [file] to [C:\proxyMail.log]. log4j: Setting property [append] to [true]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: setFile called: C:\proxyMail.log, true log4j: setFile ended Here is my log4j.xml : log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=true !-- == -- !-- Append messages to the console -- !-- == -- appender name=console class=org.apache.log4j.ConsoleAppender param name=Target value=System.out/ param name=Threshold value=DEBUG/ layout class=org.apache.log4j.PatternLayout !-- The default pattern: Date Priority [Category] Message\n -- !-- param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] %m%n/-- param name=ConversionPattern value=%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n/ /layout /appender !-- === -- !-- Appende message to file -- !-- === -- appender name=proxyMailFile class=org.apache.log4j.RollingFileAppender param name=Threshold value=DEBUG/ param name=file value=C:\\MyApp.log/ param name=Append value=true/ !--param name=DatePattern value='.'-MM-dd/-- layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n/ /layout /appender !-- === -- !-- Setup the Root category -- !-- ===
Recommendation for Tomcat web statistics program (AKA log analyzer) ?
I tried to find decent free web statistics program for Tomcat. (AKA Log Analyzer). I'm running standalone Tomcat (without Apache) on Linux. I would prefer Java solution, but perl/c++/python might be ok. I googled for 2 hours but I haven't found any Java solution. Any recommendation? I know about AwStats. Is anything other worth trying? I'm sorry about previous post about the same issue which wasn't in separate thread. Thank you in advance for your answer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem related include directive action
Hi, I want to know exact difference between include directive include action. As I have readfrom some sites some books that one diff. is Include directive is take place at translation (compile) time while action takes place as runtime. So, if you make change in included file, that change will only reflect by include actionjsp:action page="..."/ But Idid one example which show me changes in both include directive as well as include action. I did testing on tomcat 4.1 tomcat 5.0.28. So can any onetell me exact diff. b/w include directive action. As all r saying abt changes don't reflect by include directive then why I see changes in my example? Plz clarify if I am wrong at some place... Thanks for your help... Example... file checkInclude.jsp bInclude Directive content :: /b %@ include file="included.jsp" %brbr bInclude Action content :: /b jsp:include page="included.jsp" / file included.jsp %@ page language="java" import="java.util.Date" % bDate is ::/b%= new Date()% Result is :: Include Directive content :: Date is :: Mon May 22 13:14:40 GMT+05:30 2006 Include Action content :: Date is :: Mon May 22 13:14:40 GMT+05:30 2006 Update included.jsp %@ page language="java" import="java.util.Date" % bToday's Date is ::/b%= new Date()% Result after update :: Include Directive content :: Today's Date is :: Mon May 22 13:17:04 GMT+05:30 2006 Include Action content :: Today's Date is :: Mon May 22 13:17:05 GMT+05:30 2006 Thanks Regards, Harshal Joshi Software Engineer
Re: javamail for numerous mail servers on tomcat
Thx for the tip. It macth exactly my need. Just a precision, i had to code it this way : Session mailSession = Session.getInstance(props, null); So the server can be different for each request. Sorry for this late answer but problems have priorities... On 5/19/06, David Kerber [EMAIL PROTECTED] wrote: Dynamically-defined mail servers work fine in Tomcat; I'd be in deep kimshe if they didn't. Here are some excerpts from the code I use: Properties props = new Properties(); props.put( mail.smtp.host, however you get the server name ); Session mailSession = Session.getDefaultInstance(props, null); msg= new MimeMessage(mailSession); msg.setRecipients(Message.RecipientType.TO, internetAddresses); fromAddress = new InternetAddress( however you get the FROM address ); msg.setFrom( fromAddress ); msg.setSubject( the subject line ); ... msg.setText( the message body content ); Transport.send(msg); ... lio tomcat wrote: Hello world, I'm trying to use javamail api in order to fecth/sen mails in a tomcat servlet. Sor far, it's fine. more : it works. But my needs are going beyond this firsyt step. As i understand, the mail servers (smtp, pop, ...) are defined as resources in tomcat (or watever servlet) in its specific config file (server.xml). Then the servlet is able to retrieve one of these server throught a context, a session and a transport objects. Right? My aim is to build dynamically (by the servlet) a transport with parameters received in request. Clear? By the way, i read : In general, applications should not need to use the classes in this package directly. Instead, they should use the APIs defined by javax.mail package (and subpackages). Applications should never construct instances of SMTPTransport directly. Instead, they should use the Session method getTransport to acquire an appropriate Transport object. (see : file:///C:/lionel/dwd/sw/javamail-1_4/javamail-1.4/docs/javadocs/index.html?index-filesindex-1.html) So i'm wondering how i should use the Session method getTransport to acquire an appropriate Transport object. Or if i should let javamail down and look for another solution. Any comment/idea/link is welcome thx, - 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]
Getting servlet context path without a servlet request.
I have a web application running under Tomcat 5.0, and I need to write some output to a file. This app doesn't have its servlet context hardcoded in anywhere, so I can deploy it with any name and not worry about missing some random bit of code anywhere, and I often deploy it with different names so the customers can compare 2 versions side by side. My problem is that I need to output to a log file within the application, and I'd like the logfile name to be the context name, so that I don't have to worry about 2 separate deployments inadvertently writing to the same file. I can get the context path from the first request that comes in, but until that point, I don't seem to be able to retrieve it from either the ServletContext or the ServletConfig... Am I missing something? I'm running in Tomcat, so I can hack it using some Tomcat-specific code, but I'd rather leave it as portable as possible. Anyone have any ideas? Cheers in advance -- Stuart Wood
Re: Recommendation for Tomcat web statistics program (AKA log analyzer) ?
do you want a log analyzer or live load statistics? On 5/22/06, Mladen Adamovic [EMAIL PROTECTED] wrote: I tried to find decent free web statistics program for Tomcat. (AKA Log Analyzer). I'm running standalone Tomcat (without Apache) on Linux. I would prefer Java solution, but perl/c++/python might be ok. I googled for 2 hours but I haven't found any Java solution. Any recommendation? I know about AwStats. Is anything other worth trying? I'm sorry about previous post about the same issue which wasn't in separate thread. Thank you in advance for your answer. - 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: Class loading question
From: Black Buddha [mailto:[EMAIL PROTECTED] even after I've stopped the webapp Tomcat still holds an open file handle to the generated library files Welcome to a JVM bug. The essence is that: - File stream objects in the JVM hold onto the file handle. - The handle is closed only when the object is GCed. - On Windows, but not on Unix, an open file handle prevents file deletion. Your options are: - Run on UNIX, possibly in a virtual machine; - Ensure a garbage collection before the files need to be deleted - can be difficult, as System.GC() is only a hint (as I found out when I ran into this under somewhat different circumstances); - Don't use a JVM with this defect (but I don't know if you have any alternatives). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting servlet context path without a servlet request.
Your on the right track - the servlet 2.5 spec fixes this (but tomcat 6 isn't out yet). If I were in this predicament - I'd use a ServletContext init parameter. They can be overridden in the Context declaration. -Tim Stuart Wood wrote: I have a web application running under Tomcat 5.0, and I need to write some output to a file. This app doesn't have its servlet context hardcoded in anywhere, so I can deploy it with any name and not worry about missing some random bit of code anywhere, and I often deploy it with different names so the customers can compare 2 versions side by side. My problem is that I need to output to a log file within the application, and I'd like the logfile name to be the context name, so that I don't have to worry about 2 separate deployments inadvertently writing to the same file. I can get the context path from the first request that comes in, but until that point, I don't seem to be able to retrieve it from either the ServletContext or the ServletConfig... Am I missing something? I'm running in Tomcat, so I can hack it using some Tomcat-specific code, but I'd rather leave it as portable as possible. Anyone have any ideas? Cheers in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting servlet context path without a servlet request.
Thanks, Tim. I'd just found a page on the 2.5 spec saying it was on its way. I think I'm going to just use ServletContext.getServletContextName() and just remember to keep them in step myself - I guess it's only an issue during development anyway, but it seemed like such an elegant solution. Cheers -- Stuart Wood On 5/22/06, Tim Funk [EMAIL PROTECTED] wrote: Your on the right track - the servlet 2.5 spec fixes this (but tomcat 6 isn't out yet). If I were in this predicament - I'd use a ServletContext init parameter. They can be overridden in the Context declaration. -Tim Stuart Wood wrote: I have a web application running under Tomcat 5.0, and I need to write some output to a file. This app doesn't have its servlet context hardcoded in anywhere, so I can deploy it with any name and not worry about missing some random bit of code anywhere, and I often deploy it with different names so the customers can compare 2 versions side by side. My problem is that I need to output to a log file within the application, and I'd like the logfile name to be the context name, so that I don't have to worry about 2 separate deployments inadvertently writing to the same file. I can get the context path from the first request that comes in, but until that point, I don't seem to be able to retrieve it from either the ServletContext or the ServletConfig... Am I missing something? I'm running in Tomcat, so I can hack it using some Tomcat-specific code, but I'd rather leave it as portable as possible. Anyone have any ideas? Cheers in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Stuart Wood
How to limit placing of jar-files in the user webapps?
How to limit placing of jar-files in the user webapps? In other words, it is necessary to forbid, to the user to place jar-files in directory WEB-INF/lib You will recommend what suitable ways? Thanx for any help BR, Corobitsyn Roman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit placing of jar-files in the user webapps?
Ok, i suppose by user, you mean the webmaster owning a specific webapp. If so, could you tell me what is the point? It's pretty impossible to do anything without .jar files in a java webapp :) If what you want to avoid is people browsing a uploading .jar files Unless you have a very badly written webapp it's already impossible :) Corobitsyn Roman wrote: How to limit placing of jar-files in the user webapps? In other words, it is necessary to forbid, to the user to place jar-files in directory WEB-INF/lib You will recommend what suitable ways? Thanx for any help BR, Corobitsyn Roman - 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: How to limit placing of jar-files in the user webapps?
Hello David. Thank you for reply I am sorry, that I have insufficiently clearly formulated a question We admit, I am a hoster, and at me am hosting buyers. In TOMCAT_HOMEshared/lib and TOMCAT_HOMEcommon/lib I have 3rd libraries of the certain versions. That there were no every possible mistakes, and resources Tomcat were not exhausted, it is necessary to limit use of catalogue WEB-INF/lib. And for the user compiled classes to use catalogue CUSTOM_WEBAPP/WEB-INF/classes. And there is a question as it can be made the best way Thanx DD Ok, i suppose by user, you mean the webmaster owning a specific webapp. DD If so, could you tell me what is the point? It's pretty impossible to do DD anything without .jar files in a java webapp :) DD If what you want to avoid is people browsing a uploading .jar files DD Unless you have a very badly written webapp it's already impossible :) DD Corobitsyn Roman wrote: How to limit placing of jar-files in the user webapps? In other words, it is necessary to forbid, to the user to place jar-files in directory WEB-INF/lib You will recommend what suitable ways? Thanx for any help BR, Corobitsyn Roman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DD - DD To unsubscribe, e-mail: [EMAIL PROTECTED] DD For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Corobitsynmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recommendation for Tomcat web statistics program (AKA log analyzer) ?
Leon Rosenberg wrote: do you want a log analyzer or live load statistics? Hi Leon, Live load statistics might mean also memory and processor usage of the server. I will understand your question as : do you want live or croned program? Since web stat program could be live or cached (using cron on Linux). It doesn't matter at this moment to me is the program live or cron. I succeded to run Awstats using CGI and it is good, but there are some things which I don't like. So, if anybody have some other recommandation I would like to take a look. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tmmcat ignoring my log4j threshold
forget this thread. everything is ok. just not testing the right env. Apologize On 5/22/06, lio tomcat [EMAIL PROTECTED] wrote: Hello world, I'm a bit estonished by the BEHAVIOUR duo tomcat4.1/log4j-1.2.13; Even if my threshold is set to DEBUG, only WARN and ERROR levels appear in console. (Morever the log file is never created...) log4j-1.2.13.jar is in [tomcat]\webapps\myApp\WEB-INF\lib log4j.xml is in [tomcat]\webapps\WEB-INF\classes None of them shout for a configuration problem... Any clue? Please help... Here is some additionnal info : When it starts log4j does not insult me : log4j: Threshold =null. log4j: Level value for root is [DEBUG]. log4j: root level set to DEBUG log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [target] to [System.out]. log4j: Setting property [threshold] to [DEBUG]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: Adding appender named [console] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [file] to [C:\proxyMail.log]. log4j: Setting property [append] to [true]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: setFile called: C:\proxyMail.log, true log4j: setFile ended log4j: Adding appender named [proxyMailFile] to category [root]. log4j: Threshold =null. log4j: Level value for root is [DEBUG]. log4j: root level set to DEBUG log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [target] to [System.out]. log4j: Setting property [threshold] to [DEBUG]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: Adding appender named [console] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [file] to [C:\proxyMail.log]. log4j: Setting property [append] to [true]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: setFile called: C:\proxyMail.log, true log4j: setFile ended log4j: Adding appender named [proxyMailFile] to category [root]. log4j: Threshold =null. log4j: Level value for root is [DEBUG]. log4j: root level set to DEBUG log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Setting property [target] to [System.out]. log4j: Setting property [threshold] to [DEBUG]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: Adding appender named [console] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [threshold] to [DEBUG]. log4j: Setting property [file] to [C:\proxyMail.log]. log4j: Setting property [append] to [true]. log4j: Parsing layout of class: org.apache.log4j.PatternLayout log4j: Setting property [conversionPattern] to [%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n]. log4j: setFile called: C:\proxyMail.log, true log4j: setFile ended Here is my log4j.xml : log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=true !-- == -- !-- Append messages to the console -- !-- == -- appender name=console class=org.apache.log4j.ConsoleAppender param name=Target value=System.out/ param name=Threshold value=DEBUG/ layout class=org.apache.log4j.PatternLayout !-- The default pattern: Date Priority [Category] Message\n -- !-- param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] %m%n/-- param name=ConversionPattern value=%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n/ /layout /appender !-- === -- !-- Appende message to file -- !-- === -- appender name=proxyMailFile class=org.apache.log4j.RollingFileAppender param name=Threshold value=DEBUG/ param name=file value=C:\\MyApp.log/ param name=Append value=true/ !--param name=DatePattern value='.'-MM-dd/-- layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{dd/MM/ HH:mm:ss,SSS} %-5p [ProxyMail %-4c{1}] - %m%n/ /layout /appender !-- === --
Re: How to limit placing of jar-files in the user webapps?
Ok, i see your problem. However, you must be aware that preventing use of WEB-INF/lib is handicapping for anyone needing java hosting. Frameworks like struts won't work if they are shared amongst webapplications. You might simply endup with your users exploding the .jars and putting their content in classes/, this way you will not decrease the load at all. On the other hand, even with only .jsps it is possibile to easily exhaust tomcat memory very quickly by mis use of ThreadLocal And, as far as i know, there is no way to remove use of WEB-INF/lib unless you hack the tomcat webapp classloader code Corobitsyn Roman wrote: Hello David. Thank you for reply I am sorry, that I have insufficiently clearly formulated a question We admit, I am a hoster, and at me am hosting buyers. In TOMCAT_HOMEshared/lib and TOMCAT_HOMEcommon/lib I have 3rd libraries of the certain versions. That there were no every possible mistakes, and resources Tomcat were not exhausted, it is necessary to limit use of catalogue WEB-INF/lib. And for the user compiled classes to use catalogue CUSTOM_WEBAPP/WEB-INF/classes. And there is a question as it can be made the best way Thanx DD Ok, i suppose by user, you mean the webmaster owning a specific webapp. DD If so, could you tell me what is the point? It's pretty impossible to do DD anything without .jar files in a java webapp :) DD If what you want to avoid is people browsing a uploading .jar files DD Unless you have a very badly written webapp it's already impossible :) DD Corobitsyn Roman wrote: How to limit placing of jar-files in the user webapps? In other words, it is necessary to forbid, to the user to place jar-files in directory WEB-INF/lib You will recommend what suitable ways? Thanx for any help BR, Corobitsyn Roman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DD - DD To unsubscribe, e-mail: [EMAIL PROTECTED] DD For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
filtering tomcat logging using default logging configuration
I have a web application which is using a library which is generating too many messages. These are routed to catalina.out and all come from a particular producer (org.jgroups. is the prefix). I do not want to rework the logging to use log4j or the like, but I would like to suppress these WARN messages for this prefix. I guess I need to modify $TOMCAT_HOME/conf/logging.properties, but what do I need to add? I have read the Tomcat 5.5 logging page, but I am none the wiser as that does not seem to give any examples of filtering non-Tomcat messages. Thanks David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant deploy task and cluster-wide (farm) deployment
As I believe you have come across a Samba specific issue with copy task The intelligent and wonderfully talented folks at Bowstreet recommend using exec with copy over using Ant copy task (apparently preserving permissions and identifying which source/target file is 'older' would be accomplished using exec vs using ant copy) http://72.14.209.104/search?q=cache:ITQuwFOAUAAJ:buzz.bowstreet.com/post.asp%3Fmethod%3DReplyQuote%26REPLY_ID%3D506%26TOPIC_ID%3D272%26FORUM_ID%3D15+%22ANT+copy%22+and+%22samba+mount%22hl=engl=usct=clnkcd=1 Does this answer your question? Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; 'Martin Gainty' [EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:49 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment Push or pull, when it gets there, it gets there correctly (md5sum-s match). The problem, I think, is that the file appears in the file system before it is received in its entirety. I don't know why -- maybe the nature of samba is to write, close, open-for-append, ... ? If I copy FROM Linux (pull) then I do not have this problem, it's only when pushing to the linux file system mounted via samba from Windows. I've tried this numerous times, because I have a strong desire to automate the build and deploy process as much as possible -- saves me from having to do it myself ;-) I haven't 100% isolated the exact circumstances. Even if the push model worked (i.e., ant copy tasks) how can I know for certain when the old is undeployed and when the new is deployed? And speaking of that, should I simply be able to overwrite and have it redeploy? I've not seen that work -- sometimes it does, sometimes it doesn't, and because it is a push, it suffers from the sample problem as above. For the record, the source is a Windows XP and/or W2K3 NTFS and the target is RHEL V.4. Tomcat 5.5.12, JDK 1.5_05. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:09 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment Tim- I found the majority of transfer programs transfer text not binary..this is especially problematic when transferring from Windows to Nix As a war is a binary I would make sure that the transferring program is not interjecting LF with CR and or treating the transferred war unit as text Martin - This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Sunday, May 21, 2006 5:06 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment I have observed that if I build on windows, and copy FROM windows to Linux, Tomcat will prematurely begin transferring the war file to the rest of the cluster. The master tomcat will end up with a correct war file, and the other will get a corrupt or truncated one. Also, there is no synchronous way to remove the old war, know that it is undeployed from all tomcats in the cluster, and then you know you can deploy the new war. I guess I could have it sleep for 30 seconds or so, but even that is no guarantee. I haven't found that copy with overwrite consistently triggers the copy. I'm guessing this is a samba issue, but due to circumstances beyond my control, our build machine is running windows and I can't change it. At least with the manager application, when control returns to ant, the app is definitely (and reliably) undeployed. Tim -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 7:55 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment yes, farm deployment is triggered by simplying copying a WAR into the watch directory, with ant that would be using the copy task Filip Tim Lucia wrote: Is it possible to deploy to a cluster using the deploy task? (i.e., can it be done using /manager/html?) I think not (I can't find any way to do it.) If no, are there any plans to support this in the future? I ask because I have found that production re-deployment is an unreliable
tomcat textbook
Hi Tomcat Users, I am new to tomcat server, eventhough the tomcat has online documentation, i wud like to follow a textbook . I am not sure which book covers about tomcat from basic to advanced level. Can any of you send me the author name with the title of the book? Thanks, Kary P
Re: How to limit placing of jar-files in the user webapps?
I too as think But I am not sure about that, shared struts will not work. I have two hosts with three webapps, and everyone use struts. Certainly it OT, but I ask to explain to me why will not work, briefly Thank you DD Ok, i see your problem. DD However, you must be aware that preventing use of WEB-INF/lib is DD handicapping for anyone needing java hosting. Frameworks like struts DD won't work if they are shared amongst webapplications. You might simply DD endup with your users exploding the .jars and putting their content in DD classes/, this way you will not decrease the load at all. DD On the other hand, even with only .jsps it is possibile to easily DD exhaust tomcat memory very quickly by mis use of ThreadLocal DD And, as far as i know, there is no way to remove use of WEB-INF/lib DD unless you hack the tomcat webapp classloader code DD Corobitsyn Roman wrote: Hello David. Thank you for reply I am sorry, that I have insufficiently clearly formulated a question We admit, I am a hoster, and at me am hosting buyers. In TOMCAT_HOMEshared/lib and TOMCAT_HOMEcommon/lib I have 3rd libraries of the certain versions. That there were no every possible mistakes, and resources Tomcat were not exhausted, it is necessary to limit use of catalogue WEB-INF/lib. And for the user compiled classes to use catalogue CUSTOM_WEBAPP/WEB-INF/classes. And there is a question as it can be made the best way Thanx DD Ok, i suppose by user, you mean the webmaster owning a specific webapp. DD If so, could you tell me what is the point? It's pretty impossible to do DD anything without .jar files in a java webapp :) DD If what you want to avoid is people browsing a uploading .jar files DD Unless you have a very badly written webapp it's already impossible :) DD Corobitsyn Roman wrote: How to limit placing of jar-files in the user webapps? In other words, it is necessary to forbid, to the user to place jar-files in directory WEB-INF/lib You will recommend what suitable ways? Thanx for any help BR, Corobitsyn Roman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit placing of jar-files in the user webapps?
Corobitsyn Roman ha scritto: But I am not sure about that, shared struts will not work. I have two hosts with three webapps, and everyone use struts. If they all use the same version of Struts, there is no problem (though I am not sure about it :-) ). But think about the chance to have different versions of Struts in different webapps: it will lead to a complete classloader mess! Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ant deploy task and cluster-wide (farm) deployment
Well, given that exec cp would be the same as my running it from the shell, and I've already observed that does not work (nor does it work from the explorer window(s)), I would guess that it won't work if forked-and-execed from ant. The question still remains - How do I know for sure that delete and copy are done and the app is undeployed / redeployed? With the deploy task, I know that the undeploy is complete when the http request completes. I was hoping there could be a similar mechanism in the works for the cluster model. I think it would be quite beneficial. I may have a few hours of spare time this week and if I do, I will attempt to characterize exactly what happens, how often, and when. Or maybe I should attempt to find some options in Samba that mitigate this. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 8:53 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment As I believe you have come across a Samba specific issue with copy task The intelligent and wonderfully talented folks at Bowstreet recommend using exec with copy over using Ant copy task (apparently preserving permissions and identifying which source/target file is 'older' would be accomplished using exec vs using ant copy) http://72.14.209.104/search?q=cache:ITQuwFOAUAAJ:buzz.bowstreet.com/post.asp %3Fmethod%3DReplyQuote%26REPLY_ID%3D506%26TOPIC_ID%3D272%26FORUM_ID%3D15+%22 ANT+copy%22+and+%22samba+mount%22hl=engl=usct=clnkcd=1 Does this answer your question? Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; 'Martin Gainty' [EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:49 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment Push or pull, when it gets there, it gets there correctly (md5sum-s match). The problem, I think, is that the file appears in the file system before it is received in its entirety. I don't know why -- maybe the nature of samba is to write, close, open-for-append, ... ? If I copy FROM Linux (pull) then I do not have this problem, it's only when pushing to the linux file system mounted via samba from Windows. I've tried this numerous times, because I have a strong desire to automate the build and deploy process as much as possible -- saves me from having to do it myself ;-) I haven't 100% isolated the exact circumstances. Even if the push model worked (i.e., ant copy tasks) how can I know for certain when the old is undeployed and when the new is deployed? And speaking of that, should I simply be able to overwrite and have it redeploy? I've not seen that work -- sometimes it does, sometimes it doesn't, and because it is a push, it suffers from the sample problem as above. For the record, the source is a Windows XP and/or W2K3 NTFS and the target is RHEL V.4. Tomcat 5.5.12, JDK 1.5_05. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:09 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment Tim- I found the majority of transfer programs transfer text not binary..this is especially problematic when transferring from Windows to Nix As a war is a binary I would make sure that the transferring program is not interjecting LF with CR and or treating the transferred war unit as text Martin - This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Sunday, May 21, 2006 5:06 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment I have observed that if I build on windows, and copy FROM windows to Linux, Tomcat will prematurely begin transferring the war file to the rest of the cluster. The master tomcat will end up with a correct war file, and the other will get a corrupt or truncated one. Also, there is no synchronous way to remove the old war, know that it is undeployed from all tomcats in the cluster, and then you know you can deploy the new war. I guess I could have it sleep for 30 seconds or so, but even that is no guarantee. I haven't found that copy with
Re: How to limit placing of jar-files in the user webapps?
Antonio Petrelli wrote: If they all use the same version of Struts, there is no problem (though I am not sure about it :-) ). But think about the chance to have different versions of Struts in different webapps: it will lead to a complete classloader mess! Now I know why is Tomcat hosting more expensive than Apache ;). The price for Tomcat hosting was such that it was least expensive to me to pay for VPS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant deploy task and cluster-wide (farm) deployment
yes, that way you don't run into network lag problems although I would suggest dropping farm deployment all together, as you might want to script something simpler, that will update half your nodes, then the other half, so you don't bring down every node at once. Filip Tim Lucia wrote: Having re-read this, perhaps you meant to suggest that I make my master tomcat on the windows (build) box? Then I could deploy locally, and have it update the slaves. And only the slaves would have AJP connections set up from httpd? Tim -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 9:42 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment but you don't need to use samba, Tomcat will transfer the file for you. all you need to do is to copy it to the watch directory on the master (watch enabled). Then tomcat will copy it to the other tomcat's. without using samba, and without corrupting the file Filip Tim Lucia wrote: Push or pull, when it gets there, it gets there correctly (md5sum-s match). The problem, I think, is that the file appears in the file system before it is received in its entirety. I don't know why -- maybe the nature of samba is to write, close, open-for-append, ... ? If I copy FROM Linux (pull) then I do not have this problem, it's only when pushing to the linux file system mounted via samba from Windows. I've tried this numerous times, because I have a strong desire to automate the build and deploy process as much as possible -- saves me from having to do it myself ;-) I haven't 100% isolated the exact circumstances. Even if the push model worked (i.e., ant copy tasks) how can I know for certain when the old is undeployed and when the new is deployed? And speaking of that, should I simply be able to overwrite and have it redeploy? I've not seen that work -- sometimes it does, sometimes it doesn't, and because it is a push, it suffers from the sample problem as above. For the record, the source is a Windows XP and/or W2K3 NTFS and the target is RHEL V.4. Tomcat 5.5.12, JDK 1.5_05. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:09 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment Tim- I found the majority of transfer programs transfer text not binary..this is especially problematic when transferring from Windows to Nix As a war is a binary I would make sure that the transferring program is not interjecting LF with CR and or treating the transferred war unit as text Martin - This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Sunday, May 21, 2006 5:06 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment I have observed that if I build on windows, and copy FROM windows to Linux, Tomcat will prematurely begin transferring the war file to the rest of the cluster. The master tomcat will end up with a correct war file, and the other will get a corrupt or truncated one. Also, there is no synchronous way to remove the old war, know that it is undeployed from all tomcats in the cluster, and then you know you can deploy the new war. I guess I could have it sleep for 30 seconds or so, but even that is no guarantee. I haven't found that copy with overwrite consistently triggers the copy. I'm guessing this is a samba issue, but due to circumstances beyond my control, our build machine is running windows and I can't change it. At least with the manager application, when control returns to ant, the app is definitely (and reliably) undeployed. Tim -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 7:55 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment yes, farm deployment is triggered by simplying copying a WAR into the watch directory, with ant that would be using the copy task Filip Tim Lucia wrote: Is it possible to deploy to a cluster using the deploy task? (i.e., can it be done using /manager/html?) I think not (I can't find any way to do it.) If no, are there any plans to support this in the future? I ask because I have found that production re-deployment is an unreliable process when you have to rely on deleting and copying war files across a
Re: Ant deploy task and cluster-wide (farm) deployment
Good Point Tim- There is a difference between 'copying' and 'deploying' which means you copied the war to Tomcat / went to manager module and did a restart copying - (always safer to delete the old war and then copy in the new war) deploying - You want to look at URL utilities like curl to automate the task to open the axis servlet URL such as http://localhost:8080/manager/html/reload?path=/axis Does this help you? Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; 'Martin Gainty' [EMAIL PROTECTED] Sent: Monday, May 22, 2006 9:33 AM Subject: RE: Ant deploy task and cluster-wide (farm) deployment Well, given that exec cp would be the same as my running it from the shell, and I've already observed that does not work (nor does it work from the explorer window(s)), I would guess that it won't work if forked-and-execed from ant. The question still remains - How do I know for sure that delete and copy are done and the app is undeployed / redeployed? With the deploy task, I know that the undeploy is complete when the http request completes. I was hoping there could be a similar mechanism in the works for the cluster model. I think it would be quite beneficial. I may have a few hours of spare time this week and if I do, I will attempt to characterize exactly what happens, how often, and when. Or maybe I should attempt to find some options in Samba that mitigate this. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 8:53 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment As I believe you have come across a Samba specific issue with copy task The intelligent and wonderfully talented folks at Bowstreet recommend using exec with copy over using Ant copy task (apparently preserving permissions and identifying which source/target file is 'older' would be accomplished using exec vs using ant copy) http://72.14.209.104/search?q=cache:ITQuwFOAUAAJ:buzz.bowstreet.com/post.asp %3Fmethod%3DReplyQuote%26REPLY_ID%3D506%26TOPIC_ID%3D272%26FORUM_ID%3D15+%22 ANT+copy%22+and+%22samba+mount%22hl=engl=usct=clnkcd=1 Does this answer your question? Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; 'Martin Gainty' [EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:49 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment Push or pull, when it gets there, it gets there correctly (md5sum-s match). The problem, I think, is that the file appears in the file system before it is received in its entirety. I don't know why -- maybe the nature of samba is to write, close, open-for-append, ... ? If I copy FROM Linux (pull) then I do not have this problem, it's only when pushing to the linux file system mounted via samba from Windows. I've tried this numerous times, because I have a strong desire to automate the build and deploy process as much as possible -- saves me from having to do it myself ;-) I haven't 100% isolated the exact circumstances. Even if the push model worked (i.e., ant copy tasks) how can I know for certain when the old is undeployed and when the new is deployed? And speaking of that, should I simply be able to overwrite and have it redeploy? I've not seen that work -- sometimes it does, sometimes it doesn't, and because it is a push, it suffers from the sample problem as above. For the record, the source is a Windows XP and/or W2K3 NTFS and the target is RHEL V.4. Tomcat 5.5.12, JDK 1.5_05. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:09 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment Tim- I found the majority of transfer programs transfer text not binary..this is especially problematic when transferring from Windows to Nix As a war is a binary I would make sure that the transferring program is not interjecting LF with CR and or treating the transferred
RE: Ant deploy task and cluster-wide (farm) deployment
I have done this for the QA cluster, since that gets done live. The production cluster gets done during maintenance windows. The point of using the farm deployer, or so I thought, was that I don't have to maintain the cluster members list in the build process. Then again, it does not change very often ;-) BTW, thanks to everyone for participating in this conversation. I appreciate all the input. Tim -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 9:46 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment yes, that way you don't run into network lag problems although I would suggest dropping farm deployment all together, as you might want to script something simpler, that will update half your nodes, then the other half, so you don't bring down every node at once. Filip Tim Lucia wrote: Having re-read this, perhaps you meant to suggest that I make my master tomcat on the windows (build) box? Then I could deploy locally, and have it update the slaves. And only the slaves would have AJP connections set up from httpd? Tim -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 9:42 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment but you don't need to use samba, Tomcat will transfer the file for you. all you need to do is to copy it to the watch directory on the master (watch enabled). Then tomcat will copy it to the other tomcat's. without using samba, and without corrupting the file Filip Tim Lucia wrote: Push or pull, when it gets there, it gets there correctly (md5sum-s match). The problem, I think, is that the file appears in the file system before it is received in its entirety. I don't know why -- maybe the nature of samba is to write, close, open-for-append, ... ? If I copy FROM Linux (pull) then I do not have this problem, it's only when pushing to the linux file system mounted via samba from Windows. I've tried this numerous times, because I have a strong desire to automate the build and deploy process as much as possible -- saves me from having to do it myself ;-) I haven't 100% isolated the exact circumstances. Even if the push model worked (i.e., ant copy tasks) how can I know for certain when the old is undeployed and when the new is deployed? And speaking of that, should I simply be able to overwrite and have it redeploy? I've not seen that work -- sometimes it does, sometimes it doesn't, and because it is a push, it suffers from the sample problem as above. For the record, the source is a Windows XP and/or W2K3 NTFS and the target is RHEL V.4. Tomcat 5.5.12, JDK 1.5_05. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 8:09 PM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment Tim- I found the majority of transfer programs transfer text not binary..this is especially problematic when transferring from Windows to Nix As a war is a binary I would make sure that the transferring program is not interjecting LF with CR and or treating the transferred war unit as text Martin - This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Sunday, May 21, 2006 5:06 PM Subject: RE: Ant deploy task and cluster-wide (farm) deployment I have observed that if I build on windows, and copy FROM windows to Linux, Tomcat will prematurely begin transferring the war file to the rest of the cluster. The master tomcat will end up with a correct war file, and the other will get a corrupt or truncated one. Also, there is no synchronous way to remove the old war, know that it is undeployed from all tomcats in the cluster, and then you know you can deploy the new war. I guess I could have it sleep for 30 seconds or so, but even that is no guarantee. I haven't found that copy with overwrite consistently triggers the copy. I'm guessing this is a samba issue, but due to circumstances beyond my control, our build machine is running windows and I can't change it. At least with the manager application, when control returns to ant, the app is definitely (and reliably) undeployed. Tim -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent:
Re: Recommendation for Tomcat web statistics program (AKA log analyzer) ?
On 5/22/06, Mladen Adamovic [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: do you want a log analyzer or live load statistics? Hi Leon, Live load statistics might mean also memory and processor usage of the server. No, I mean things like number of request for each servlet, total number of time this servlet spent processing, number of errors, avg request duration for last 5m,15m,1h,1d,1week... whatever. I will understand your question as : do you want live or croned program? Since web stat program could be live or cached (using cron on Linux). It doesn't matter at this moment to me is the program live or cron. you can always write a script which is getting the data and graphing it... The problem is to collect the data :-) I succeded to run Awstats using CGI and it is good, but there are some things which I don't like. So, if anybody have some other recommandation I would like to take a look. Ok, I see, you are more interested in who's calling what on my server and less in what the f*ck is my server doing. regards Leon - 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: ClassCastException when forwarding wrapped HttpServletRequest
I remember seeing the spec that you can't do this, you have to provide a ServletRequestWrapper implementation Filip Yuri de Wit wrote: I am not sure I should have posted this question to the dev mailing list, let me know if that should be the case. I am using Tomcat 5.5.16. I have a series of chained HttpServlets in my web app. The first servlet is registered with the web.xml and the following ones are dispatched manually. Before delegating the HTTP request to the next internal servlet, I am wrapping the HttpServletRequest overriding getPathInfo() and getServletPath(). If the pathInfo was /a/b and servletPath was /x, after wrapping the request getPathInfo returns /b and the servletPath returns /x/a. The reason I am doing this is that I would like forward and includes to work relative to my internal pathInfo and servletPath (/b and /x/a) instead of the web container one (/a/b and /x). The first problem I encountered was that if I implemented the wrapper by subclassing HttpServletRequestWrapper Tomcat implementation unwraps it before forwarding and the final url contains the original path info appended and my custom path info. So I then changed my implementation and now I am wrapping the request using my own subclass of HttpServletRequest instead. Now the problem is that I get a ClassCast exception @ org.apache.catalina.core.ApplicationDispatcher line 814 (current = ((ServletRequestWrapper) current).getRequest();). Shouldnt that casting be conditional? Is there a safer way of implementing the functionlity I described above? thanks. - yuri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ant deploy task and cluster-wide (farm) deployment
I'm confused by the suggestion below -- the farm depoyer is entirely based on the appearance or disappearance of a .war file in the watch directory of the master tomcat node. No URL-based manager should come into play here, and using the standard manager (/manager/html) on such an application would likely result in conflicts or confusion. I was hoping to avoid having to visit some URL, or copy some file, for each member of the cluster. The whole point of the farm deployer, or so I thought, was to deploy, undeploy or redeploy from one and only one spot, and let the cluster (3 machines today, maybe 4 tomorrow and 10 in 2 years...) worry about getting the message out. My original question (request) was for a URL-based manager, like /manager/html, except which worked on the cluster. I.e., something like /farm-manager/html, which only appears on the master node, but functions identically to /manager/html from the outside, preserving the view that the cluster is a single entity. My experience suggests that the farm deployer is not 100% reliable (for me) at this time, perhaps it is the mixed OS, perhaps network lag -- not sure what. I have an existing, workable solution that works off of a list of tomcat servers (as a property), and uses the foreach... task (ant-contrib) to undeploy-then-deploy for each tomcat in the list. The danger in a production environment is that there are incompatible changes to objects on the session which would cause some strange failure during session failover. Those can be mitigated by upgrading during off-peak hours or planned maintenance, and/or limiting changes to session objects. (Just a historical note -- my company's business turns on making changes to various reporting screens on a weekly basis. So once a week we deploy a new war with all the approved changes for the week. We are at the mercy of state reporting requirement changes, and state mandated deadlines, so we don't have a lot of flexibility in when we do releases or updates. The nature of the business definitely exaggerates any warts, bumps or blemishes.) Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 10:08 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment Good Point Tim- There is a difference between 'copying' and 'deploying' which means you copied the war to Tomcat / went to manager module and did a restart copying - (always safer to delete the old war and then copy in the new war) deploying - You want to look at URL utilities like curl to automate the task to open the axis servlet URL such as http://localhost:8080/manager/html/reload?path=/axis Does this help you? Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; 'Martin Gainty' [EMAIL PROTECTED] Sent: Monday, May 22, 2006 9:33 AM Subject: RE: Ant deploy task and cluster-wide (farm) deployment Well, given that exec cp would be the same as my running it from the shell, and I've already observed that does not work (nor does it work from the explorer window(s)), I would guess that it won't work if forked-and-execed from ant. The question still remains - How do I know for sure that delete and copy are done and the app is undeployed / redeployed? With the deploy task, I know that the undeploy is complete when the http request completes. I was hoping there could be a similar mechanism in the works for the cluster model. I think it would be quite beneficial. I may have a few hours of spare time this week and if I do, I will attempt to characterize exactly what happens, how often, and when. Or maybe I should attempt to find some options in Samba that mitigate this. Tim -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 8:53 AM To: Tomcat Users List Subject: Re: Ant deploy task and cluster-wide (farm) deployment As I believe you have come across a Samba specific issue with copy task The intelligent and wonderfully talented folks at Bowstreet recommend using exec with copy over using Ant copy task (apparently preserving permissions and identifying which source/target file is 'older' would be accomplished using exec vs using ant copy) http://72.14.209.104/search?q=cache:ITQuwFOAUAAJ:buzz.bowstreet.com/post.asp %3Fmethod%3DReplyQuote%26REPLY_ID%3D506%26TOPIC_ID%3D272%26FORUM_ID%3D15+%22 ANT+copy%22+and+%22samba+mount%22hl=engl=usct=clnkcd=1 Does this answer your question? Martin --
Re: tomcat textbook
Hi, I am new to tomcat server, eventhough the tomcat has online documentation, i wud like to follow a textbook . I am not sure which book covers about tomcat from basic to advanced level. Can any of you send me the author name with the title of the book? If you search the list, you will find a reference to book from Wrox Regards, Gaël
Re: tomcat textbook
Gaël Lams wrote: Hi, I am new to tomcat server, eventhough the tomcat has online documentation, i wud like to follow a textbook . I am not sure which book covers about tomcat from basic to advanced level. Can any of you send me the author name with the title of the book? If you search the list, you will find a reference to book from Wrox Regards, Gaël Hi, depends on what you're looking for, from a system and network administrators point on view I would recommend Tomcat: The Definitive Guide from O'Reilly. Cheers! =)(= Bruno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1 - Problems referencing log4j.xml prop file within .war archive
Hello all, I have attempted to research this problem on my own with little progress. I am new to the dev scene so please keep this in mind if responding. I have a log4j initialization servlet, and here is the relevant snippet: public void init() throws ServletException { DOMConfigurator.configure(log4j.xml); } I am building the .war with ant and I don't believe Tomcat unrar's the archive when it is running. I need the log4j.xml properties file to be inside the war archive, since there will be different config files for each webapp. I cannot use getServletContext().getRealPath(/) since: The real path returned will be in a form appropriate to the computer and operating system on which the servlet container is running, including the proper path separators. This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive). So my question is, how do I reference the log4.xml file for the DOMConfigurator in these circumstances? Tomcat 4.1.31 If more information is required to answer, please contact me and I will respond momentarily. thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1 - Problems referencing log4j.xml prop file within .war archive
Konstantin G ha scritto: Hello all, public void init() throws ServletException { DOMConfigurator.configure(log4j.xml); } change it to. DOMConfigurator.configure(getServletContext().getResource(/log4j.xml)); Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
converting tomcat container from http to https
Hi everybody, Previously I had sent mail regarding this topic. The problem is after making necessary changes I am not able to start tomcat with https. Some message I sent previously is as follows:- First of all I created the keystore by reading the documentation and also made necessary changes to $CATALINA_HOME/conf/server.xml by uncommenting the SSL Connector HTTP tag and added new parameter keystorePass, keystoreFile for including the location of the file .keystore. And then restarted the tomcat. But when I give my URL https://coit-grid04.uncc.edu:8443/gridsphere or https://coit-grid04.uncc.edu:8443/ it still doesn't open the page and gives the error as page cannot be displayed. I am also attaching the changes I made in server.xml file for non-SSL connector tag and SSL connector tag. NON-SSL Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true emptySessionPath=true/ SSL Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystorePass=changeit keystoreType=PKCS12 keystoreFile=/home/tomcat/.keystore / And I am also attaching the log file created in the tomcat directory named catalina.out May 19, 2006 12:25:38 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in use:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297) at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:137) at org.apache.catalina.connector.Connector.initialize(Connector.java:1016) at org.apache.catalina.core.StandardService.initialize(StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:762) at org.apache.catalina.startup.Catalina.load(Catalina.java:488) at org.apache.catalina.startup.Catalina.load(Catalina.java:508) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412) - Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
Re: Recommendation for Tomcat web statistics program (AKA log analyzer) ?
Leon Rosenberg wrote: No, I mean things like number of request for each servlet, total number of time this servlet spent processing, number of errors, avg request duration for last 5m,15m,1h,1d,1week... whatever. In fact I might become interested in those information. Average/max duration of time for each servlet/JSP. Is it possible to get those information? you can always write a script which is getting the data and graphing it... The problem is to collect the data :-) It seems to me that you are more interested in Loggers (classes which does generate log files) than their representation. I understand you, me, as developer should be also more interested in those. Ok, I see, you are more interested in who's calling what on my server and less in what the f*ck is my server doing. In fact, I've just started my server and Awstats shows me who is calling what on my server. It could take less memory, I don't like because it use CGI (potential security issues?) but it works :), and it is usable. At some point I might be more interested in what the f*ck is my server doing. (for example : the response is slow). Off course I might write my own loggers and trace duration time, but it might be good idea to ask: Is there any generic tool to use to find out what the f*ck is my server doing? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1 - Problems referencing log4j.xml prop file within .war archive
Antonio, Your solutions works. Thank You! On 5/22/06, Antonio Petrelli [EMAIL PROTECTED] wrote: Konstantin G ha scritto: Hello all, public void init() throws ServletException { DOMConfigurator.configure(log4j.xml); } change it to. DOMConfigurator.configure(getServletContext().getResource(/log4j.xml)); Ciao Antonio - 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]
Classloader bug?
I think encountered a tomcat classloader bug. I have a jar file that contains several other jar files. I expected the classloader to be aware of the jar files that are packaged inside it. Anyhow, I kept getting classnotfound exceptions until I extracted the contained jars out from the containing jar. p.s, the problematic jar file is: aspectj-1.5.0.jar (of aspectJ) I would appreciate your opinion on this Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254
Re: Classloader bug?
Its not a bug. A jar needs to contain classes, not other jars. -Tim Asaf Lahav wrote: I think encountered a tomcat classloader bug. I have a jar file that contains several other jar files. I expected the classloader to be aware of the jar files that are packaged inside it. Anyhow, I kept getting classnotfound exceptions until I extracted the contained jars out from the containing jar. p.s, the problematic jar file is: aspectj-1.5.0.jar (of aspectJ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloader bug?
Well, A jar may contain any types of resources. Further more, When I'm using the aspectj jar from regular environment (which is not using the tomcat webclassloader) it works like a charm... I would expect the webclassloader to behave just as the native java classloader does. Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:28 PM To: Tomcat Users List Subject: Re: Classloader bug? Its not a bug. A jar needs to contain classes, not other jars. -Tim Asaf Lahav wrote: I think encountered a tomcat classloader bug. I have a jar file that contains several other jar files. I expected the classloader to be aware of the jar files that are packaged inside it. Anyhow, I kept getting classnotfound exceptions until I extracted the contained jars out from the containing jar. p.s, the problematic jar file is: aspectj-1.5.0.jar (of aspectJ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classloader bug?
Let me try again ... Its not a bug. A jar can contain resources, but if it contains other jars - they will be treated like any other resource in jar file. The classloader does not recursively load jars inside of jars. -Tim Asaf Lahav wrote: Well, A jar may contain any types of resources. Further more, When I'm using the aspectj jar from regular environment (which is not using the tomcat webclassloader) it works like a charm... I would expect the webclassloader to behave just as the native java classloader does. Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:28 PM To: Tomcat Users List Subject: Re: Classloader bug? Its not a bug. A jar needs to contain classes, not other jars. -Tim Asaf Lahav wrote: I think encountered a tomcat classloader bug. I have a jar file that contains several other jar files. I expected the classloader to be aware of the jar files that are packaged inside it. Anyhow, I kept getting classnotfound exceptions until I extracted the contained jars out from the containing jar. p.s, the problematic jar file is: aspectj-1.5.0.jar (of aspectJ) - 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: Classloader bug?
Then there is something I don't understand or don't know about... because when I run the same code under a regular environment (which is not under the tomcat webclassloader) it works perfectly... and I have the same set of dependencies as I have in the tomcat environment. In one environment, the class loader seems to be aware of the jars that are contained inside the aspectJ jar, in the other environment (which is the tomcat), the class loader is not aware of the jars that are contained inside the aspectj jar. What is it that makes the difference? Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:52 PM To: Tomcat Users List Subject: Re: Classloader bug? Let me try again ... Its not a bug. A jar can contain resources, but if it contains other jars - they will be treated like any other resource in jar file. The classloader does not recursively load jars inside of jars. -Tim Asaf Lahav wrote: Well, A jar may contain any types of resources. Further more, When I'm using the aspectj jar from regular environment (which is not using the tomcat webclassloader) it works like a charm... I would expect the webclassloader to behave just as the native java classloader does. Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:28 PM To: Tomcat Users List Subject: Re: Classloader bug? Its not a bug. A jar needs to contain classes, not other jars. -Tim Asaf Lahav wrote: I think encountered a tomcat classloader bug. I have a jar file that contains several other jar files. I expected the classloader to be aware of the jar files that are packaged inside it. Anyhow, I kept getting classnotfound exceptions until I extracted the contained jars out from the containing jar. p.s, the problematic jar file is: aspectj-1.5.0.jar (of aspectJ) - 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: Classloader bug?
I remember long ago I had a similar problem, where it appeared that a jar of jars was working' as you basically describe, but for others running my code, it didn't work. The problem: I had overlooked the fact that during my runtime invocation, the jars were actually on the classpath via oversight. And in fact, the jars inside the jar file were not responsible for the success of the runtime instance at all. I'm not saying this is your problem, but it can happen. I know of no instances where a classloader will look inside a jar for other jar files. You can write a classloader to do this, but generally it cannot be assumed of an arbitrary classloader working on your behalf. On 5/22/06, Asaf Lahav [EMAIL PROTECTED] wrote: Then there is something I don't understand or don't know about... because when I run the same code under a regular environment (which is not under the tomcat webclassloader) it works perfectly... and I have the same set of dependencies as I have in the tomcat environment. In one environment, the class loader seems to be aware of the jars that are contained inside the aspectJ jar, in the other environment (which is the tomcat), the class loader is not aware of the jars that are contained inside the aspectj jar. What is it that makes the difference? Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:52 PM To: Tomcat Users List Subject: Re: Classloader bug? Let me try again ... Its not a bug. A jar can contain resources, but if it contains other jars - they will be treated like any other resource in jar file. The classloader does not recursively load jars inside of jars. -Tim Asaf Lahav wrote: Well, A jar may contain any types of resources. Further more, When I'm using the aspectj jar from regular environment (which is not using the tomcat webclassloader) it works like a charm... I would expect the webclassloader to behave just as the native java classloader does. Asaf Lahav VP RD, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:28 PM To: Tomcat Users List Subject: Re: Classloader bug? Its not a bug. A jar needs to contain classes, not other jars. -Tim Asaf Lahav wrote: I think encountered a tomcat classloader bug. I have a jar file that contains several other jar files. I expected the classloader to be aware of the jar files that are packaged inside it. Anyhow, I kept getting classnotfound exceptions until I extracted the contained jars out from the containing jar. p.s, the problematic jar file is: aspectj-1.5.0.jar (of aspectJ) - 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] -- Mark AE6RT
JDBC Pool - one instance per web application or one instance per Tomcat server (Tomcat 5.5)
We define the JDBC connection settings in the context.xml file under TOMCAT_ROOT/conf We run four applications on this server. My question is: Does each application gets one instance of a pool or is the pool shared accross all the applications? This question applies to Tomcat 5.5 with the default JDBC connection pool implementation. -- Thank you, Edmon Begoli http://blogs.ittoolbox.com/eai/software
Re: error line 241
Thank you for that information. I now no longer get an error message but what happens is that another command prompt window opens up really quickly, flashes then closes. When i go to http://localhost:8080 i get page cannot be displayed so i dont think tomcat is running. Any suggestions please? -- View this message in context: http://www.nabble.com/error+line+241-t1631026.html#a4511999 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBC Pool - one instance per web application or one instance per Tomcat server (Tomcat 5.5)
depends on how you define it, you can define a global pool in GlobalResources (server.xml) or define the entire pool in your context Filip Edmon Begoli wrote: We define the JDBC connection settings in the context.xml file under TOMCAT_ROOT/conf We run four applications on this server. My question is: Does each application gets one instance of a pool or is the pool shared accross all the applications? This question applies to Tomcat 5.5 with the default JDBC connection pool implementation. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 5/22/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: converting tomcat container from http to https
make sure all your old tomcat processes are stopped, keyur sheth wrote: Hi everybody, Previously I had sent mail regarding this topic. The problem is after making necessary changes I am not able to start tomcat with https. Some message I sent previously is as follows:- First of all I created the keystore by reading the documentation and also made necessary changes to $CATALINA_HOME/conf/server.xml by uncommenting the SSL Connector HTTP tag and added new parameter keystorePass, keystoreFile for including the location of the file .keystore. And then restarted the tomcat. But when I give my URL https://coit-grid04.uncc.edu:8443/gridsphere or https://coit-grid04.uncc.edu:8443/ it still doesn't open the page and gives the error as page cannot be displayed. I am also attaching the changes I made in server.xml file for non-SSL connector tag and SSL connector tag. NON-SSL Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true emptySessionPath=true/ SSL Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystorePass=changeit keystoreType=PKCS12 keystoreFile=/home/tomcat/.keystore / And I am also attaching the log file created in the tomcat directory named catalina.out May 19, 2006 12:25:38 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in use:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297) at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:137) at org.apache.catalina.connector.Connector.initialize(Connector.java:1016) at org.apache.catalina.core.StandardService.initialize(StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:762) at org.apache.catalina.startup.Catalina.load(Catalina.java:488) at org.apache.catalina.startup.Catalina.load(Catalina.java:508) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412) - Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 5/22/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recommendation for Tomcat web statistics program (AKA log analyzer) ?
On 5/22/06, Mladen Adamovic [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: No, I mean things like number of request for each servlet, total number of time this servlet spent processing, number of errors, avg request duration for last 5m,15m,1h,1d,1week... whatever. In fact I might become interested in those information. Average/max duration of time for each servlet/JSP. Is it possible to get those information? Yes :-) Since today. you can always write a script which is getting the data and graphing it... The problem is to collect the data :-) It seems to me that you are more interested in Loggers (classes which does generate log files) than their representation. I understand you, me, as developer should be also more interested in those. Ok, I see, you are more interested in who's calling what on my server and less in what the f*ck is my server doing. In fact, I've just started my server and Awstats shows me who is calling what on my server. It could take less memory, I don't like because it use CGI (potential security issues?) but it works :), and it is usable. At some point I might be more interested in what the f*ck is my server doing. (for example : the response is slow). Off course I might write my own loggers and trace duration time, but it might be good idea to ask: Is there any generic tool to use to find out what the f*ck is my server doing? Glad you asked :-) In fact I've built some of such monitoring systems over the years. I was always surprised, that there is no default monitoring toolkit in the java world. I don't mean logging, logging is simple. But to log something, you first have to produce the data, and besides JVM Monitoring data from BEA's jrockit there isn't much out there for production systems. So I decided to write one. You may be the first to try it :-) I've put a little demo under: http://anotheria.net:8180/moskitodemo/ It's pretty simple, one monitored servlet, klick on the make a request link (as often as you wish of course). On each click it will sleep some time (emulating working) or throw an exception (emulating error condition). You can view the stats for 1,5,15 minutes, 1 hour, 1 day or since start of the server (or whatever interval the servlet designer configured). A note on the stats generation: The stats are interval stats. That means, that the 5 minute value isn't the value of the last 5 minutes, but the value of the last 5 minutes interval update. To illustrate this, following example: The server is started at 12:00. You are checking at 12:03 the 5 minute stats. What will you see? Nothing, since no 5 minute intervals are completed yet. If you'll check again at 12:07 you will see the stats gathered between 12:00 and 12:05. After 12:10 you will see the stats between 12:05 and 12:10. And so on. This is imho the only way to generate comparable stats. If your server is slow today, you want to compare a 5 minute value to the one from yesterday, not a 3 minute value to 5 minute value and such. However, enough said. Try it out, tell me what you think :-) regards Leon P.S. Moskito is open source. I'm creating a downloadable distribution right now, which will contain the core system, logging add-on for log4j. Addon for servlet support. DemoApps and demo webapp (the one you see). And the source code. The download page will be available tomorrow :-) - 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: problem related include directive action
Harshal Joshi wrote: I want to know exact difference between include directive include action. The JSP spec is your friend. http://java.sun.com/products/jsp/reference/api/index.html Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat textbook
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat textbook
Don't mean to continue the hijack, however if I might add that it would be very helpful to just put a little note at the bottom (in the footer of the emails that's appended by the listserver) a one liner, like: To start a NEW topic, use: users@tomcat.apache.org This gives the user a one-click way to start a new message to the right email address. I think people 'hijack' threads cuz it's easy to just hit the reply button then to hit the new button and type out the email address (or whatever two-step you probably have to do in order to get a new email to the right address) Just a suggestion, one mailing list I'm on has that and I wonder why everyone doesn't. -steve On May 22, 2006, at 7:21 PM, Mark Thomas wrote: When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - 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]
Can't find ajp13 connector
Below is my tomcat5 log file. As you can see, on startup it can't find the Ajp13Connector class. I can't find anywhere that I can download a jar of this package, but isn't it supposed to be in one of the standard .jar's anyway? What would have lost it? Using CATALINA_BASE: /var/lib/tomcat5 Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /var/lib/tomcat5/temp Using JAVA_HOME: /usr/lib/jdk Using Security Manager May 22, 2006 4:51:28 PM org.apache.commons.digester.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: org.apache.ajp.tomcat5.Ajp13Connector -Right here!!! at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .ja va:854) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .ja snip / TIA, anw Thanks Regards, Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat textbook
Steve Lianoglou wrote: Just a suggestion, one mailing list I'm on has that and I wonder why everyone doesn't. Thanks for the good idea. I've set it up. It it helps, we'll keep it. If it doesn't, I'll remove it. Mark - 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: Class loading question
Peter, thank you very much. I will search for a separate solution. Femi. On 5/22/06, Peter Crowther [EMAIL PROTECTED] wrote: From: Black Buddha [mailto:[EMAIL PROTECTED] even after I've stopped the webapp Tomcat still holds an open file handle to the generated library files Welcome to a JVM bug. The essence is that: - File stream objects in the JVM hold onto the file handle. - The handle is closed only when the object is GCed. - On Windows, but not on Unix, an open file handle prevents file deletion. Your options are: - Run on UNIX, possibly in a virtual machine; - Ensure a garbage collection before the files need to be deleted - can be difficult, as System.GC() is only a hint (as I found out when I ran into this under somewhat different circumstances); - Don't use a JVM with this defect (but I don't know if you have any alternatives). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Class loading question
interesting, are you saying that the handle is not closed when you call stream.close()? Peter Crowther wrote: From: Black Buddha [mailto:[EMAIL PROTECTED] even after I've stopped the webapp Tomcat still holds an open file handle to the generated library files Welcome to a JVM bug. The essence is that: - File stream objects in the JVM hold onto the file handle. - The handle is closed only when the object is GCed. - On Windows, but not on Unix, an open file handle prevents file deletion. Your options are: - Run on UNIX, possibly in a virtual machine; - Ensure a garbage collection before the files need to be deleted - can be difficult, as System.GC() is only a hint (as I found out when I ran into this under somewhat different circumstances); - Don't use a JVM with this defect (but I don't know if you have any alternatives). - Peter - 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: Class loading question
its not a good solution, as a VM tuning parameter is -XX:DisableExplicitGC or something like that. vineesh kumar wrote: Dear Peter, - Ensure a garbage collection before the files need to be deleted - can be difficult, as System.GC() is only a hint (as I found out when I ran into this under somewhat different circumstances); With java 1.5.0_04, I think it's possible to force the gc to run manually.There is a class called Runtime, from which we can call the gc,instead of System.gc(). This ensures that the gc will run on programmer's wish. - 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: Recommendation for Tomcat web statistics program (AKA log analyzer) ?
Leon Rosenberg wrote: http://anotheria.net:8180/moskitodemo/ However, enough said. Try it out, tell me what you think :-) I've got connection refused ;) P.S. Moskito is open source. I'm creating a downloadable distribution right now, which will contain the core system, logging add-on for log4j. Addon for servlet support. DemoApps and demo webapp (the one you see). And the source code. The download page will be available tomorrow :-) Great, for me it might have sense to post official announcement here. I hope announcement posts are not against the mailing list rules. I hope I will find time to help you test it. - 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: Can't find ajp13 connector
Allen Williams wrote: I can't find anywhere that I can download a jar of this package, but isn't it supposed to be in one of the standard .jar's anyway? What would have lost it? Using CATALINA_BASE: /var/lib/tomcat5 Using CATALINA_HOME: /usr/share/tomcat5 It seems that you are using Tomcat from RPM package or something. Some prepacked one. The problem might be in different directories for CATALINA_BASE and CATALINA_HOME. Hava you tried to put CATALINA_BASE to /usr/share/tomcat5 ? Anyway, I would recommend you to install original Tomcat (from Apache.org) and see does the problem stay. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]