Re: commons-logging logger instances - how to initialize in replicated session objects
Richard, You should also be carefull with the static keyword if you are using a clustered session. Its meaning is completely different that when running in just one jvm so I would remove it to avoid confusion. Since you don't need to replicate the loggers, you could also define them as transient, so they will not be serialized during session replication. In my classes, I usually use a protected transient Log logger declaration so you can also avoid to redeclare loggers for your subclasses. On Sat, 12 Feb 2005 06:43:03 -0700, Richard Mixon (qwest) [EMAIL PROTECTED] wrote: Thanks Trond, I had forgotten about readObject.That may be a better option than creating yet another utility method. Trond G. Ziarkowski wrote: Hi, I'm maybe stepping out of my territory here, but I think that static members are not serialized/deserialized. To re-initialize your static logger maybe you should try to implement the readObject(java.io.ObjectInputStream in) method from the java.io.Serializable interface something like this: readObject(...) { super.readObject(...); log = LogFactory.getLog(...); } Hope this is of some help Trond - 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] -- Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 301 permanent redirects in Tomcat - how to achieve
Put apache in front of it, You will gain in flexibility. On Fri, 11 Feb 2005 08:52:03 -0600, Jason Bainbridge [EMAIL PROTECTED] wrote: On Fri, 11 Feb 2005 09:45:45 -0500, Daniel Rhoden [EMAIL PROTECTED] wrote: In an environment totally hosted by Tomcat, how does one accomplish a 301 permanent redirect? What is the equivalent of .htaccess in Tomcat? Can 301 redirects be defined in web.xml? I think you are going to have to do this in a roundabout way with something similar to the solution here: http://www.sitepoint.com/forums/showthread.php?t=231044 Regards. -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory Usage from Mbean
Hi. I'm trying to build a Servlet to retrieve some memory information about tomcat. I'm using Tomcat 5.5.7. Which bean contains the jvm memory data? Thanx ___ Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException: getOutputStream() has already been called for this response
Just don't pass the ouput stream that you get from the servlet but create a new one. When you are done with your business, you'll copy the one on the other. On Wed, 9 Feb 2005 08:24:05 -0500, DAVID TURNER [EMAIL PROTECTED] wrote: Thanks for the advice Roberto. I agree that the approach is wrong, but in my real application I definitely use the MVC pattern as much as possible. The problem I'm running into is that my servlet calls other classes to do the business logic. One of these classes does XSLT. What I end up doing is getting the OutputStream from the servlet and passing it down to the class that does the transformation, which sends the results of the transformation to this OutputStream. Exceptions could possible occur during the transformation, and this is where I run into this problem of the jsp error page not getting called. The use of OutputStream or Writer for the XSLT results is what keeps me from doing exactly what you suggested. I have this one hook, so to speak. -- Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException: getOutputStream() has already been called for this response
Your approach is bad but don't worry. If you have time, read something about MVC. You will need it eventually. To make your servlet work, try something like: public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { StringBuffer myOutput = new StringBuffer(); try { myOutput.append(Here I'm not doing anything illegal); if(true) throw new BookNotFoundException(Book doesn't exist); } catch (Exception e) { System.out.println(Caught exception: + e.getMessage()); throw new ServletException(Dummy Exception, e); } // you reach this only if no errors have been caught so no error page to display OutputStream out = res.getOutputStream(); res.setContentType(text/plain); out.println(myOutput.toString()); } /roberto - Original Message - From: DAVID TURNER To: tomcat-user@jakarta.apache.org Sent: Tuesday, February 08, 2005 9:56 PM Subject: IllegalStateException: getOutputStream() has already been called for this response I'm trying to write a servlet that handles business logic exceptions by specifying in the web.xml the jsp error page that I want to use for a specific Exception (see web.xml snippet below). I have this working when I use response.getWriter() in the servlet instead of response.getOutputStream() -- see sample servlet code below. But, when I try to use the response.getOutputStream() approach the jsp error page doesn't work and an IllegalStateException: getOutputStream() has already been called for this response gets thrown because the jsp is probably trying to get the OutputStream also. Why does the response.getWriter() method work even after headers/data have been written to the writer? Is there any way to get the jsp error page to work with the getOutputStream()? I would like to eventually compress the response stream, but from all the examples I've come across on compression they all use getOutputStream. web.xml contents: error-page exception-typeBookNotFoundException/exception-type location/jsp/ErrorPage.jsp/location /error-page servlet contents: public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out = res.getWriter(); //OutputStream out = res.getOutputStream(); res.setContentType(text/plain); try { out.println(Line 1 of servlet); //out.write(Line 1 of servlet.getBytes()); throw new BookNotFoundException(Book doesn't exist); } catch (Exception e) { res.reset(); System.out.println(Caught exception: + e.getMessage()); throw new ServletException(Dummy Exception, e); } } -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recommendation: where to place app config file without overwriting during deploy. JNDI configuration also??
Hi Johathan. We use a different approach. Everything that is packed in a war is immutable i.e. it is not customer dependent. Then: * We store logs outside the war (in /var/log/tomcat/MyWebApp) * We define connection pools in the context xml file (MyWebApp.xml, the one in the conf directory). So we have two version of this file, one to be used in devel and an other to be used in production * We define any other customer-dependent variable in the file described above. So, with this approach, the only think you need to to when updating the war is replacing it! Apropos log4j.properties, you can define a new value of the system properties log4j.configuration (? please check the correct name), which will force log4j to read the log file from an other location. The problem is that if you define this property, you will have defined it for the whole container. I hope I gave a start to your application packaging re-thought. On Tue, 08 Feb 2005 18:28:56 -0600, Jonathan Wilson [EMAIL PROTECTED] wrote: Okay, lets try this variant of my original post.. I've started using JNDI under 5.0.19 and when I deploy to my remote server(using /Manager) I need to change the data sources url connect string(f/test DB to prod DB). Does everyone use Ant while building the WAR to filter/whatever this url? How do you make changes to the context.xml? Thanks in advance, JW Jonathan Wilson wrote: My current upgrade procedures are to shutdown tomcat 3.x, move the current version of my webapp directory somewhere else, recreate the /webapp directory, then un-jar the war file created by NetBeans. After doing this I then have to modify the WEB-INF/app.config file with customer-specific information. The code is identical, just configuration items change. If the customer has changed their app.config then I have to roll those changes into the new app.config file. Also, I have to copy the log files out of the old version into the new versions' /logs directory and modify the stock log4j.properties to point to their desired directory. Also, I can't always have access to the server to do this so I've written a procedure to explain this to another. Is there a way to store customer configuration info(app.config, log4j.properties) outside of the app and have the app still know how to find it? There must be a better way - nothing in the Tomcat Application Developers Guide that covers this. Thanks in advance, JW - 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] -- Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Class loader and garbage collector
I've seen that Spring defines a *org.springframework.web.util.IntrospectorCleanupListener * which flushes the bean introspector which may hold cached references to classes to be garbage collected. In tomcat 5.5.7, using jconsole, I've seen that using the IntrospectorCleanupListener is not enough. The number of loaded classes keep increasing when reloading a webapp. The jconsole only shows the number of loaded classes. Is there any way to see which classes are still referenced so that I can further investigate the problem? /roberto -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: separate log4j configurations
If you will configure log4j instances which are in the same classloader, they will conflict. Bootstrap | System | Common / \ Catalina Shared / \ Webapp1 Webapp2 ... http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html In other words, your webapp log4j.configuration will override your tomcat-wide log4j.configuration which may annoy you /roberto - Original Message - From: Tony Tomcat [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Tuesday, February 01, 2005 8:50 PM Subject: separate log4j configurations Is it safe to have 1 log4j.properties setup for all of tomcat and then override it for a webapp that might need slightly different logging? For example.. I place log4j.jar and the Jakarta commons-logging.jar into the $TOMCAT_HOME/common/lib directory and have a log4j properties file in $TOMCAT_HOME/common/classes/log4j.properties This properties file writes to ${catalina.home}/logs/all.out Then I have a test webapp that I want in its own log4j output file so I install a new log4j.properties file in that webapp. $TOMCAT_HOME/webapps/test/WEB-INF/classes/log4j.properties This properties file puts the output in ${catalina.home}/logs/test.out This appears to work but I'm just wondering if this is the correct way to go about it. The reason I want my main logging configuration in common/classes is because I want my operations team to control the logging instead of the war file. In the case of my test application I always want it to log at the debug level and it is only installed in production briefly so having the log4j.properties in the war file is fine and allows me to keep it logging at debug even if the other apps are at WARN. Any issues here? Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: separate log4j configurations
No, Tomcat will continue to log just as it was configured at the server level. And, actually, his log4j.properties file in WEB-INF/classes wouldn't even get picked up by log4j at all because the default logger repository has already been configured (assuming no manual configuration) so there would be no auto-configuration triggered. Yes...assuming no manual configuration :-D But in the general case, every new webapp will modify the configuration of the same log4j! /rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Updating webapps in a running production cluster.
Sorry if I insist with this post. Has anybody succeeded in updating a webapp in a tomcat cluster without loosing (any)requests? I´m wondering if this is possible at all with tomcat. If we don´t provide a solution we are forced to switch to an other servlet container :- Does anybody know if moving to Jboss, with tomcat as a servlet container, will help? Thanx - Original Message - From: Roberto Cosenza [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 8:59 PM Subject: Re: Updating webapps in a running production cluster. We have done some testing in this direction. Two tomcat in a cluster, with session replication. Shutdown B, update B, restart B Shutdown A, update A, restartAB What we experience is that, when shutting down any of the two servers. 1) Few requests are lost (let's say, on our machine, for 0.30 seconds?) 2) Objects stored in the session disappear temporarly, causing eventually annoing npe's. We were wondering if it is possible to achieve an higher reliability but we didn not succeed. /roberto - Original Message - From: Derrick Koes [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 8:46 PM Subject: RE: Updating webapps in a running production cluster. This is how we update apps in time critical situations. Shut one down and update. Bring it back up. Shut the next down and update. Bring it back up and so on. - 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: Updating webapps in a running production cluster.
We used : jakarta-tomcat-5.5.4 apache 2.0.49 mod_jk2 (jakarta-tomcat-connectors-1.2.8-src) Linux webster2 2.4.26 #11 SMP Thu Apr 22 13:16:46 CEST 2004 i686 i686 i386 GNU/Linux jdk-1_5_0_01-linux-i586.bin CATALINA_OPTS='-Xmx512m -Xms256m -XX:MaxPermSize=256M' I will test a new version and let you know. - Original Message - From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Saturday, January 29, 2005 8:04 PM Subject: Re: Updating webapps in a running production cluster. Hello, with which tomcat version you test this, please try the new 5.5.7 and tell us the result! :-) Please tell us your env, Apache, mod_jk JDK, OS Thanx Peter PS: You can find my cluster dev template at http://tomcat.objektpark.org/examples/05_02_tomcat_example.tar.gz, Sorry the docs are german and it works with tomcat 5.5.5m jdk 5, apache 2.0.52, mod_jk 1.2.8 on Windows/Linux Roberto Cosenza schrieb: Sorry if I insist with this post. Has anybody succeeded in updating a webapp in a tomcat cluster without loosing (any)requests? I´m wondering if this is possible at all with tomcat. If we don´t provide a solution we are forced to switch to an other servlet container :- Does anybody know if moving to Jboss, with tomcat as a servlet container, will help? Thanx - Original Message - From: Roberto Cosenza [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 8:59 PM Subject: Re: Updating webapps in a running production cluster. We have done some testing in this direction. Two tomcat in a cluster, with session replication. Shutdown B, update B, restart B Shutdown A, update A, restartAB What we experience is that, when shutting down any of the two servers. 1) Few requests are lost (let's say, on our machine, for 0.30 seconds?) 2) Objects stored in the session disappear temporarly, causing eventually annoing npe's. We were wondering if it is possible to achieve an higher reliability but we - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Updating webapps in a running production cluster.
I do mean mod_jk2. Could this be the problem? /roberto - Original Message - From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Saturday, January 29, 2005 10:42 PM Subject: Re: Updating webapps in a running production cluster. Please update to Apache 2.0.52 and I hope you mean mod_jk 1.2.8 not a mod_jk2 Regards Peter Roberto Cosenza schrieb: We used : jakarta-tomcat-5.5.4 apache 2.0.49 mod_jk2 (jakarta-tomcat-connectors-1.2.8-src) Linux webster2 2.4.26 #11 SMP Thu Apr 22 13:16:46 CEST 2004 i686 i686 i386 GNU/Linux jdk-1_5_0_01-linux-i586.bin CATALINA_OPTS='-Xmx512m -Xms256m -XX:MaxPermSize=256M' I will test a new version and let you know. - Original Message - From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Saturday, January 29, 2005 8:04 PM Subject: Re: Updating webapps in a running production cluster. Hello, with which tomcat version you test this, please try the new 5.5.7 and tell us the result! :-) Please tell us your env, Apache, mod_jk JDK, OS Thanx Peter PS: You can find my cluster dev template at http://tomcat.objektpark.org/examples/05_02_tomcat_example.tar.gz, Sorry the docs are german and it works with tomcat 5.5.5m jdk 5, apache 2.0.52, mod_jk 1.2.8 on Windows/Linux Roberto Cosenza schrieb: Sorry if I insist with this post. Has anybody succeeded in updating a webapp in a tomcat cluster without loosing (any)requests? I´m wondering if this is possible at all with tomcat. If we don´t provide a solution we are forced to switch to an other servlet container :- Does anybody know if moving to Jboss, with tomcat as a servlet container, will help? Thanx - Original Message - From: Roberto Cosenza [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 8:59 PM Subject: Re: Updating webapps in a running production cluster. We have done some testing in this direction. Two tomcat in a cluster, with session replication. Shutdown B, update B, restart B Shutdown A, update A, restartAB What we experience is that, when shutting down any of the two servers. 1) Few requests are lost (let's say, on our machine, for 0.30 seconds?) 2) Objects stored in the session disappear temporarly, causing eventually annoing npe's. We were wondering if it is possible to achieve an higher reliability but we - 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]
[OT]Re: Logger file
Check on log4j homepage. One strategy is to have a log4j.properties file in your classpath. There you will define where you want your log file to be saved. Please do not discuss this argument on this mailing list since it is not tomcat related. /Roberto - Original Message - From: micky none [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 7:03 PM Subject: Logger file Hi Friends, I am using this file for outputting log data,can someone please tell me how to save this data to some file instead of outputting,so that I can have a look at it later on... any help would be appreciated import org.apache.log4j.Logger; import org.apache.log4j.BasicConfigurator; public class MyApp { static Logger logger = Logger.getLogger(MyApp.class); public static void main(String[] args) { BasicConfigurator.configure(); logger.info(Entering application.); System.out.println(Log file); logger.info(Exiting application.); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Updating webapps in a running production cluster.
We have done some testing in this direction. Two tomcat in a cluster, with session replication. Shutdown B, update B, restart B Shutdown A, update A, restartAB What we experience is that, when shutting down any of the two servers. 1) Few requests are lost (let's say, on our machine, for 0.30 seconds?) 2) Objects stored in the session disappear temporarly, causing eventually annoing npe's. We were wondering if it is possible to achieve an higher reliability but we didn not succeed. /roberto - Original Message - From: Derrick Koes [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 8:46 PM Subject: RE: Updating webapps in a running production cluster. This is how we update apps in time critical situations. Shut one down and update. Bring it back up. Shut the next down and update. Bring it back up and so on. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: in web.xml
Sure! Mark wrote: will getInitParameter(...) translate lt; to ? --- Peter Crowther [EMAIL PROTECTED] wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
High reliability tomcat
Hi. We have two instances of tomcat configured as cluster. We are using: Tomcat 5.0.28 mod_jk2 Apache2 Our purpose it to be able to upgrade a webapp with no down time. Now, everythink works fine except that: If we shut down server A while incoming requests are coming in, they eventually get a null pointer exception when retrieving objects from the session, as if the session was new. After a while, (seconds), the session is fine again. I wonder if what we are trying to achieve is *impossible* or if we may have some problem in our configuration. Does anybody has any experience of this kind? Thanx, -Roberto
[OT] Re: Tomcat mailing list is full of non tomcat topics
What I mean is that since, as somebody reminded, some of the users make confusion about what is tomcat and what is not, why don't we help them ? An idea, seen somewhere else, could be to post on a regular basic a short mailing list faq. Some days ago we had a 20 post about how to convert a char to an intvery legitimate question but very OT. I know that you can't kill a user for writing such questions/answers, but it they were just reminded, from time to time... I think that educating the list users is a duty of the mailing list itself. /roberto -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Tomcat mailing list is full of non tomcat topics
It's like those posters that remind people not to be rude with their cellphones in public places: the offenders hardly recognize themselves, so the posters are a waste. =) -QM That's a risk, but there is people who care but just needs to be informed -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: prevent multiple form posts using only servlets
Yes there is. But the problem is not really related to a servlet just to web architecture. A strategy is to put an object token in the session when you show the form and remove it when the user clicks upload. You will then deny uploads if you don't have the token in the session . Spring forms have support for it (www.springframework.com). /Roberto Elihu Smails wrote: Is there a way to prevent multiple form posts from the same page/user/session using only servlets? I have a page where users can upload files, but I do not want them to keep smashing the upload button if their files are large, and the user becomes impatient. thank you. __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat synchronous shutdown?
Will tomcat wait until time consuming requests are completed before shutting down? /rob - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 9:36 PM Subject: RE: Tomcat synchronous shutdown? Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. If it takes too long is a vague criterion at best, as conditions and use-cases wildly differ. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Kevin A. Burton [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 3:26 PM To: Tomcat Users List Subject: Tomcat synchronous shutdown? Currently Tomcats shutdown model is to politely request that the server shutdown. Most of the time Tomcat is friendly and will shutdown as requested but sometimes it won't do as its told and run forever. This seems to happen if a shutdown hook has problems or it runs out of memory. This is happening to us now that we're on 5.5. Is there a way to: 1. Make Tomcat's ./bin/shutdown.sh script block until it shutdown 2. Return a status code about the shutdown success 3. Optionally terminate the java process with a -9 if it takes too long The same should happen for Tomcat startup btw... Thoughts? Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat mailing list is full of non tomcat topics
Hi cats worldover. It's been a while that I've reading the posts on this mailing list and I can easily say that about 30% are not pertinent to tomcat but are related to web technology in general. Isn't it time to route this traffic to other mailing lists? Can't the tomcat project host new list for those users lookin for other kind of help? It will sure enhance the quality of the list a lot. /Roberto
Re: Tomcat mailing list is full of non tomcat topics
I'm not talking about moderating but about informing the users that this is not the right place. Many important (and related) question do not get enough attention in this sea of messages. /rob - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 10:57 PM Subject: RE: Tomcat mailing list is full of non tomcat topics From: Roberto Cosenza [mailto:[EMAIL PROTECTED] Subject: Tomcat mailing list is full of non tomcat topics Isn't it time to route this traffic to other mailing lists? Are you volunteering to be the policeman? Believe me, moderating any mailing list is a thankless task. Been there, done that, burned the t-shirt, won't ever consider it again. The subjects of nearly all of the off-topic posts already have appropriate mailing lists (not necessarily within Apache), but the posters frequently just don't know how to look for them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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: logging swallow output
Yes, I'm using a ConsoleAppender. Are you telling me to use SimpleLog ? I don't think that the link you sent me clarifies my ideas... /rob David Stevenson wrote: Is your Log4j configured to use a ConsoleAppender? That might possibly explain it. http://jakarta.apache.org/commons/httpclient/logging.html David Stevenson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logging swallow output
For some reason I still have a lot of messages getting to catalina.out even If I have swallowoutput=3 and my logger gets a copy of the message. What can the problem be? I use tomcat 5.0.28 -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging swallow output
I did mean swallowOutput=true My typo. Problem still there, strange... (I'm using commons-logging + log4j to log) Ben Souther wrote: On Fri, 2004-12-03 at 04:28, Roberto Cosenza wrote: For some reason I still have a lot of messages getting to catalina.out even If I have swallowoutput=3 and my logger gets a copy of the message. What can the problem be? I use tomcat 5.0.28 You might want to take a look at the configruation documentation: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html swallowOutput (which is case sensitive) is not looking for an int. It's looking for true/false. Here a working example: Context path=/myapp docBase=myapp debug=0 crossContext=false reloadable=false privileged=false swallowOutput=true Logger directory=f:\\tomcat\\logs className=org.apache.catalina.logger.FileLogger prefix=myapp_log. suffix=.txt timestamp=true/ /Context - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat5.0 shutdown
You are cool... First you ask a question and then you ask to be removed from the list very cool... Take a look a the logs, there should be some message which can help you. /rob usman usman wrote: tomcat shuts down without any warning what could be the problem? also how do i remove my name from the mailing list? _ Get 10Mb extra storage for MSN Hotmail. Subscribe Now! http://join.msn.com/?pgmarket=en-hk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Which webframework to use?
Take a look at Spring. It is much more than a MVC though. Allistair Crossley wrote: +1. we've created an intranet on struts, integrated backend solutions like a CMS, search engine, custom applications, SQL server etc... is very cool. Allistair. -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jaring a zip file
Unzip it and then run jar -cvf filename.jar theoldfiles to create a new jar -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Implicit import
Pablo Carretero Sánchez wrote: Hi, do know if can I import java packages in a implicit way in a JSP?? I means, I'm working with a Bea Weblogic application, and I want run this app in Tomcat. There are several jsp in Bea using Vector without the import java.utils.Vector. This jsp works fine in Bea but not in Tomcat. Do you know why?? Best regards. The jsp engine will compile the jsp into a servlet. This process is dependent on the j2ee server. It may be that weblogic need a java.util.Vector (not java.utilsbtw) for any other purpose and then you get the import automatically. A correct jsp, anyway, should import those classes by itself. -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Location of third party jar files.
Kyle A. Boyd wrote: Yes, it is in tomcat/webapps/MyServer/WEB-INF/lib/. If I move it to tomcat/common/lib/ and restart Tomcat everything works ok. Kyle Kyle, The right approach is to put web app specific jars in the WEB-INF/lib directory. Seldomly you need to put stuff in the commons/lib directory. You probably have a corrupted jar file or you have bad permissions on the WEB-INF/lib directory. Check that the user running Tomcat can access the dir correctly. /rob -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomact + jk2: won't shutdown
Have anybody experienced problems with Tomcat not responding to the shutdown command when it is running a jk2 connector? If I remove the connector, everything is fine. With the connector when I run shutdown.sh the server goes down but som threads are still alive. Can anybody help me in debugging the problem? (Strange enough: we have an other box which is running exactly the same configuration and it works perfectly) -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomact + jk2: won't shutdown
Shapira, Yoav wrote: Hi, The most common reason for failed shutdowns as you describe, i.e. Tomcat closing but some threads (and therefore the JVM process) still alive, is your app (or libraries used by your app) starting up non-daemon threads and not shutting them down on exit. The JVM cannot shut those down for you, and it cannot exit. I deleted all the web apps, so I don't have anything except the container running and still the same problem. Strange... /r - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logger configuration
How do I configure context loggers so that everything written to stdout or stderr goes to a special file? My debug messages are only printed to catalina.out. Thanx -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logger configuration
Bedrijven.nl wrote: see tomcat page http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html Thanx, I read the manual. The fact is that the logger seems to not to log what i print using System.out.println. Am I right or am I just confusing stuff? -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logger configuration
Benjamin Armintor wrote: Do you have the swallowOutput attribute of your Context set to true? That's what redirects the sysout messages. Also, if swallowOutput=false on your DefaultContext, you will have to set override=true on your Context. Yes, thanx, That was exactly what I was looking for. /roberto -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logger configuration
Bedrijven.nl wrote: See the product Log4j. -Oorspronkelijk bericht- Van: Roberto Cosenza [mailto:[EMAIL PROTECTED] Verzonden: Tuesday, September 07, 2004 1:48 PM Aan: Tomcat Users List Onderwerp: Re: Logger configuration Bedrijven.nl wrote: see tomcat page http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html Thanx, I read the manual. The fact is that the logger seems to not to log what i print using System.out.println. Am I right or am I just confusing stuff? I haven't asked for a better loggin solution. I asked how to redirect stdout and stderr to the tomcat logger. Please read the question next time :-) /rob -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]