RE: Free reporting s/w that works with apache+tomcat
you should consider using POI, if you need Excel-only features like footer repeated on every page. Specifically: http://jakarta.apache.org/poi/hssf/quick-guide.html#HeaderFooter -Original Message- From: U K Laxmi [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 9:53 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Free reporting s/w that works with apache+tomcat Thank you for the information. What i mean by header footer is, column headers and some information like model number, date and approval signature columns etc.. to appear in every page when they take hard copy of the report. Is such a thing possible? Pls inform. The end user of the application doesn't want any manual intervention. When he click on 'Export to Excel' button in the web application HTML report, he want the excel file get downloded (file dialog box appears he save it to his local disk) which has all header footer information set. Currently my application can provide header once at the top of the report and footer (approval columns date) at the very bottom of the report. THe column headings approval columns doesn't appear on every page. I'm unable to ahcieve this in web (HTML). It i cna do it in web, when i download that in excel, it will show. Do you know any work around for this? Pls inform. Thank you. Laxmi --- Frank W. Zammetti [EMAIL PROTECTED] wrote: Hi, CSV files don't generally contain header and footer information... you can get column headers in the first row, that's about it. I don't believe DataVision will export to Excel natively, but check the docs in case I'm wrong. Do you really mean header and footer in the sense of a Word document? It's a bit unusual to have such a thing in an Excel document (although not at all unheard of), so I'm wondering if maybe you mean something a little different, i.e., maybe just column headers and some sort of totals? Frank U K Laxmi wrote: Thank you for the information. I read your report and it looks interesting. I went to DataVision web site and found that it can export comma separated files ie. CSV file. Will it be possible to retain header and footer information with a .CSV file? I basically want excel files as the report output. B'coz the end user needs to send to those reports to it's vendors. Excel is the most desired format for them. Pls give your feedback on this before i start implementing on this. Thank you. --- Frank W. Zammetti [EMAIL PROTECTED] wrote: Take a look at DataVision. I think you'll like it. I wrote an article a while back specifically dealing with using it in web applications. Although the article uses servlets and you say your using JSPs (just JSP's?) it should still be applicable. http://www.omnytex.com/articles Feel free to ping me if you decide to use it and need some help getting going beyond the article and included documentation. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com U K Laxmi wrote: I'm developing a web application using apache+tomcat on windows 2000 machine. I'm using Ms Access 2003 as the backend. I'm using JSP for developing web application. I'm developing some web based reports in HTML. But when i export them to Excel, it doesn't look exactly same as that of HTML report. Moreover i need some header and footer information appear in the report. That i'm unable to achieve using JSP and HTML. So, i'm looking for a free reporting software that can meet above functionality and can work with apache+tomcat. If anyone know any work worunds for my problem, pls inform me. It will be a great help to me. Thank you. __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail - 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] Discover Yahoo! Have fun online with music videos, cool games, IM and more. Check it out! http://discover.yahoo.com/online.html -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
RE: Tomcat forgets a session attribute when reloading context
It's possible that your User object is not serializing correctly. As I understand things: when contexts are reloaded, the sessions are serialized first, the context reloads, and the sessions are restored from their serialized form. If one of your attributes doesn't make it through this process, then the Session itself is not invalidated; you just don't get that particular attribute back. I've seen this happen on my own web-app. -Original Message- From: Francisco J. León [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 9:51 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat forgets a session attribute when reloading context Hi 'catters. I am having a small but annoying behavior in Tomcat. Tested on 5.0.28 and 5.5.9. I posted this as bug 34547 but a developer thinks it's not a bug. I use Eclipse 3.02 for development, along the Sysdeo Tomcat Plugin and Freemarker for MVC. My context path is set to be reloadable, and when i am coding, if i make some change to the code, the context gets reloaded by the plugin, and a session attribute gets null'ed. The weirdest thing is that not all of the session attributes are nulled. Just this one we will call user. I will try to explain what happens with pseudocode. When the users log on to my application, this happens: ForumUser user = run_sql_here; ForumUser is a bean with some properties. That query stores: -a user id (int) -a timezone (string) -a language (string) All of the other attributes in the object are not used at this time. session.setAttribute(logged_user_name,username); session.setAttribute(permission,permissions); if (user!=null) { session.setAttribute(userpreferences,user); } This is the ONLY time that attribute gets set. It ONLY gets removed when the session is invalidated. When i change code and the context gets reloaded, the user attribute gets null, and the other 2 attributes (permission and logged_user_name) are OK If i don't reload the context, everything is OK. Does anyone have any idea of what is going on? Do you guys need my code? I will gladly do whatever test you need me to do to resolve this. It is very annoying to keep logging out and back in to test new code so my session gets corrected Why this doesn't look like a bug? Tomcat deletes an object in my session. If it would delete all objects, then i wouldn't have posted this, since i would have thought that reloading a context would delete the whole session. I think my code is ok since i just set that attribute (the one that gets null) at login. -- Francisco Javier León Arosemena X Semestre de Lic. en Computación Maracaibo, Edo. Zulia, Venezuela - 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: Unable to load classes from commons-lang-2.0.jar
I've never used common/endorsed. Have you tried common/lib? Speculation: common/endorsed, though listed on this page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html might only be used in cases where you are attempting to 'override' JDK-supplied classes. On the previous linked page, see the section XML Parsers and JDK1.4. In short: the TC classloaders might not look in common/endorsed unless you are looking for a JDK class. Mike Curwen -Original Message- From: ofero [mailto:[EMAIL PROTECTED] Sent: Monday, March 21, 2005 1:57 AM To: tomcat-user@jakarta.apache.org Subject: Unable to load classes from commons-lang-2.0.jar Hi, I need to use classes from commons-lang-2.0.jar in Tomcat 5.0.29 on Red Hat Linux (More specifically the class StringUtils). The jar is included in the web app and put in the /common/endorsed but still I am unable to load the classes. Does anyone help me solve the problem ? - 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: Help with tomcat on windoze/nfs
How is the drive mapped? By what logged-in windows user? Is it the same user that Tomcat is running as, and are you sure? ;) Mike Curwen -Original Message- From: Randy Paries [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 3:51 PM To: 'Tomcat Users List' Subject: Help with tomcat on windoze/nfs Hello, I have the unfortunate opportunity of having to set up tomcat on windoze (sorry I am a linux bigot) I have this servlet that has to run a windows program. (that works fine) I have to create a directory on a NFS mount. In my test servlet, I have this snippet of code(see below) If I do /myservlet?dir=c:/ (is see it ok) If I do /myservlet?dir=z:/ (z is a mapped nfs mount, it does not see it) Here is the kicker, I wrote a little class that was basically the same but just a normal Java app, and it see z:/ OK Help??? Thanks === //DIR is a param passed in PrintWriter out = null; res.setContentType(text/html); out = new PrintWriter (res.getOutputStream()); out.println( looking for dir +DIR+BR); File fpath = new File(DIR); out.println(path--+fpath.getAbsolutePath()); if ( !fpath.exists() ){ out.println(Does not exist); }else{ out.println(exist); } out.close(); === - 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: Trying to understand exceptions and error-page
Part of the spec says if no error-page declaration containing an exception-type fits using the class-heirarchy match, and the exception thrown is a ServletException or subclass thereof, the container extracts the wrapped exception... So supposing for a minute that Tomcat internals ignore any error-page that has exception-type 'ServletException', it would then proceed to unwrap the exception to get down to your DAOException. Which you've already proved that you *can* catch. I've successfully caught 'all other' exceptions (which I suppose must include ServletExceptions), by using one error-page declaration that catches status-code500/status-code, and then multiple exception-type's to catch more specific exception types. This is all on TC5.0.28 (TC4.x seemed a bit flakey on exceptions and errorpages, but that could have been PEBKAC) -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 11:27 AM To: Tomcat Users List Subject: Trying to understand exceptions and error-page With nothing configured for errors, I get a Tomcat error page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: org.xml.sax.SAXParseException: blah, blah... ... root cause com.example.DAOException: org.xml.sax.SAXParseException: blah, blah... ... Caused by: org.xml.sax.SAXParseException: blah, blah... The code that causes it looks like this: try { ... } catch ( Exception ex ) { throw new DAOException( ex ); } Can someone explain why, if I put this in web.xml, error-page exception-typejavax.servlet.ServletException/exception-type location/WEB-INF/jsp/error/exception.jsp/location /error-page it does NOT display the .jsp and instead shows the same thing as above with all the stack traces? I also tried configuring it for java.lang.Exception, but no luck there, either. I _can_ get a good error page if I configure it for the 'root cause' DAOException, I'm just confused as to why I can't trap the ServletException. Thank you, Wendy Smoak http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatErrorPage - 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: percent 0008 exploit
Is it this old chestnut? Mike Curwen Product Manager Globally Boundless www.globallyboundless.com 204.885.7733 ext 227 Privacy Compliance: This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any other distribution, copying or disclosure is strictly prohibited. If you have received this message in error, please notify us immediately by telephone (800) 665-1321 and reply to the sender via e-mail, confirming deletion of the original e-mail and any attachment(s). -Original Message- From: Norris Shelton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 9:27 AM To: Tomcat Subject: percent 0008 exploit A co-worker that supports a federal sight just got an e-mail from their admins indicating that his site is exposing jsp source code when they appent %0008 to the end of their URLs. The view source shows his exact pages. He is using Tomcat 4.1.30 and JDK 1.4.2_05 I tired it on my servers (TC 4.1.30 and JDK 1.4.2_06). Is this a JRE vulnerability? = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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: percent 0008 exploit
hmm.. that would be _this_ old chestnut... (a little eager on the send, sorry.) http://shh.thathost.com/secadv/2001-03-29-tomcat.txt This particular exploit was fixed a long time ago (wasn't it?) Mike Curwen -Original Message- From: Norris Shelton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 9:27 AM To: Tomcat Subject: percent 0008 exploit A co-worker that supports a federal sight just got an e-mail from their admins indicating that his site is exposing jsp source code when they appent %0008 to the end of their URLs. The view source shows his exact pages. He is using Tomcat 4.1.30 and JDK 1.4.2_05 I tired it on my servers (TC 4.1.30 and JDK 1.4.2_06). Is this a JRE vulnerability? = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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: [OT] Automated tool for creating mime-multipart e-mail from web page
my ISP does this... send an email with image attachments, that all show up in the right places, and without that download warning. I'd be more interested in a really good JavaMail tutorial that shows me how to create the javamail mime multi-parts. Every page I find on google seems to have a slightly different take on it. Mike Curwen -Original Message- From: Robert Hunt [mailto:[EMAIL PROTECTED] Sent: Saturday, February 12, 2005 1:08 PM To: tomcat-user@jakarta.apache.org Subject: [OT] Automated tool for creating mime-multipart e-mail from web page I'd like to push a copy of a web page via e-mail in a background Tomcat thread/servlet. The idea is to serve up-to-date news and info without requiring patrons/subscribers to follow a link to the original page or require them bypass the Outlook Express warning about some items blocked to prevent sender from identifying your computer. That is, I'd like to use Java (and javamail) to create a mime/multipart message that bundles *everything* including items from link, img and script (et. al.) tags. Much like the IE Save As... web page archive to create a .MHT from a URL -- but have it done in an automated fashion. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTMLArea and SpellCheck plugin
yes to HTMLArea, haven't tried spellcheck. Mike Curwen -Original Message- From: Kelly, Steve [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 11:48 AM To: Tomcat Users List Subject: HTMLArea and SpellCheck plugin Anybody successfully implemented a tomcat webapp that uses the HTMLArea editor and the SpellChecker plugin (both free from Interactive Tools and Dynarch) ? TIA Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: HTMLArea v. fckeditor
for me, the fckeditor drop-downs don't work. The font, size, etc select areas. I click them, and then they roll-up before I can select a different value. and yah, how about that name? Mike Curwen -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 1:28 PM To: Tomcat Users List Subject: Re: HTMLArea v. fckeditor See http://www.fckeditor.net/ Aside from the odd name (we do have to give credit after all!), that does look like a nice one. Has anybody used it enough to know how stable it is? I noted that it's on 2.0, which is good, but it's not considered final. I like that it appears to be a bit more active than HTMLArea. David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tale of two servers
does the fast one run any anti-virus software? That's been known to kill performance. Mike Curwen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2
-Original Message- From: Richard Walters [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 2:54 AM To: tomcat-user@jakarta.apache.org Subject: mod_jk2 how/where does mod_jk2 know where to find java mod_jk2 doesn't need to find java. you have to have tomcat running to make it work? That's like asking if you need a lamp turned on to make an extension cord work. where do error messages show up? We use JK (not jk2) and its log file is in $APACHE_HOME/logs/mod_jk.log. There's bound to be something similar for jk2. Note also: http://jakarta.apache.org/tomcat/connectors-doc/news/20041100.html#20041115. 1 Richard - 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]
Manager app that crosses Hosts
Hello list, I was wondering if anyone has attempted to tweak the tomcat manager app to cross hosts? And does anyone know if there anything in the architecture of Tomcat that precludes it? I guess what I'm really asking is: Does anyone know of any reason that it is _not_ possible to do? Before I dive into completely unknown territory (ie: tomcat source) I thought I'd ask around. If anyone has ever glanced at the source, they're closer to it than I am ! Thanks for any help Mike Curwen
RE: How does Tomcat know that a browser supports cookies?
So you're saying that you've seen Tomcat *not* rewrite URLs in a response to a first request from a client that *does* support cookies, and *does* rewrite the URLs in a response to a first request from a client that doesn't support cookies? That would indeed be very powerful software. Tomcat needs at least one request/response cycle to be able to determine if cookies are enabled or not; which it does on the subsequent request/response cycle. Your request comes in. You have no cookie (either because you don't allow them, or it's your first visit this session) Tomcat responds with a session cookie, and if you've run URLs through that method, URLs are rewritten too. The next time you request something, your browser sends back the cookie (if you allowed the cookie). Tomcat sees this cookie, and then stops rewriting URLs. If your browser doesn't send back a cookie with the next request, the method continues to rewrite URLs. My only doubt is: Does it continue to also send the cookie in a 'faint hope' that it might one day be accepted? This could be easily investigated with liveheaders in firefox. Come to think of it, liveheaders would help you confirm what I've just said. ;) Mike Curwen -Original Message- From: Harry Mantheakis [mailto:[EMAIL PROTECTED] Sent: Thursday, January 27, 2005 10:12 AM To: Tomcat Users List Subject: Re: How does Tomcat know that a browser supports cookies? I understand what you are saying, Javier, if you have a round-trip situation, where you set cookies in one response, and then test for them in a follow-up request. But I'm not convinced that's how Tomcat does it. The first time a client connects to a server, there will not be any cookies, session or otherwise, for the client browser to send to the server - but Tomcat can still figure out whether or not cookies are enabled in the client browser. At least, that seems to be the case with my application: Tomcat automatically decides whether or not to apply URL rewriting if I call the HttpServletResponse.encodeURL() method. I wonder if anyone here knows for sure? Regards Harry I use a HttpSession object. HttpSession object = null; When user access to site, i use: object = request.getSession(); later i use: boolean n = object.isNew(); if n = true, then user is not using cookies. I suppose that tomcat is using Session Cookies and not re-writting politic.. because, tomcat keep session with user using cookies, so.. if session is new mean that user is new for tomcat, because it can't send cookie. regards.. Javier At 10:12 27-01-2005 +, you wrote: The API for the HttpServletResponse.encodeURL() method states that the implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. How does Tomcat know whether or not a browser supports cookies, or session tracking is turned off? Is it simply a case of looking for the presence of a Cookie: header in the request, and assuming that cookies are enabled if the header is found? And if that is the case, would I be correct in assuming that browsers (when permitted by their users) will set Cookie: headers in their requests even if they do NOT actually have any (previously set) cookies to send back to the server? I'm just guessing, of course - and I know I should not generalise about browsers: I'm thinking of IE, Mozilla/Firefox and Opera. TIA Harry Mantheakis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Javier Villalobos Arancibia Ing. Civ. Electrónico ImageMaker Information Technology - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and Sesssion question
Yes, you would still have needed to send your links through one of : HttpServletResponse.encodeURL() or HttpServletResponse.encodeRedirectURL() (which is a fairly good practice anyways). Your other option is to spend a bunch of time coding a javax.servlet.Filter that wraps the response, then parses through the response, and re-writes the links for you. iPlanet (yes, I'm an iPlanet survivor) was able to do this long before Filters, with mixed success. Mike Curwen -Original Message- From: Tony Chan [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 5:09 PM To: 'Tomcat Users List' Subject: RE: Tomcat and Sesssion question Thanks for your reply. The situation is that we have an application already written. However, for technical reasons, we need session ID to be attached to all links within the application. Instead of going to every file and making modifications, I am looking into the possibility of doing that by changing Tomcat configurations. You have provided an excellent solution but the application will still have to be modified on so that all URLs are encoded. Am I correct? Thanks again! Tony -Original Message- From: Jukka Uusisalo [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 12:23 PM To: Tomcat Users List Subject: Re: Tomcat and Sesssion question Tony Chan wrote: Hi, Does anyone know if there is any setting in tomcat 5 that I can use to always attach JSESSIONID to all links in a webapp? Also, is there any way to change the name (from JSESSIONID to sth else)? If you set context element cookies attribute in server.xml to false ,so using cookies for session identify is disabled and url-rewriting will be used allways. Is this what want to do by attaching jsessionid to all your links? See http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html Name 'jsessionid' is spesified by servlet specs. - Jukka - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: connection Pool leaking - how to detect it ?
I use the logAbandonded in our test server, and I find the log messages in catalina.out. The log message includes (as part of a stack trace, so you will have to inspect the output a bit) the JSP page or class (and line!) in which the connection was opened. Here's an example: DBCP object created 2005-01-24 09:09:33 by the following code was never closed: java.lang.Exception at org.apache.commons.dbcp.AbandonedTrace.init(AbandonedTrace.java:96) at org.apache.commons.dbcp.AbandonedTrace.init(AbandonedTrace.java:79) at org.apache.commons.dbcp.DelegatingResultSet.init(DelegatingResultSet.java: 71) at org.apache.commons.dbcp.DelegatingResultSet.wrapResultSet(DelegatingResultSe t.java:80) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP reparedStatement.java:92) at com.acme.security.DataSourceAuthenticator.getAuthenticatedUser(DataSourceAut henticator.java:40) at com.acme.security.SimpleLoginServlet.doPost(SimpleLoginServlet.java:76) Mike Curwen -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 3:26 AM To: Tomcat Users List Subject: connection Pool leaking - how to detect it ? I just shifted to DataSource Connection pooling. I followed http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasourc e-examples-howto.html Here they have given 3 parameters to specify to control leaking such as removeAbandoned, removeAbandonedTimeout, logAbandoned 1) Is there any way to detect in which program / connection, resultsets etc are not closed. I tried my best not to keep it open, but in case by mistake it happend to be then how i can detect it ? 2) Also what is the meaning of logAbandoned - where i can see the log of this ? regards Manisha __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: reload log4j.properties on-the-fly?
There's two approaches. Configure tomcat to reload the context when class changes are made (log4j.properties being in the classes directory, will count as a class being changed, and then the whole context will reload). We do this all the time. Log4j can be used in a manner where config changes are discovered at run-time, though I've never tried it (and you should ask about in on the log4j-user list) Mike Curwen -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 12:03 PM To: tomcat-user@jakarta.apache.org Subject: reload log4j.properties on-the-fly? I am running Tomcat 5.5 with log4j logging (log4j.properties in common/classes). Is it possible to make changes to the log4j properties and have the changes reloaded on-the-fly instead of having to restart Tomcat in order to pick up changes? This would be very useful for those times debug level logging or specific class logging is needed where generally that level of logging is not required. thx andy - 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: reload log4j.properties on-the-fly?
Right, so you want to configure *tomcat* logging on the fly, but not a web-app's. The scenario might be: Production box with Tomcat logging set to ERROR starts behaving oddly, perhaps throwing a lot of ERROR level messages. To help diagnose, you want to dynamically enable more verbose logging (WARN, INFO) for *tomcat* logging. Hmm... Tomcat uses commons-logging, so there'd need to be a way to get commons-logging to reload its configuration. I stay away from commons-logging as much as I can, so no help from me. But if Tomcat doesn't already support it, then you're looking at tweaking tomcat source to get what you want, and that's if commons-logging lets you do it. p.s. to Julius: Both of your suggestions are just TOO easy... and here I've been afraid of looking into this. Thanks! Mike Curwen -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 1:33 PM To: tomcat-user@jakarta.apache.org Subject: Re: reload log4j.properties on-the-fly? To clarify - an initialization servlet defined in conf/web.xml will be able to reload the log4j config used by the Tomcat server (remember we're not talking about webapps)? On Fri, 21 Jan 2005 14:18:22 -0500, Derrick Koes [EMAIL PROTECTED] wrote: Use the configureAndWatch method of a configurator in an initialization servlet. -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 2:06 PM To: tomcat-user@jakarta.apache.org Subject: Re: reload log4j.properties on-the-fly? Right - I have logging in WEB-INF/classes that I can reload by reloading the webapp (not a big deal). What I'd like is to be able to reload the Tomcat logging (which uses log4j in common/lib and configured in common/classes) without having to restart Tomcat. It's a bit extreme to restart the server just to change logging levels for an specific situation. On Fri, 21 Jan 2005 12:55:15 -0600, Mike Curwen [EMAIL PROTECTED] wrote: Ah, then it wouldn't work at all. I failed to see you say common/classes. It's probably the preferred option to put it in WEB-INF/classes though (not to mention a log4j.jar file per app in WEB-INF/lib). That way you can independantly control logging for each of your apps, plus your logging config won't interfere with Tomcat's internal logging (which many people experience, when they try to do the common/lib approach). Mike Curwen Product Manager Globally Boundless www.globallyboundless.com 204.885.7733 ext 227 -- -- Privacy Compliance: This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any other distribution, copying or disclosure is strictly prohibited. If you have received this message in error, please notify us immediately by telephone (800) 665-1321 and reply to the sender via e-mail, confirming deletion of the original e-mail and any attachment(s). -- -- -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 12:26 PM To: Mike Curwen Subject: Re: reload log4j.properties on-the-fly? In the first case, since log4j.properties is in the global Tomcat classes dir - would that reload every Context? On Fri, 21 Jan 2005 12:19:48 -0600, Mike Curwen [EMAIL PROTECTED] wrote: There's two approaches. Configure tomcat to reload the context when class changes are made (log4j.properties being in the classes directory, will count as a class being changed, and then the whole context will reload). We do this all the time. Log4j can be used in a manner where config changes are discovered at run-time, though I've never tried it (and you should ask about in on the log4j-user list) Mike Curwen -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 12:03 PM To: tomcat-user@jakarta.apache.org Subject: reload log4j.properties on-the-fly? I am running Tomcat 5.5 with log4j logging (log4j.properties in common/classes). Is it possible to make changes to the log4j properties and have the changes reloaded on-the-fly instead of having to restart Tomcat in order to pick up changes? This would be very useful for those times debug level logging or specific class logging is needed where generally that level of logging is not required. thx
RE: Pagecache framework?
from the makers of webwork: http://www.opensymphony.com/oscache/ Mike Curwen Product Manager Globally Boundless -Original Message- From: Mieke Banderas [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 1:12 PM To: Tomcat Users List Subject: Pagecache framework? What should I look for if I want a simplistic system for avoiding trips to the DB for pages that are only built upon and between changes are 100% similar? Is there a cache framework I should look into or could I use something even simpler? After all, most pages only occasionally have true dynamic needs. I suppose I'm looking for something like a publishing system, only much much simpler, especially on how much resources (and coding) it would need. It would be nice if it would easily integrate with Tomcat 3, 4 or 5 (any version will do for now, but I'm currently using 3.2.4 on Mac OS X Server 10.2.6), Apache 1.3 and later the WebWork 1 or 2 frameworks. But basically I'm just looking for starting points for research. I know I can separate to have Apache serve static pages not ending with .jsp, but if my structure and links points to .jsp files, then I need some kind of mechanism to check whether the cache can be used instead of building the page a new. - 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: Hiding the context URL in Apache with mod_jk
or... keep deploying it to webapps/examples. Just configure that particular app as the default app for each host. We do this successfully for TC4.1, jk, apache2.x eg: Host name=cypher.gb.com debug=0 Aliaswww.cypher.gb.com/Alias Aliascypher/Alias Context path= docBase=/usr/local/tc5/webapps/cypher/ defaultSessionTimeOut=60 reloadable=true ... etc /Context /Host Host name=morpheus.gb.com debug=0 Aliaswww.morpheus.gb.com/Alias Aliasmorpheus/Alias Context path= docBase=/usr/local/tc5/webapps/morpheus/ defaultSessionTimeOut=60 reloadable=true ... etc /Context /Host Mike Curwen Product Manager Globally Boundless www.globallyboundless.com -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 2:43 AM To: Tomcat Users List Subject: Re: Hiding the context URL in Apache with mod_jk David Nillesen wrote: On Thu, 2005-01-06 at 08:58 +0100, Mladen Turk wrote: ie; instead of deploying my app to .../webapps/someapp deploy it to .../webapps directly. Use the webapps/ROOT. Mladen. - 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: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%
Every so often in our development environment, we'll have a page that goes off in an infinite loop. No problem, we'll just stop the browser, and fix the page and click refresh. But meanwhile, that first page is still spinning away, gobbling up CPU. I once saw code on tomcat-user that allowed me to see what each thread was doing. It's at the very bottom of this post: http://marc.theaimsgroup.com/?l=tomcat-user http://marc.theaimsgroup.com/?l=tomcat-userm=109455426721082w=2 m=109455426721082w=2 I must have found the 'second part' from somewhere else, probably tomcat-user as well! It's a filter that renames the thread to be the JSP page that the thread is processing: public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { Thread t= Thread.currentThread(); String oldName = t.getName(); HttpServletRequest request = (HttpServletRequest) servletRequest; try { t.setName(oldName + - + request.getRequestURI()); filterChain.doFilter(servletRequest, servletResponse); } finally { t.setName(oldName); } } combining those two, and you'll get what page is currently processing on what thread. If you see the same page for more than (the time varies, but let's say 10 seconds)... then perhaps that page is 'dead' and is consuming your CPU. Mike Curwen www.globallyboundless.com 204.885.7733 ext 227 -Original Message- From: David Bilodeau [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:13 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.0.28 running Windows 2003 Server CPU to 100% Can anyone point me to a thread discussing the following configuration or something similar, where the discussion relates to the CPU running up to 100%? Windows 2003 Server Standard Edition running IIS 6.0 Tomcat 5.0.28 installed and running (as a service) SQL Server 2000 SP3 connected to Tomcat (and IIS), but running from another server. Our symptom is that after a few days the server CPU usage hits 100%, with Tomcat consuming most of it. Stopping and restarting each Tomcat virtual site, or stopping restarting the Apache service does not resolve the issue. Only a box reboot will. I need some guidance as to where to suggest to the developers they should look, presuming this is caused by the code. I am the system admin of the environment and so do not develop the code myself, but I am seeing this symptom and now need to ask the developers to examine their code to find a root cause. I bet someone, somewhere, has run across this on a thread on this forum and can point me to it? I've been searching some but have not found much yet that is recent. Regards, David Bilodeau Enterprise Marketing Sales Automation Verizon Data Services, Inc. 919 Hidden Ridge, HQM03C76 Irving, TX 75038
RE: Tomcat lost request parameters
I once worked on a portal site that experienced very odd behaviour under load. When in development, everyone got what they were expecting. Under load testing, pages where missing items, some items were duplicated, etc, etc. The problem was the usage of variables in a JSP page declared in: %! % or the corresponding type of variable (instance variables) in servlets. It doesn't show up under normal load, because individual users can get in and out without anyone being the wiser. Once the container starts getting loaded though, you can have person A's request not being completed before person B's request is begun processing. Mike Curwen Product Manager Globally Boundless www.globallyboundless.com 204.885.7733 ext 227 -Original Message- From: Roberto Rios [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 2:51 PM To: [EMAIL PROTECTED] Subject: Tomcat lost request parameters Hi, I know that my subject sounds crazy, but I'm going nuts... I have an application, 100% java (jsp 1.2 and servlet 2.3). This application has more or less 1,5 years. So it is stable. I always used tomcat as my web server (without apache because I don't have static html to be served) with no problem. We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz with 2GB mem). At this time we had more or less 25 concurrent users. We were happy... Recently, another department in company started to use the application. So now we have more or less 100 concurrent users. Since then the problems began raising. Most of then when we try to insert/update data in database. Generally we receive errors telling that we tried to insert null values into a not null field (BTW we are using oracle 8.1.7 with JDBC - classes12.jar). My point is that application was working. Nothing changed (except the number of users). So, I'm sure that the fields are being properly filled. What I would like to ask you, is if someone has experienced this kind of problem. I was wondering if tomcat could lost request parameters under heavy traffic... I don't have any prove that it actually lost something. As I said, I'm just wondering. Maybe the JDBC... Searching into the mailing list archive, I found a thread about performance. I have changed the connector maxProcessors to 150 and also add maxKeepAliveRequests=1 to it after reading it. Nothing change. Does someone has some advice? I know that my posting is vague, but I don't where to look anymore... I was thinking about to do a tomcat upgrade (to 5.0.X). TIA, Bob - 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: [OT] Request an app test (free beer!)
Win XP SP2 = Windows XP -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, December 20, 2004 4:26 PM To: Commons User; Struts User; Tomcat User Subject: [OT] Request an app test (free beer!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Display of Static Resources
but it's more than just take away the package. If you map your servlet to this: url-pattern/foobar/url-pattern then your form should say : form method=POST action=foobar (I just didn't want anyone to think that you invoke a servlet by calling it's class name). so in fact, you want bizDispathcer (no capital b). -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 5:57 AM To: Tomcat Users List Subject: Re: Display of Static Resources form method=POST action=com.client.BizDispatcher Take the package name out of the action attribute. form method=POST action=BizDispatcher - 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: error-page not working properly
As written by you, it's true. for HTTP error codes, you need error-code, not exception-type error-page error-code404/error-code location/error/404.jsp/location /error-page That's a snip from our (working) web.xml in TC5.0.29 -Original Message- From: Chris Cherrett [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 7:23 AM To: Tomcat Users List Subject: error-page not working properly Hello I have searched this topic on google to find the following to be true: catching 500 or 404 error does not work in Tomcat 5 like this error-page exception-type500/exception-type location/error.jsp/location /error-page error-page exception-type404/exception-type location/error.jsp/location /error-page Is this true? This works for 500 but not 404. error-page exception-typejava.lang.Throwable/exception-type location/error.jsp/location /error-page Is there a way to catch all exceptions that works in Tomcat 5 Thanks -- Chris Cherrett Tracking Solutions International 1-877-TSIWARE www.tsiware.com - 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]
webapp's log4j config acting wonky
Hi all, I've been using log4j for some time and like it quite a bit. My configs are probably naieve, but they work for me. But now, another developer has pointed something out to me, and yup.. something's busted. I'm posting this to tomcat-user because I'm thinking it might be a TC/mywebapp conflict of some kind (though I'm not sure where). Tomcat 5.0.29 log4j 1.2.1 in my webapp's WEB-INF/lib log4j.properties in my webapp's WEB-INF/classes directory. I don't have log4j.jar anywhere else and no other log4j.properties files anywhere, though perhaps I don't know where to look. In our JSP pages we have loggers declared like so: %@ page import=org.apache.log4j.Logger % %! Logger logger = Logger.getLogger(pages.abc.page_name); % % logger.debug(foo); % pages is common throughout every JSP. abc would be a folder name (we've got the webapp organized into folders of related functions), and finally page_name is the name of the JSP file without extension. our log4j.properties file is: #log4j.properties log4j.rootCategory=DEBUG, filer log4j.category.com.gb.security=WARN, filer log4j.additivity.com.gb.security=false log4j.appender.filer=org.apache.log4j.RollingFileAppender log4j.appender.filer.layout=org.apache.log4j.PatternLayout log4j.appender.filer.layout.ConversionPattern=%-5p %c - [%m] %d{ISO8601}%n log4j.appender.filer.File=/path/to/the/log/file/debug.log log4j.appender.filer.MaxFileSize=100KB log4j.appender.filer.MaxBackupIndex=4 As you'll see we've got the root category to DEBUG and we've piped down our com.gb.security package to WARN. We've got lots of other classes, both bundled in WEB-INF/lib jar files and loosely in the WEB-INF/classes and they all spill their log4j output. But none of our log messages from the JSP pages are coming through. I've tried the following config, but it had no effect: log4j.category.pages=DEBUG, filer log4j.additivity.pages=false *If* I configure the following (adding a 'package' below 'pages'): log4j.category.pages.abc=DEBUG, filer log4j.additivity.pages.abc=false Then it will work (but obviously only for pages under 'abc'). Also, if I remove the additivity, I get two messages. That makes me think there's one message from the rootCategory, and one from this category. But when I remove the category 'pages.abc' entirely, we're back to nothing again. Any ideas? Is there a TC log4j or CL file hiding somewhere? mike curwen intermediate programmer globally boundless 204 885-7733 ext 227 www.globallyboundless.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: webapp's log4j config acting wonky
Fixed! The first thing I tried was to remove the log4j.properties file from WEB-INF/classes and restarted TC. It was still logging! and what's more, it was logging to the file I had specified in the since-removed log4j.properties file. So, there is only one other app on the same TC instance; a copy of the first app. I removed its log4j.properties file as well. Both apps on restart were still logging! serious wtf! Shut down TC, blew away its work directory, rm -r'd all over the place... restarted, and finally got the there are no appenders configured for this logger message (twice, once for each app). Brought it down again, upgraded the log4j.jar to 1.2.9 (I was probably already using 1.2.8 actually), and then did the modifications you suggested to the log4j.properties as below: #log4j.properties log4j.rootLogger=DEBUG, filer log4j.logger.com.gb.security=WARN log4j.appender.filer=org.apache.log4j.RollingFileAppender log4j.appender.filer.layout=org.apache.log4j.PatternLayout log4j.appender.filer.layout.ConversionPattern=%-5p %c - [%m] %d{ISO8601}%n log4j.appender.filer.File=/path/to/the/log/file/debug.log log4j.appender.filer.MaxFileSize=100KB log4j.appender.filer.MaxBackupIndex=4 Put this in one app, and got one there are no appenders configured... and one debug.log file in the right location. Put the other app's log4.properties file in place, restarted, and now my two webapps are merrily DEBUGing. I'm getting debug messages that I had forgotten I should have been getting! Also, thanks for the info re: loggers and additivity. -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 2:27 PM To: Tomcat Users List Subject: Re: webapp's log4j config acting wonky wherein Jacob gives good advice.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Display of Static Resources
you've named it 'myweb.xml', just so we can tell the attachments apart, or is it actually named myweb.xml? If the latter, change it to web.xml. And having your servlet mapped to / is most likely the problem. The default servlet is the one that Tomcat uses to serve up static resources. So either change your servlet to handle static resources or (way better option), map your servlet to a pattern other than /, and then change your web form accordingly. -Original Message- From: Ram Sriram [mailto:[EMAIL PROTECTED] Sent: Saturday, December 11, 2004 1:10 PM To: Tomcat Users List Subject: Re: Display of Static Resources Ben, I removed all my application specific entries in web.xml under conf and moved those to the web.xml under ROOT\WEB-INF. I am attaching both the web.xml files. One under the WEB-INF is called myweb.xml. I am not sure if I have reverted the global web.xml to its original state; I may not have. I tried out with these changes; there is no change in the behavior. When I start test.html, it still takes me to my servlet. index.jsp still doesn't display graphics. Thanks...Ram
RE: Moving from 4.1.27 to 5.0.28?
We've recently been writing the 'next version' of our main application, and the decision was made to target TC 5.0.x, up from 4.1.x. We experience no major difficulties in making that move, thouogh there can be a few gotchas. The one thing we noticed that changed (for the better) was error page handling. Others have reported small problems regarding TC 5's more strict interpretation of the spec in certain areas. As an example of this (though this is from memory!) I think someone had something like: jsp:include page=foo /jsp:include And that appealed to their sense of 'good coding' (like putting opening and closing braces on all blocks, including one line blocks). This worked in Tomcat 4.x, but not in 5.x So small things like that might catch you up, but otherwise nothing major. -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:08 AM To: Tomcat Users List Subject: Moving from 4.1.27 to 5.0.28? I am thinging of upgrading our prod Tomcat server from 4.1.27 to 5.0.28 (or is 5.5.4 a safer bet?) and I was wondering if there would be any problems when upgrading? Anything particular I should think of? Regards, BTJ -- -- - Bjørn T Johansen [EMAIL PROTECTED] -- - Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows -- - - 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: [OT] SCWCD Exam 1.4
-Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 9:25 AM To: Tomcat Users List Subject: RE: [OT] SCWCD Exam 1.4 The one you found Head First Servlets and JSP appears to me not to be a dedicated exam guide. I think the only reason it Not sure what copy you're looking at. Mine has a black bar across the top that say ... Study Guide The subtitle of the book is Passing the Sun Certified Web Component Developer Exam and it mentions on the cover that it is Written by the co-developers of the real SCWCD exam for J2EE 1.4. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] SCWCD Exam 1.4
I'd be completely remiss in not mentioning that Manning is putting out a second edition of it's SCWCD study guide. The second edition has been updated for the new exam. Manning's ISBN is 1932394389 (that's the one scheduled for January) HeadFirst is 0596005407 (the one out now) both of them cover the new exam. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 11:49 AM To: 'Tomcat Users List' Subject: RE: [OT] SCWCD Exam 1.4 -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 9:25 AM To: Tomcat Users List Subject: RE: [OT] SCWCD Exam 1.4 The one you found Head First Servlets and JSP appears to me not to be a dedicated exam guide. I think the only reason it Not sure what copy you're looking at. Mine has a black bar across the top that say ... Study Guide The subtitle of the book is Passing the Sun Certified Web Component Developer Exam and it mentions on the cover that it is Written by the co-developers of the real SCWCD exam for J2EE 1.4. - 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: java.awt.HeadlessException
Hi, We have found that in order to get headless to work properly, you need the xlib libraries installed. You don't need an xserver _running_, but you need the libraries, because I think java.awt.* uses them. Here's a link: http://javatechniques.com/public/java/docs/hosting/headless-java-x11-librari es.html We've also found that JAVA needs help finding them, by adding the following line to catalina.sh: export LD_LIBRARY_PATH=/usr/X11/lib Also of note is that the error message you get for this condition changes after the first occurrence. The very first time you try to generate an image dynamically, you'll get something like: org.apache.jasper.JasperException: /usr/local/applications/j2sdk-1_4_2_04/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory All subsequent times, it will be a different message, something like: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.Toolkit$2.run(Toolkit.java:748) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739) Maybe you knew all this, and xvfb (whatever that is) was meant to get around this. But all of the above works for us. -Original Message- From: indu ss [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 9:11 AM To: [EMAIL PROTECTED] Subject: java.awt.HeadlessException Hi, I'm using Tomcat 5.0.12,J2sdk1.5 on Linux Fedora 2 . I need to have a servlet which displays jpg images without using Xserver. I get this error even after starting tomcat with CATALINA_OPTS=-Djava.awt.headless=true and also with Xvfb running. java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment .java:159) at java.awt.Window.init(Window.java:310) at java.awt.Frame.init(Frame.java:419) at java.awt.Frame.init(Frame.java:384) .. __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com - 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: Tomcat and -server option
You might need a space here, depending on what else is being constructed and sent to the command line: JAVA_OPTS=-server ---^ might need: JAVA_OPTS= -server -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Friday, November 12, 2004 3:09 PM To: Tomcat Users List Subject: Re: Tomcat and -server option Hi, I have: JAVA_OPTS=-server -Djava.awt.headless=true -Xms1g -Xmx1g -Dfile.encoding=ISO-8859-1 in catalina.sh I just tried: logger.info(java.vm.name: + System.getProperty(java.vm.name)); and i get: INFO - java.vm.name: Java HotSpot(TM) Client VM Why is the -server option not taking effect? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: More apps = More load ?
I'm going to speculate and say that someone will mention something along the lines of ... the spirit of the J2EE spec would have you move up to a ejb container and use EJB/MDB (or some such). -Original Message- From: Steven J.Owens [mailto:[EMAIL PROTECTED] Sent: Friday, November 12, 2004 6:40 PM To: Tomcat Users List Subject: Re: More apps = More load ? I was discussing this very topic with somebody last night. This sort of begs the question, if the webapp isn't supposed to start threads of its own in general, what is the right way to handle these situations (the most typical being some sort of cron thread, or any need to kick of an asynchronous action)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do default to get website to go straight to my webapp ?
getting rid of 8080: Change your Connector's port attribute in server.xml (search in the file for 8080). getting rid of the context name: Change your Context's path attribute to be . (probably also in server.xml). You will need to remove the existing default web application, which is that Tomcat welcome page you are seeing. -Original Message- From: Paul Taylor [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 8:29 AM To: Tomcat Users List Subject: How do default to get website to go straight to my webapp ? How do you default to get website to go straight to my webapp ? I have a web application called testapp and in web.xml I have welcome-file-list welcome-filejsp/overview.jsp/welcome-file /welcome-file-list Going to http://localhost:8080/testapp takes the user to http://localhost:8080/testapp/jsp/overview.jsp which is fine. BUT how can I get the user to go straight to http://localhost:8080/testapp/jsp/overview.jsp when they enter http://localhost:8080 at the moment it just goes to the tomcat home page index.jsp and is there a way I can do without the user needing to specify the port i.e http://localhost as other servers seem to do. Thanks, (one day i will get this webserver business) - 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: Buffering and redirection to the errorPage
If an exception is thrown AFTER 8kb has been written (and the initial chunks has been committed) then the redirection to the errorPage (if specified) does not occur. Does this sound right? That sounds 100% correct. Is there anyway to enforce the redirection to the errorPage? Not once the buffer is flushed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: url-pattern with Basic Auth
I'd think url-pattern elements (regardless of where they appear) need to conform to the url-patterns specified in the spec (not sure of section). paths: starting with '/' and ending with '/*' extensions: '*.foo' exact: exact matching. The url-pattern I've left from your original message doesn't match any of these. -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 1:57 PM To: tomcat-user Subject: url-pattern with Basic Auth url-pattern/AuthServlet?*param1=account1*/url-pattern I tried it and cross-referenced the servlet spec. It doesn't appear to say if this is allowed or not. Anyone know? peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Odd JSP- Java Source filenames
Every so often (because hey, no one's perfect), I'll get a stacktrace during development, and I've noticed something about the filenames being generated for the JSP - java source. If my jsp filename has an underscore in it, I get an extra 005f in the java source filename. exitSession.jsp - exitSession_jsp.java exit_session.jsp - exit_005fsession_jsp.java This didn't happen with TC4.1.31, but does happen with TC5.0.28 What's up with that? (Not that it matters, it all works... but is there a reason?) mike curwen intermediate programmer globally boundless 204 885-7733 ext 227 www.globallyboundless.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual Hosts and useCanonical
Thanks Bill. I suppose I must have been dreaming about getServerName working. Our current production box is TC4.1.30, and for our next version of the app, I wanted to target TC5.0.29. Looks like it is a must have. Yoav will be happy. ;) -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Sent: Thursday, October 28, 2004 12:21 AM To: [EMAIL PROTECTED] Subject: Re: Virtual Hosts and useCanonical request.getServerName() is the value of the Host header. You want request.getLocalName(). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet gateway to legacy cgi application
Maybe it's too obvious to say ... but does the cgi servlet (that comes with Tomcat) fit your needs ? http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cgi-howto.html -Original Message- From: Shawn Church [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 9:58 PM To: [EMAIL PROTECTED] Subject: Servlet gateway to legacy cgi application I am planning to migrate an old cgi (actually iSeries/AS/400 Net.DATA) application to Java, but in the meantime I would like to create a servlet-based gateway to the application, so that all requests are filtered through this gateway prior to being forwarded to the cgi application. Likewise, all responses should flow back through the servlet. I would also like to use Apache as the web server. I have no problem integrating Apache and Tomcat, but I'm not sure of the best method of sitting in front of the cgi app. I am needing to do this to integrate security with other Java apps (running on other servers), and it would be convenient if I could develop a gateway app to filter requests to the cgi application. I would appreciate some pointers on how to approach this. I would prefer to handle this in my own custom servlet, but if there is something already built into Tomcat I would like to know about it. Thanks, Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: voting for 5.0.29?
Yoav, was that the JSP pre-compile/JDK1.5 thing? I tried looking for something on marc.tag, but I've probably missed the message with the subject Why 5.0.29 won't get out of beta ;) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 7:40 AM To: Tomcat Users List Subject: RE: voting for 5.0.29? Hi, 5.5.4 is beta, 5.0.29 will not get a stable vote and will therefore never get out of beta. The former I posted to this list as an FYI in its own [ANN] messages, but not to the website. The latter I posted as an aside and has been discussed on the tomcat-dev mailing list. Yoav Shapira http://www.yoavshapira.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Virtual Hosts and useCanonical
Yup, I've asked about/commented about this before. I'm having trouble with Vhosts, server names, and how to get the value I want out of request.getServerName(), and this is all with apache/jk/tomcat. (apache is in the 2's somewhere, jk (not jk2) and tomcat 4.1.30 and 5.0.29). I'm only get the canonical name, help me get the alias http://marc.theaimsgroup.com/?l=tomcat-userm=108315928213678w=2 I don't care about alias, get me canonical. http://marc.theaimsgroup.com/?l=tomcat-userm=106095508818371w=2 So I know that both of these seem to have worked (or been doing a good imitation of it). But now, for the life of me, I can't get request.getServerName() to return the canonical ServerName from httpd.conf. apache's httpd.conf -- VirtualHost 139.142.220.45:80 UseCanonicalName On ServerName devstar.myhost.com ServerAlias www.devstar.myhost.com DocumentRoot /home/data3/me20 Location /WEB-INF/ AllowOverride None deny from all /Location JkMount /*.jsp tomcat1 JkMount /login tomcat1 ErrorLog /var/log/test/error_log CustomLog /var/log/test/access_log common /VirtualHost tomcat1's server.xml -- Host name=devstar.myhost.com debug=0 Aliaswww.devstar.myhost.com/Alias Context path= docBase=/home/data3/myhost/ etc... When I type in http://www.devstar.myhost.com , I was hoping that request.getServerName() would give me devstar.myhost.com (without the www). But it doesn't. It (jk? tomcat?) doesn't seem to honour the useCanonical directive. There seems to be some controversy about this? http://www.mail-archive.com/[EMAIL PROTECTED]/msg32367.html Have I been going slowly crazy, and this has never worked the way I thought it did? mike curwen intermediate programmer globally boundless 204 885-7733 ext 227 www.globallyboundless.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual Hosts and useCanonical
Those books are making reference to getting the client's IP/hostname. And that would be controlled through the connector attribute 'enableLookups'. This is about getting the Server's hostname. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 4:48 PM To: Tomcat Users List Subject: Re: Virtual Hosts and useCanonical There is a setting somewhere in Tomcat (versions up to 4.1.X at least) where you enable/disable reverse DNS. Most of the time you want this off, but I think in your case you may need it turned on. I think the swtich is in the Tomcat server.xml, and it relates to the connector you are using. Its something like 'enableLookups'. While this sounds odd, two books I have state you need this to get names and not IP addresses. Also, the books mention using request.getRemoteHost(), and that it is effected by the settings in server.xml Hope it helps, Al G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: which Linux Platform is best for Tomcat?
What the heck.. haven't heard mine yet. Slack 9, no problems at all. :) -Original Message- From: Giuseppe Briotti [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 9:18 AM To: [EMAIL PROTECTED] Subject: Re: which Linux Platform is best for Tomcat? I use both Suse 9.1 and Mandrake 10 and all works great! :-) G - 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: MySQL upgrade Problem
is it a new username? Are you connecting to mysql from a different host? The problem is clear in the stacktrace: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) login to mysql and setup your user's access. -Original Message- From: e-Denton Subscriber [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 10:04 AM To: Tomcat Users List Subject: MySQL upgrade Problem Hi, I just upgraded from MySql 3.x to 4.0 and now I can't make connections work from Tomcat. I have read a bunch of stuff on the Web about this or similar problems, but, even though it worked before, I can't make it work now. I specify my connection info in server.xml and context.xml just like I used to (below). The only difference is (?) the new MySql, and the fact that I am trying to use a new, different password (with a dollar sign in it). (Oh, and, I set appBase outside the Tomcat home directory.) On Tomcat startup, I get: JDBCRealm[Catalina]: Exception opening database connection java.sql.SQLException: Invalid authorization specification: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)... I can login manually to MySql using the same user and password. I can access the database directly from Java programs which make their own connection. Any ideas what's going wrong? web.xml: - Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://127.0.0.1:3306/xxx connectionName=yyy connectionPassword=$zzz userTable=portal_user userNameCol=clientName userCredCol=clientPassword userRoleTable=portal_role roleNameCol=clientRole digest=md5 / conext.xml: --- Resource name=jdbc/portal auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/portal parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameusername/name valueyyy/value /parameter parameter namepassword/name value$zzz/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value5/value /parameter parameter namemaxWait/name value1/value /parameter /ResourceParams - 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: Unterminated lt;@ page tag Issue
I'm fairly certain it's your syntax: %@ page import=java.util.ArrayList, com.gcc.creditclaim.CreditClaim; % should be: %@ page import=java.util.ArrayList,com.gcc.creditclaim.CreditClaim % (entries are quoted all together, and no trailing semicolon). -Original Message- From: Xeth Waxman [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 9:28 AM To: [EMAIL PROTECTED] Subject: Unterminated lt;@ page tag Issue Greetings all. I have a jsp running on Tomcat 5.0.12. When this jsp is called, I get the following exception: /ConfirmClaim.jsp(85,0) Unterminated lt;%@ page tag org.apache.jasper.JasperException: /ConfirmClaim.jsp(85,0) Unterminated lt;%@ p age tag at snip / Here is the page tag on my JSP: %@ page import=java.util.ArrayList, com.gcc.creditclaim.CreditClaim; % - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager application in TC 4.1
put an index.html page under $CATALINA_HOME/server/webapps/manager and have it contain a link to /html or a meta refresh. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 12, 2004 3:59 PM To: Tomcat Users List Subject: Manager application in TC 4.1 Hello, I have just upgraded to Tomcat 4.1 and I have encountered the fact that the manager application is now at: www.mydomain.com:8080/manager/html/ What is the simples way to change this to be at www.mydomain.com:8080/manager ? I have changed the mappings but that breaks the mappings in the manager app. I know the comment in the manager's web.xml file says just to change the class but is that right? I think that's just a legacy comment. Thanks, Andoni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: StringBuffer memory optimization
There is a known StringBuffer memory leak in a certain version of the jvm (which I can't remember now offhand). But I'm pretty sure I mentioned on this list before, so search the archives. (or just wait.. someone will chime in with the exact version). I think it was around 4.1.2_05 ? -Original Message- From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 3:28 PM To: Tomcat-User List (E-mail) Subject: StringBuffer memory optimization Hello folks, i have a problem with StringBuffer, profiling my web-application i noticed, StringBuffer due to its creation and use consumes too much memory. Does onyone here know a good way to solve that problem? Regards, Edson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] That craigmcc guy is getting **REALLY** annoying!
yah, that's all. ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Capturing HTML using Tomcat 4
Could a filter do the job? response wrapping always seems scarey to me, but it should be possible to wrap all the requests for a given URL space (so for example, anything that might conveniently fall under the /agreement/* URL space), and after your call to doChain, you can extract and persist a copy of the HTML response. No touching the existing pages, you only need to map the correct URLs (and there can be multiple ones, of course). -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 6:03 PM To: 'Tomcat Users List' Subject: Re: Capturing HTML using Tomcat 4 That's not as nice only because most of the pages to be captured are JSPs, and converting the JSP to a servlet for this purpose would defeat much of the beauty of JSPs. I saw a listing for using a capture JSP tag at http://www.jguru.com/faq/view.jsp?EID=304022 that seems kind of interesting. Of course, if this works well, it would only work on JSPs in which the tag could be placed. David - Original Message - From: Robert Harper [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED]; 'David Wall' [EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 3:20 PM Subject: RE: Capturing HTML using Tomcat 4 One way is to write a servlet that builds the html and before you finish with the response, save the text into a table and then send the response. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 4:10 PM To: [EMAIL PROTECTED] Subject: Capturing HTML using Tomcat 4 I've been looking through archives and such for examples of how to capture the HTML output from a given JSP programmatically so I can archive or do other things with that HTML. For example, we might do this to record the text of an agreement that was displayed to a user, in which a JSP generated the agreement HTML page. The pages may be generated from either HTTP GET or POST. It would be nice to perhaps just have a servlet include the response from a JSP, passing along the GET/POST request to that JSP, but then have the servlet capture the JSP's response in a string for processing/storage. O'Reilly has a caching servlet that may help, but I was wondering if anybody had come out with an elegant way to do this. Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Capturing HTML using Tomcat 4
oops. I meant .. it should be possible to **filter** all the requests... :o -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 6:24 PM To: 'Tomcat Users List'; 'David Wall' Subject: RE: Capturing HTML using Tomcat 4 Could a filter do the job? response wrapping always seems scarey to me, but it should be possible to wrap all the requests for a given URL space (so for example, anything that might conveniently fall under the /agreement/* URL space), and after your call to doChain, you can extract and persist a copy of the HTML response. No touching the existing pages, you only need to map the correct URLs (and there can be multiple ones, of course). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: method level synchronization doesn't work
mysql definitely supports retrieval of generated keys through jdbc. http://dev.mysql.com/tech-resources/articles/autoincrement-with-connectorj.h tml -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 10:09 AM To: [EMAIL PROTECTED] Cc: Tomcat Users List Subject: Re: method level synchronization doesn't work On Fri, Oct 01, 2004 at 04:05:53PM +1200, [EMAIL PROTECTED] wrote: Is your primary key generated automatically? If so, the combined insert/query is: String stmt=INSERT INTO SOMEFILE (FLD1,FLD2,FLD3) VALUES(?,?,?); PreparedStatement sql = conn.prepareStatement(stmt,Statement.RETURN_GENERATED_KEYS); Does mysql actually support this? I know postgresql does not support returning generated keys, but I was able to work around it by tacking a select from the sequence immediately after the insert: e.g. insert into foo ... ; select currval('foo_keyfield_seq'); Is postgres just behind the times? eric - 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: method level synchronization doesn't work
Ok, since it's been brought forward... how do you update and retrieve all in one query? This is for: I need a new primary key, and I need it to be thread safe. something that would run on mysql? unless you can get this magic query, it's not quite as simple as let the databse handle it, is it? -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 7:42 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: method level synchronization doesn't work that would be the easiest way. but you made it too easy, I thought people are suppose to suffer and stumble :) peter On Thu, 30 Sep 2004 17:46:51 -0400, Frank W. Zammetti [EMAIL PROTECTED] wrote: Why not just let SQL do the update? Do the following: update my_table set counter_field = counter_field + 1 (where clause here if needed) (off the top of my head, my syntax might be off) In other words, why not let the database handle the concurrency issue? That's kind of what they're there for (partly anyway). - 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: method level synchronization doesn't work
yup, that's letting the auto_increment do its job (which is what I do). some folks don't believe in those, and use a separate primary key generating scheme. Many a time I've heard of this update and retrieve in one select statement, and I think it always has a vaguely Oracle'ish feel to it. So whenever I hear of someone say something like use one query to generate your next pk.. I always wonder. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 11:06 PM To: Tomcat Users List Subject: RE: method level synchronization doesn't work Is your primary key generated automatically? If so, the combined insert/query is: String stmt=INSERT INTO SOMEFILE (FLD1,FLD2,FLD3) VALUES(?,?,?); PreparedStatement sql = conn.prepareStatement(stmt,Statement.RETURN_GENERATED_KEYS); sql.setInt(1,fld1); sql.setInt(2,fld2); sql.setInt(3,fld3); sql.execute(); ResultSet rs = sql.getGeneratedKeys(); if (rs.next()) { // get generated key int key=rs.getInt(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: method level synchronization doesn't work
Yup, latest 4.1 does support subqueries. But the folks around here have something against gamma. ;) Actually.. that's me, but we've got 4.1 installed on our dev box and are playing. And I do this the simplest way... I use autoincrement. But I'd love subqueries for other reasons. -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 10:24 PM To: Tomcat Users List Subject: Re: method level synchronization doesn't work that would explain some of the problems you're having. I thought the latest mysql supports subqueries. http://dev.mysql.com/doc/mysql/en/Subqueries.html if you're not using the latest mysql, it might be a good idea to upgrade, so you can do this the simple way. I hope that helps peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP/Servlet Version supported? HELP!
did you even try the website? http://jakarta.apache.org/tomcat/ look at that blue table. -Original Message- From: CCNY [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 10:00 AM To: [EMAIL PROTECTED] Subject: JSP/Servlet Version supported? HELP! Can someone tell me what version of the Servlet and JSP spen Tomcat 4.1 supports? It's the second hald of my dilemma -- Forwarded message -- From: CCNY [EMAIL PROTECTED] Date: Thu, 23 Sep 2004 10:47:53 -0400 Subject: Struts version 1.2.2 and Tomcat 4.1 To: Struts Users Mailing List [EMAIL PROTECTED] All I think I've got a problem. Can anyone tell me definitively if Struts 1.2.2 uses a version of the Servlet or JSP Spec that could make it incompatible with Tomcat 4.1? Is anyone currently using these two together? - 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: [OFF-TOPIC] RE: API docs for Mysql JDBC Driver?
The API docs for a mysql driver has **nothing** to do with tomcat. Does tomcat distribute the API for mysql drivers?? Perhaps the double star and question marks will convince you. ;) -Original Message- From: Chuck Carson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 12:02 PM To: Tomcat Users List Subject: Re: [OFF-TOPIC] RE: API docs for Mysql JDBC Driver? This has everything to do with tomcat. I am using the driver to connect to Mysql from Tomcat. --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Please mark your questions as [OFF-TOPIC] in the subject line if they have nothing to do with Tomcat. Thanks, Yoav Shapira Millennium Research Informatics -Original Message- From: Chuck Carson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 10:49 AM To: LIST: Tomcat User Subject: API docs for Mysql JDBC Driver? Does anyone know where I can find a complete set of API docs for the JConnect Driver 3.x? The docs on the site are lacking and only have simple examples on how to do SELECT's. I am looking for a complete method list or something more detailed. Thanks for any info, rhugga - 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] = Chuck Carson - Sr. Systems Engineer Syrrx, Inc. - www.syrrx.com 10410 Science Center Drive San Diego, CA 92121 Work: 858.731.3540 Fax: 858.550.0526 - 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: [OFF-TOPIC] RE: API docs for Mysql JDBC Driver?
One answer, btw, is the download contains all the source files. This one time, when I was curious, I built the javadoc. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 12:07 PM To: 'Tomcat Users List' Subject: RE: [OFF-TOPIC] RE: API docs for Mysql JDBC Driver? The API docs for a mysql driver has **nothing** to do with tomcat. Does tomcat distribute the API for mysql drivers?? Perhaps the double star and question marks will convince you. ;) -Original Message- From: Chuck Carson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 12:02 PM To: Tomcat Users List Subject: Re: [OFF-TOPIC] RE: API docs for Mysql JDBC Driver? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: API docs for Mysql JDBC Driver?
Ok, those docs are way out of date. If you're using connectorj 3, those docs would only confuse the matter. The current docos on the jconnector portion of the mysql.com website contain all the latest info on how much of the spec the jconnector drivers implement. The JavaDoc for the drivers themselves (and it's hard to see when you'd want those, unless you intend to bypass java.sql) you can create from the java source files that you get when you download the binaries + source downloads from mysql.com (or don't bother generating them, and just read them from the *.java files). If you're asking yourself: how do I do SQL with jconnector drivers, then I think what you actually want to look into is how do I use the java.sql classes to do SQL, for which there is a healthy amount of JavaDoc included with the JDK, and a JDBC tutorial on java.sun.com. You should not be directly using the jconnector classes for doing SQL. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 10:10 AM To: 'Tomcat Users List' Subject: RE: API docs for Mysql JDBC Driver? I tired looking this up also. The best I could come up with is to compare the java.sql APIs and the mysql limitations. Here is a URL for that: http://www.cs.nott.ac.uk/TSG/manuals/databases/mysql/jdbc/mm.doc/ -Original Message- From: Chuck Carson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 7:49 AM To: LIST: Tomcat User Subject: API docs for Mysql JDBC Driver? Does anyone know where I can find a complete set of API docs for the JConnect Driver 3.x? The docs on the site are lacking and only have simple examples on how to do SELECT's. I am looking for a complete method list or something more detailed. Thanks for any info, rhugga - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat vs BEA Weblogic?
Mwah-h! I would **love** to know your source on that. Hani S. doesn't count As far as JBoss goes, I heard a nasty rumor that JBoss might not be around much longer. -rhugga - 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: [ot] something similar to phps ?
Ok, I'll bite. Isn't this what IDE's are for? Browser as IDE? no thanks. ;) -Original Message- From: John Villar [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 9:39 AM To: Tomcat Users List Subject: Re: [ot] something similar to phps ? Expanding a little more the idea, you could enabled the servlet output to receive modifications to the jsp page and ave it ot the corresponding jsp *grin* and that way you integrate nice output with editing capabilities John Villar Gerente de Proyectos Computadores Flor Hard Soft 2058 C.A. www.florhard.com John Villar escribió: Also, you could do a Servlet that serves all the .jsps files that take the corresponding jsp file and outputs it on html format, coloured with graphics, etc John Villar Gerente de Proyectos Computadores Flor Hard Soft 2058 C.A. www.florhard.com Shapira, Yoav escribió: Hi, would it be of any use to anyone for the development of something similar to phps in php? where you can rename a file to .jsps for instance and it would show you the code line for line and have pretty colours... Something like that is trivial to do already -- just serve the JSP with content-type text/plain from a streaming servlet like Tomcat's DefaultServlet. That's not to say something like this isn't useful: it's a nice thing to have (although it would have to be turned off on production systems, because it's a security risk). Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: performance problem
Hmm... http://www.greenfieldresearch.ca/technical/jk2_config.html Reading that, look for the one line in red font. Seems there's potential config problems when apache and tomcat are on separate boxes, as they need to share a file. You'd think this would prevent operation, rather than slowing it down , so perhaps it's not related. We use similar architecture, but JK (which doesn't seem to require that shared file). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 2:06 PM To: [EMAIL PROTECTED] Subject: performance problem I have an apache/tomcat environment that is experiencing performance problems. My production environment has apache on one win2k box, and the two tomcat instances on another win 2k box. When I load test the my application directly against either of the tomcat instances, I get about 150 req/s. When I test with apache in front, I get 10 req/s. This was with apache server temporarily placed on same network segment as tomcat box. I recreated the production setup on a couple of developer workstations (slightly slower hardware than the production environment), and got 70 req/s. Apache and tomcat conf files are essentially identical in both environments. Does anyone have any clues? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Running EXE CGI's from Tomcat 5.0.28
Try this: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=56t= 002491 -Original Message- From: Benjamin Goldsmith [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 8:38 PM To: [EMAIL PROTECTED] Subject: Running EXE CGI's from Tomcat 5.0.28 Is it possible to run EXE cgi's from Tomcat 5.0 on Win XP SP2? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to create/run a Java Service on UNIX
I think we should assume that 'the program' will function correctly and do what it's advertised to do, since if that was the actual problem, then a list like 'java-rmi-user' or 'java-io-user' would be more appropriate. The tomcat application, and that second application should be coded to handle the cases when 'the program' is not available. If that's still a problem, refer to the aformentioned, fictious(?) groups. All that remains is how do I get 'the program' to run? Oddly enough, that's still not tomcat-user, but hey we like to help out. For that (as Yoav said), you need a *nix admin type person to write some rc scripts for you, or investigate how to do so for yourself. Find a BB or other email-user list for the exact flavour of *nix you are running, and ask about rc.d scripts on that list. (rc.d is the approximate equivalent on *nix, of the Windows Services control panel). -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Friday, September 10, 2004 2:28 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Hi Daxin, How are you going to genereate the keys? Via the database? Also, seeing as you are going to use 'service' with without Tomcat I'd like to know if either application will be up as long as the server(s) is up. If that's the case you could have both applications check at startup if the daemon is active(running) or not not. If the daemon isn't active either application could start it. If this service should be up whenever the hardware is up you could start the service on boot so it is in theory always available to the 2 applications when they are started but each must check if the daemon is running prior to accessing the daemon. The person who recommended learning daemons was entirely right and without my knowing more of the 2 applications I can not tell you more except since tomcat will access he daemon, I would look closely at the framework in Jakarta to see if it will suit both applications. I haven't looked at it closely and it Tomcat must be running for the daemon to be running(which I doubt) I wouldn't utilize that framework. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
Not sure if you could tell this from a stacktrace or not, but where do you get your Mail Session from? If you've set up a JNDI resource, as described on http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html, then mail.jar will need to be in common/lib. -Original Message- From: Roberto Cosenza [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:23 AM To: Tomcat Users List Subject: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to create/run a Java Service on UNIX
So you've already written this java program, and it has a public static void main() method, and it all interfaces properly with what you need it to, and you just want to know how to make it start when your UNIX box starts? Or you haven't written the program yet at all, and you want to know how to go about doing so? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 5:19 PM To: Tomcat Users List Subject: RE: How to create/run a Java Service on UNIX Yes. It keep running and sometimes it replies and provides some data for other applications. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Do you want to run this as a daemon? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
I believe you'd *need* to put them there (common/lib) if you were using a container-managed connection pool. -Original Message- From: Jeffrey Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:18 PM To: Tomcat Users List Subject: Re: Location of third party jar files. I believe Yoav said earlier it was OK to put JDBC drivers into common/lib. Or did I misunderstand, there was a bit of back and forth on the topic. Search Archives for Tomcat 4.1: JSP pages don't always compile the first time? Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters in catalina.out
Thanks Benjamin! There was no debug info proceeding the dump, but by changing my log4j config to: log4j.category.org.apache.jk=WARN, filer log4j.additivity.org.apache.jk=false , it has shut off the request dumping. -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 3:16 PM To: Tomcat Users List Subject: RE: Request parameters in catalina.out I wouldn't say mis-configured. When I changed from a similar configuration to a logger for all the jk stuff (e.g. log4j.category.org.apache.jk=WARN,filer), the request dumps went away. I think the issue was that the commons logging wrapper for a non-existent logger had a level of 0, which registered as trace enabled, which meant some classes in the jk package dumped the whole request. For me, it was file uploads, so catalina.out was very large indeed. I also had a clue in that the catalina.out entry was prefixed by some debugging information from the jk classes. Is there anything preceding the dump of the request body in your logs? Like Data: ...? Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 7:18 PM To: 'Tomcat Users List' Subject: RE: Request parameters in catalina.out Just a me too. Slackware 9.1 Apache 2 (sorry, can't find minor version) Tomcat 4.1.30 JK 1.2 I get the same sort of thing in my catalina.out, and only on POST submissions. If I switch my form temporarily to GET, the dump goes away. Here's my server.xml (which has been trimed from the 'out of the box' one): Server port=11005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycle Listener debug=0/ !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 11009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=11009 minProcessors=5 maxProcessors=150 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=hosts_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context path= docBase=ROOT debug=0 / /Host Host name=devstar.globallyboundless.com debug=0 Context path= docBase=/home/data3/me20/ defaultSessionTimeOut=60 reloadable=true Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuemail.globallyboundless.com/value /parameter /ResourceParams /Context /Host /Engine /Service /Server Where's my dumper? As for log4j, I've got a log4j file at $CATALINA_HOME/common/classes that contains: log4j.category.org.apache.jk.common.ChannelSocket=WARN, filer log4j.additivity.org.apache.jk.common.ChannelSocket=false log4j.category.org.apache.jk.server.JkCoyoteHandler=WARN, filer log4j.additivity.org.apache.jk.server.JkCoyoteHandler=false log4j.appender.filer
RE: Request parameters in catalina.out
Just a me too. Slackware 9.1 Apache 2 (sorry, can't find minor version) Tomcat 4.1.30 JK 1.2 I get the same sort of thing in my catalina.out, and only on POST submissions. If I switch my form temporarily to GET, the dump goes away. Here's my server.xml (which has been trimed from the 'out of the box' one): Server port=11005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 11009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=11009 minProcessors=5 maxProcessors=150 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=hosts_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context path= docBase=ROOT debug=0 / /Host Host name=devstar.globallyboundless.com debug=0 Context path= docBase=/home/data3/me20/ defaultSessionTimeOut=60 reloadable=true Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuemail.globallyboundless.com/value /parameter /ResourceParams /Context /Host /Engine /Service /Server Where's my dumper? As for log4j, I've got a log4j file at $CATALINA_HOME/common/classes that contains: log4j.category.org.apache.jk.common.ChannelSocket=WARN, filer log4j.additivity.org.apache.jk.common.ChannelSocket=false log4j.category.org.apache.jk.server.JkCoyoteHandler=WARN, filer log4j.additivity.org.apache.jk.server.JkCoyoteHandler=false log4j.appender.filer=org.apache.log4j.RollingFileAppender log4j.appender.filer.layout=org.apache.log4j.PatternLayout log4j.appender.filer.layout.ConversionPattern=%-5p %c - [%m] %d{ISO8601}%n log4j.appender.filer.File=/usr/local/applications/tomcat-4.1.30-1/logs/debug .catalina log4j.appender.filer.MaxFileSize=100KB log4j.appender.filer.MaxBackupIndex=4 This was an attempt (so far successful) to shut off messages like: [Thread-14] INFO common.ChannelSocket - connection timeout reached and [Thread-121] INFO server.JkCoyoteHandler - RESET Is it mis-configured? Thanks, MC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SOLVED: How to get the context path for a web application?
I'm never sure why smart people get this confused. ContextPath... has nothing whatsoever to do with running in a WAR, from a database, or exploded from a file system. For simple little things that an application might want to do like, oh, I don't know... reminder emails that might contain a link to the webapp in question. At that point, there is no request, since this is probably a scheduled occurrence. I suppose rather than use a scheduler, I could use cron and wget to hit a URL, in which case, voila, I'd have a HttpServletRequest. But wouldn't it be great if you could do application.getContextPath()? But alas, the expert group feels the answer is 'no'. Fine, whatever. It seems ridiculous that the application should not know anything about who it is, or under what URL/I I'm running or however you want to think of it, until an HttpRequest arrives on the scene. I just couldn't let it pass without pointing out that the one (contextPath) has nothing to do with the reasons that are normally cited for its exclusion from anything but HttpServletRequest. -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 9:12 AM To: Tomcat Users List Subject: Re: SOLVED: How to get the context path for a web application? Per the servlet spec, a j2ee app isn't required to have an app path. The entire war file can be deployed remotely and run without ever being unpacked. In a case like that, there would be no path to the application. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SOLVED: How to get the context path for a web application?
OHH!!. How could we be so stupid??? RTFT! (that last 'T' would be 'thread') -Original Message- From: Rajesh [mailto:[EMAIL PROTECTED] Sent: Thursday, August 12, 2004 8:47 AM To: Tomcat Users List Subject: Re: SOLVED: How to get the context path for a web application? hai use request.getContextPath() Rajesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can't show self-defined error page !!!
Also, A page with nothing but ERROR !!! is probably too small. There is a 'feature' of IE that won't show an error page if it's under a certain size. -Original Message- From: Eric Chow [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:11 PM To: Tomcat Users List Subject: can't show self-defined error page !!! I define some error code with a specific error page in Tomcat 5.0.27. But it seems not woeking. For example, I type a non-existed page. It must show 404 .., as in the setting, it should display my error.jsp. but it never show it . anything i missed ??? Eric !-- error.jsp -- %@ page isErrorPage=true % ERROR !!! !-- web.xml -- !-- Error Pages definition -- error-page error-code403/error-code location/error.jsp/location /error-page error-page error-code404/error-code location/error.jsp/location /error-page error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code503/error-code location/error.jsp/location /error-page == If you know what you are doing, it is not called RESEARCH! == - 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: custom error pages
I think the essence of the request is to get Tomcat to not show a tomcat error page under any circumstances. For those using Tomcat stand-alone, (ie: they do not have the benefit of being able to use custom apache error pages), is there a solution? If you say that errorpages specified in web.xml are part of the web app, and so are not available unless the app is available, would this be more appropriately handled by a customized Connector? ie: com.foo.my.Connector extends org.apache.coyote.tomcat4.CoyoteConnector and then I can set up customized pages for 404, 500, etc, etc ? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 8:11 AM To: Tomcat Users List Subject: RE: custom error pages Hi, The stuff in conf/web.xml is virtually appended to your web.xml. If your web.xml is inactive or non-existent the stuff in conf/web.xml is not applicable and not consulted. Yoav Shapira Millennium Research Informatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: classloader hangs
if you've got it running in a DOS window (which you might want to do, for just this purpose), you can try either the Pause/Break key, and if that doesn't do it, try 'Cntrl-C' in the DOS window. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 4:10 PM To: Tomcat Users List Subject: Re: classloader hangs On Windows XP? :-( (my employer doesn't enjoy linux) Send a SIGQUIT to the JVM process. - 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: hot fixes for 4.1.27
place the class in: server\classes\org\apache\catalina\core\ and then restart Tomcat. That's it. -Original Message- From: Vykuntam (vyke) Adepu [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 3:58 PM To: Tomcat Users List Subject: RE: hot fixes for 4.1.27 I down loaded the class file. Do I simply copy this class ( standardContext.class) to \server\classes Or do I need to do anything else to apply this fix? thanks, vyke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat too slow in Windows 2000 server
what else is running on the box? a popular tomcat-killer is an antivirus program -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 11:57 AM To: Tomcat Users List Subject: RE: Tomcat too slow in Windows 2000 server Thanks for answering. I'm using the exact same hardware (it's the same machine). I think the JDK version I was using before was a bit older. I've set the initial and maximum heap size to 384 MB (1/3 of total system memory) and tested that the new values were being acknowledged but that didn't solve the problem. Also, it isn't another application or the OS itself draining on the resources because processor and memory usage are low all the time, well, memory usage was low before I set the new values. Thanks again. --Juan Escalante -- Mensaje Original -- Reply-To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Tomcat too slow in Windows 2000 server Date: Mon, 26 Jul 2004 07:59:38 -0400 From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Hi, Tomcat's speed should be very close on these two OSs. Are you using the same JDK version on the same hardware? Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] Sent: Friday, July 23, 2004 10:12 PM To: [EMAIL PROTECTED] Subject: Tomcat too slow in Windows 2000 server Hi, I was using Tomcat 5.0 under Windows XP Pro and it was working just fine but I had to switch to Windows 200 Server and now Tomcat has become extremely slow. I don't think it's a tuning issue because I was using default settings before (with Win XP), besides, I'm just using it for testing a web application, it's not in production. I tried setting JAVA_OPTS to -server but nothing changed, like I said before, I don't think it's a tuning issue, something is wrong. Could this have something to do with the OS? Thanks. --Juan Escalante -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscrib , e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Different virtuel hosts with Tomcat 5
In fact, isn't it impossible to use one Manager app and have it be able to manage apps cross-host ? So it's not so much a matter of what you want? I'm curious, because I'd like the opposite (one manager app, for all apps on all hosts) and I've always thought that not possible. Not true? -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 3:58 PM To: Tomcat Users List Subject: Re: Different virtuel hosts with Tomcat 5 One question is not related to server.xml. If I want different manager/virtualhost to have different users/passwords, I need to deploy it directly to it's own virtualhost's webapps? (and changing the role-name tag in web.xml) thanks Emerson Cargnin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat5 does not find properties file in webapp
If MyServiceImpl.class was loaded by a common/lib classloader, would it be able to find resources in the WEB-INF/ classloader ? (Do classloaders work that way?) -Original Message- From: Lorenz, Christoph [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 8:15 AM To: 'Tomcat Users List' Subject: tomcat5 does not find properties file in webapp Hi, what is the reason, that tomcat5 (5.0.25) does not read my properties file, which I placed in $WEBAPP/WEB-INF/classes/my.properties when I try to access it the following way: Properties p = new Properties(); p.load(MyServiceImpl.class.getResourceAsStream(/my.properties)); If I try to determing the position of the resource the following way: URL u = MyServiceImpl.class.getResource(/my.properties); u is null here. Thank you very much in advance Christoph - 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: Connection pool detecting bad connection
for more than just Oracle, try SELECT 1 -Original Message- From: V D [mailto:[EMAIL PROTECTED] Sent: Saturday, July 17, 2004 7:33 AM To: Tomcat Users List Subject: Re: Connection pool detecting bad connection Thank you very much for the information. I wonder what is the implication of this in term of performance. This effectively double the number of query if my query is small and one for each request to have a connection handle (but under very heavy load). Also, what's a generic way for doing this across other database, for example, MySql, MS Sql, etc. Also, what if the table does not exist? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP pool
what timeout? the amount of time it keeps an idle connection in the pool? the amount of time it waits before considering a connection abandoned? -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 2:40 PM To: Tomcat Users List Subject: DBCP pool Is there a way to set the database timeout in dbcp??? I have a database which I have no control under its timeout. I used a pool api that allowed me to set the database timeout, but as I want to move to DBCP, is there a way to set this??? -- Emerson Cargnin Analista de Sistemas - Gerente Regional - Tubarão Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP pool
I think the way to do this with DBCP is to specify a test query. The pool would then run this query (like SELECT 1) before giving out the connection. If it failed (and if it's because the connection is closed), it will null this connection in the pool, open a new connection, and retest it, and then give this one out. If any of that is factually wrong, someone will be sure to jump in and correct me. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 3:03 PM To: Tomcat Users List Subject: Re: DBCP pool none of them, I mean the timeout set in database, the maximum life time for an connection. This is used when you have a database that has a given timeout, let's say, 10 minutes, so you can't have this connection opened for more than 10 minutes, what would case an error due to an timeouted connection. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP pool
I'm not an expert, but I suspect that the resource config parameters will act like javabean setters. So you should be able to specify something like: parameter namevalidationQuery/name valueSELECT 1/value /parameter parameter nametestOnBorrow/name valuetrue/value /parameter -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 4:30 PM To: Tomcat Users List Subject: Re: DBCP pool How do I specify the test query as context param? There is nothing in the JDBC configuration of DBCP in tomcat 5 docs. BTW, I found some typos erros, must I create a bug, or may I put it here? other question: May I mix the Resource and ResourceParams tags?? I'm asking this because I have to configure 2 connection in some apps, so I must put a Resource and a ResourceParams tag sequencially for each connection I want to configure?? Thanks for your response Emerson Mike Curwen wrote: I think the way to do this with DBCP is to specify a test query. The pool would then run this query (like SELECT 1) before giving out the connection. If it failed (and if it's because the connection is closed), it will null this connection in the pool, open a new connection, and retest it, and then give this one out. If any of that is factually wrong, someone will be sure to jump in and correct me. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 3:03 PM To: Tomcat Users List Subject: Re: DBCP pool none of them, I mean the timeout set in database, the maximum life time for an connection. This is used when you have a database that has a given timeout, let's say, 10 minutes, so you can't have this connection opened for more than 10 minutes, what would case an error due to an timeouted connection. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas - Gerente Regional - Tubarão Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP pool
http://jakarta.apache.org/commons/dbcp/configuration.html -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 4:40 PM To: Tomcat Users List Subject: Re: DBCP pool If testOnBorrow is not true, when is it tested? Mike Curwen wrote: I'm not an expert, but I suspect that the resource config parameters will act like javabean setters. So you should be able to specify something like: parameter namevalidationQuery/name valueSELECT 1/value /parameter parameter nametestOnBorrow/name valuetrue/value /parameter -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 4:30 PM To: Tomcat Users List Subject: Re: DBCP pool How do I specify the test query as context param? There is nothing in the JDBC configuration of DBCP in tomcat 5 docs. BTW, I found some typos erros, must I create a bug, or may I put it here? other question: May I mix the Resource and ResourceParams tags?? I'm asking this because I have to configure 2 connection in some apps, so I must put a Resource and a ResourceParams tag sequencially for each connection I want to configure?? Thanks for your response Emerson Mike Curwen wrote: I think the way to do this with DBCP is to specify a test query. The pool would then run this query (like SELECT 1) before giving out the connection. If it failed (and if it's because the connection is closed), it will null this connection in the pool, open a new connection, and retest it, and then give this one out. If any of that is factually wrong, someone will be sure to jump in and correct me. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 3:03 PM To: Tomcat Users List Subject: Re: DBCP pool none of them, I mean the timeout set in database, the maximum life time for an connection. This is used when you have a database that has a given timeout, let's say, 10 minutes, so you can't have this connection opened for more than 10 minutes, what would case an error due to an timeouted connection. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas - Gerente Regional - Tubarão Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas - Gerente Regional - Tubarão Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP pool
Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB ONE SET OF PARAMETER TAGS /ResourceParams Resource name=jdbc/AnotherDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/AnotherDB SECOND SET OF PARAMETER TAGS /ResourceParams That's the way I'd do it. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 4:40 PM To: Tomcat Users List Subject: Re: DBCP pool What about this other question: May I mix the Resource and ResourceParams tags?? I'm asking this because I have to configure 2 connection in some apps, so I must put a Resource and a ResourceParams tag sequencially for each connection I want to configure?? Thanks for your response Emerson Mike Curwen wrote: I think the way to do this with DBCP is to specify a test query. The pool would then run this query (like SELECT 1) before giving out the connection. If it failed (and if it's because the connection is closed), it will null this connection in the pool, open a new connection, and retest it, and then give this one out. If any of that is factually wrong, someone will be sure to jump in and correct me. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 3:03 PM To: Tomcat Users List Subject: Re: DBCP pool none of them, I mean the timeout set in database, the maximum life time for an connection. This is used when you have a database that has a given timeout, let's say, 10 minutes, so you can't have this connection opened for more than 10 minutes, what would case an error due to an timeouted connection. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas - Gerente Regional - Tubarão Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: why only put resource file to $TC$\shared\classes, did TC found it?
what is 't' ? -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 6:24 AM To: Tomcat Users List Subject: why only put resource file to $TC$\shared\classes, did TC found it? Howdy, I am developing webapp using TC4.1.27 , Eclipse 3.0 and Lomboz 3.0, In one of my webapp's bean class, I want to get a resource file by : URL u = t.getClass().getResource(/Application.properties); my bean class put to WEB-INF\classes\somepackage\, and the webapp was deployed by an xml file under directory $TC$\webapps , It is strange the only put resource file(Application.properties) to $TC$\shared\classes, did TC found it. I tried putting it to WEB-INF\classes, it could not be found. I tried putting it to WEB-INF\classes\somepackage, it could not be found. I tried putting it to Eclipse's project directory, it could not be found. Any idea? Putting resource file to $TC$\shared\classes is a bad idea I think.:) Best Regards Chris - 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: log file problem
The other thing said was 'restart the web server which clears the logs' huh? Who here has a web server that keeps logs in memory or entirely in some type of swap space that is cleared on a server restart? (do you mean a tomcat restart, or a server hardware reboot ?) I'm thinking there might be some other problem, not related to logs. Like OOME. -Original Message- From: Jitesh Sinha [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 9:53 AM To: Tomcat Users List Subject: RE: log file problem Ok so how do I find out definitively which of the stuffs is going to break? Actually in my application sometimes some parameter becomes null which creates problems with the flow of the application Sometimes user is not able to open the application itself.we restart the web server which clears the logs and everything comes on track Any ideas are welcomeI am kinda becoming despo now ... :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: standard install produces 33 processes/forks!
What version of Linux ? older kernels report each java thread as a separate process. -Original Message- From: Matthias Leonhardt [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 12:18 PM To: [EMAIL PROTECTED] Subject: standard install produces 33 processes/forks! Hi, how can I reduce the amount of processes started by the tomcat. I tried to change the min_spare* options of the 2 Connectors in the standard config - so I got 29 processes instead of 33. How can I reduce the large amount of processes? I attached the server.xml to this mail - so you can have a look. But its the standard-config as distributed in the tarball of the tomcat 4.1 which I downloaded before. thanks for Your help/hints kind regards, Matthias Leonhardt -- Matthias Leonhardt - Team Software Solutions - pro|business AG Expo Plaza 1 30539 Hannover Germany phone 1+49-3641-776323 phone 2+49-511-60066-0 email [EMAIL PROTECTED] webhttp://www.probusiness.de - 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]
Is there such a beast ? (virtual directories)
Hello all, I had a friend ask me on the phone a couple days ago, and now a question has popped up at javaranch. I've looked in the docs and googled, but haven't found a definitive 'no' answer (shouldn't life be that simple?). Thought I'd ask here. Is there such a thing as directory aliasing / virtual directories (like you get in Apache), available in Tomcat? so you'd specify that /images is *really* over here at /usr/local/some/funky/place/images I like to tell people they don't need Apache, unless they're doing special stuff. Would this be one of those special things ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is there such a beast ? (virtual directories)
Hm... would that work in this case: host ... context docBase=/path/to/web-app/root/ path=/foo-app ... / context docBase=/some/other/path path=/images / /host then from the browser I'd want: http://www.mydomain.com/foo-app/images to look inside /some/other/path (the virtual directory should only be available from within foo-app). -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 10:14 AM To: Tomcat Users List Subject: RE: Is there such a beast ? (virtual directories) Inside a host you could add a context path=/images docBase=/usr/local/somewhere / Regards, Carl -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: 13 July 2004 05:13 PM To: [EMAIL PROTECTED] Subject: Is there such a beast ? (virtual directories) Hello all, I had a friend ask me on the phone a couple days ago, and now a question has popped up at javaranch. I've looked in the docs and googled, but haven't found a definitive 'no' answer (shouldn't life be that simple?). Thought I'd ask here. Is there such a thing as directory aliasing / virtual directories (like you get in Apache), available in Tomcat? so you'd specify that /images is *really* over here at /usr/local/some/funky/place/images I like to tell people they don't need Apache, unless they're doing special stuff. Would this be one of those special things ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: will ROOT (/) context, folder hello interfere with context (hello) ?
You'd get the hello context. -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:37 AM To: 'Tomcat Users List' Subject: will ROOT (/) context, folder hello interfere with context (hello) ? Something just popped in my mind. If you have a ROOT context which has a folder named hello, And you have a context named hello When you request localhost:8080/hello/ Which one are you gonna get? The ROOT context or the hello context? I will try this out tomorrow, but I wonder how tomcat handles this? _ Best Regards, Ivan V. Jouikov (206) 228-6670 http://www.ablogic.net/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004
RE: How to start a web app?
Wouldn't it be easier to assume (in all things, not just tomcat docs) that unless 'recursion' is specifically mentioned, that a given process is *not* recursive? http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat ic%20Application%20Deployment Where in the 3rd bullet do you get the idea that tomcat would search recursively through the directory specified in 'appBase' ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 1:41 AM To: [EMAIL PROTECTED] Subject: RE: How to start a web app? -Original Message- From: QM Long story short: Tomcat does not search the webapps directory recursively for webapps; it loads contexts that are immediate children of the webapps directory. Essential information. I do wish someone would make that explicit in the tomcat documentation. regards DaveP. ** snip here ** -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to start a web app?
Michael, my email was specifically in reply to David.Pawson's. I thought I'd point that out in case you took anything personally in my previous email. I bother to point it out because you asked the same question three times. Where I come from, that's ridicule by repetition, but I could be mistaking your intent. Sarcasm aside, it's an interesting thought process you must have gone through to start off with Right, and then proceed to point out how it's wrong. The point I was attempting to make is that there is nothing wrong with the docs, and that they are not missing Essential Information. Unless someone can tell me how the 3rd bullet on the docs I linked to allows a person to infer recursion, I don't think the docs need changing. Perhaps it's the use of 'subdirectory'. If it was changed to read Any directory within the Application Base directory, would that avoid this miscomprehension? If not, then I come back to my first question of the previous email. In your entire life as programmer, when is it appropriate to assume a process is recursive, when it is not explicitly documented to be so? -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 10:29 AM To: Tomcat Users List Subject: Re: How to start a web app? Right. So should we improve the documentation or improve all the readers of the documentation? Let's see ... Documentation, or all the readers of the those docs ... Improve the docs, or all the readers of the docs ... Hmmm ... What could the answer be? Boy! That's a tough one! On Friday 09 July 2004 08:19 am, Mike Curwen wrote: Wouldn't it be easier to assume (in all things, not just tomcat docs) that unless 'recursion' is specifically mentioned, that a given process is *not* recursive? http://jakarta.apache.org/tomcat/tomcat-4.1- doc/config/host.html#Autom at ic%20Application%20Deployment Where in the 3rd bullet do you get the idea that tomcat would search recursively through the directory specified in 'appBase' ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 1:41 AM To: [EMAIL PROTECTED] Subject: RE: How to start a web app? -Original Message- From: QM Long story short: Tomcat does not search the webapps directory recursively for webapps; it loads contexts that are immediate children of the webapps directory. Essential information. I do wish someone would make that explicit in the tomcat documentation. regards DaveP. ** snip here ** -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving static content
Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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: serving static content
To unsubscribe, e-mail: [EMAIL PROTECTED] ! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:57 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: serving static content PLaese no send emailthank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving static content
Adding a context is not quite enough. It must be recognized as a web-app also. Which means place an empty web.xml file in the WEB-INF directory. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:54 PM To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble running servlets using TomCat4.1.18
did you turn on the invoker servlet ? -Original Message- From: Kamaleshwaran Sivalingam [mailto:[EMAIL PROTECTED] Sent: Thursday, July 08, 2004 9:26 AM To: Tomcat Users List Subject: Trouble running servlets using TomCat4.1.18 Hi, I have trouble running servlets using tomcat4.1.18 in Redhat Linux. I have Apache 1.3.20 installed which is listening on port 80. The TomCat server is listening on port 8080. The Apache server is used for serving php. so when i entered http://localhost; on the mozilla browser, i get the index.php page. When i entered http://localhost:8080; i get the index.html page which is under the tomcat directory. When i click on a button on my index page i must get a servlet which should be executed by the tomcat. But I get the following error on my browser. Not Found The requested URL /examples/servlet/PeatPlot was not found on this server. -- -- Apache/1.3.20 Server at _default_ Port 80 So it was served by apache on port 80. How do i redirect this to port 8080(TomCat)? can you help me out? Thanks, kamaleshwaran Sivalingam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to start a web app?
in order to be considered a webapp, you need to have an empty web.xml file in the WEB-INF folder under springapps. Do you have this? empty means web.xml contains: web-app /web-app You will also need to restart Tomcat for it to pick this up. -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, July 08, 2004 11:28 AM To: Tomcat Users List Subject: How to start a web app? I installed a new, extremely simple application in $CATALINA_HOME/webapps/springapps/index.html. When I attempt to view this with http://localhost:8080/springapps/index.html I get Error: 404. The requested resource (/springapps/index.html) is not available. So I'm reading and it says that I have to start the application by going into the Tomcat Manager. So I fix the $CATALINA_HOME/conf/tomcat-users.xml file so that I have both admin and manager roles. Then I go to the Tomcat homepage localhost:8080. I can log into the Administration page no problem. But when I try to get to the Manager it says, Access to the specified resource (Access to the requested resource has been denied) has been forbidden. I'm stumped. Don't know where to go from here. Seems like this shouldn't be this difficult. Any suggestions? -- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AGAIN: How can you deploy an application onto a specific host?
I'm not sure what you see, but my tomcat manager only shows me the applications that exist in the 'current' host. meaning: foo.mysite.com:8080/manager/html/list will show me only those apps deployed under 'foo' bar.mysite.com:8080/manager/html/list will show me only those apps deployed under 'bar'. Are you saying that if you deploy something with the 'foo' manager, that the application gets deployed on another host? (on the default host?) -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 4:30 PM To: 'Tomcat Users List' Subject: AGAIN: How can you deploy an application onto a specific host? I've asked this question before but nobody seemed to know the answer. So, I'll ask again. So, Tomcat has a maanger application, which allows you to dynamically deploy sutff. Nice. But how can you deploy your stuff onto a SPECIFIC host? Thx. _ Best Regards, Ivan V. Jouikov (206) 228-6670 http://www.ablogic.net/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004
RE: Create new Tomcat User mailing lists?
It's a good idea, but it has it's problems. As an example: What about tomcat 4 install problems? Does it go in Tomcat 4 , or the install one? What about tomcat 5 on linux, connecting to IIS on win2k3. Which list ? The way I would handle this is to create a client-side mail filter. If I were ever to do so, the first one I'd create is if it contains mod_jk, jk, or jk2, then send it to the dustbin folder. If there was a single division I could make in the lists, it would be that one. tomcat-user tomcat-connectors-user -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 9:26 AM To: [EMAIL PROTECTED] Subject: Create new Tomcat User mailing lists? Is there any chance that the Tomcat User mailing list maintainers might split the Tomcat User mailing list into multiple lists by topic? This would classify and partition the mailing list traffic and would allow a user to subscribe to the topic(s) that interest him or her and ignore those that don't. As the Tomcat User mailing list traffic grows, I find it increasingly difficult to sift through the daily messages for those that I want to read. I'm also receiving a lot more mail from this list (and other popular lists like Subversion User), much of it that I ignore because I don't have the time to read it. Multiple mailing lists would help alleviate these problems. Suggested mailing list topics: Installation and Configuration Performance, Optimization, and Maintenance Tomcat 3 Issues Tomcat 4 Issues Tomcat 5 Issues Tomcat and Apache Tomcat and Internet Information Server (IIS) Tomcat and JSP/Servlets Tomcat on Linux or Unix Tomcat on Windows What do you think? Derek - 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: Tomcat Logging.. whats the best way ?
I believe that it's 'normal' to use a logging package, rather than system.out to perform debug logging. A package like log4j has many advantages including: 1) It's popular (so you get support and lots of people can help) 2) It's super-configurable (you can turn each class/package on or off, or adjust its logging level) 3) It's not system.out (which may not always be under your control) -Original Message- From: Ben Bookey [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 10:02 AM To: Tomcat User List Subject: Tomcat Logging.. whats the best way ? Dear List, We have written a webapp, and now I want to add some logging inside. The app has jsp pages, servlets and a java package of classes for jdbc database interaction. O.k. as I understood Tomcat does support logging via, catalina.out etc. The logfile can even be configured based on each web descriptor web.xml file. This seems quite flexible until you want to start monitoring whats going on inside of the com.package, not just inside the servlet container. So it seems to me that we need to create/use a logger class (e.g. log4j) for the package. Am i right in understanding that its normal-case to use a log4j type method of logging denug info for internal purposes. Its not recommended to use JUST Tomcat logging for the complete web app.? Would appreciate any view, regards BB - 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]