Re: How and where to specify the log format in Tomcat
On 1/23/06, Sheshadri Patel [EMAIL PROTECTED] wrote: Hi All, How and where to enable Tomcat server to use NCSA Common or NCSA Combined format in their log files? http://tomcat.apache.org/tomcat-5.0-doc/config/valve.html It should be configured in the server.xml. Look for the AccessLogValve element. The pattern attribute specifies the log format. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to set up tomcat with multihoming?
How do I use multihoming within tomcat? I need to serve several domains each with a webapplication. How is that done? Regards Morten Andersen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set up tomcat with multihoming?
Morten Andersen wrote: How do I use multihoming within tomcat? I need to serve several domains each with a webapplication. How is that done? http://tomcat.apache.org/tomcat-5.5-doc/config/host.html Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set up tomcat with multihoming?
I've read that but still I'm pretty lost I've figured that I can create a Host element in the server.xml, but the Tomcat documentation doesn't really help me much more. It mentions the option to add files in the conf/[Engine]/[Appname] folder, but what should the file name be and how should it be structured? Please provide a few examples. Then I'll probably be able to figure out how to change the example to my settings. Thanks Morten Markus Schönhaber skrev: Morten Andersen wrote: How do I use multihoming within tomcat? I need to serve several domains each with a webapplication. How is that done? http://tomcat.apache.org/tomcat-5.5-doc/config/host.html Regards mks - 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 set up tomcat with multihoming?
Morten Andersen wrote: I've read that but still I'm pretty lost I've figured that I can create a Host element in the server.xml, but Create a Host for each of the domains you have in server.xml. the Tomcat documentation doesn't really help me much more. It mentions the option to add files in the conf/[Engine]/[Appname] folder, but what should the file name be and how should it be structured? make that read: conf/[Enginename]/[Hostname] There you can configure the WebApps for the individual Hosts you have. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Please provide a few examples. Then I'll probably be able to figure out how to change the example to my settings. The example is the Host that's in server.xml by default. Markus Schönhaber skrev: Morten Andersen wrote: How do I use multihoming within tomcat? I need to serve several domains each with a webapplication. How is that done? http://tomcat.apache.org/tomcat-5.5-doc/config/host.html Regards mks - 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: increase limit Xmx
hi richard, sorry for being 'teachy', but if you'd read carefully (:-)) you'd see that the bug only came with jdk versions greater then 1.5_02 and is also confirmed on linux and windows versions (see related bugs and comments). However, you are running on a 01 vm, which hasn't the bug, so you'd better stay with it :-))) regards Leon On 1/23/06, Richard Mixon [EMAIL PROTECTED] wrote: Leon, Thank you for the link, but this is not my experience. I have been running a pretty intensive data analysis application on 64-bit Java on two dual-Opteron servers for almost two years now. We have been on the Sun compiler for over year (were on the IBM 64-bit compiler before that). Here is our version info: kingfish:~/jakarta-tomcat-5.5.7/logs java -version java version 1.5.0_01 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_01-b08, mixed mode) kingfish:~/jakarta-tomcat-5.5.7/logs It seems that we are on 1.5, but an earlier version than the one in the link (1.5.0_05-b05), plus the link is for Solaris-SPARC not for AMD64 architecture. We have had nothing but stability and great performance since moving to 64-bit. We have not noticed more memory use, but there certainly could be some incremental increase. But with RAM as cheap as it is, we can add another 2GB of quality ECC memory for about $325. - Richard -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 4:01 AM To: Tomcat Users List Subject: Re: increase limit Xmx On 1/22/06, Richard Mixon [EMAIL PROTECTED] wrote: Andri, I'm guessing that you are using a 32-bit version of (SuSE) Linux Enterprise 9. You need to use the 64-bit version to get heap sizes greater than 2GB (actually it ends up being closer to th 1800m as you have experience). An of course your hardware needs to support 64-bit (e.g. with AMD64 chips such as Opterons or Intels EMT64 clones). Just a bit of advice: Please note that current 64bit java vm for amd64/xeon emt64 has serious bugs in HotSpot compiler, so you should better wait until 07 is released: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6346871 regards Leon P.S. You should also consider that the usage of 64bit java will increase you memory usage. Now of course, switching to 64-bit OS and hardware may not be an option. Something that sometimes works for others is to run two or more instances of Tomcat - with each getting the 1800M of heap. Of course there must be real memory/RAM to support this, but some 32-bit machines can support 4GB of RAM (maybe more, I'm not sure) - the 2GB (or slightly less) limit is for a single process, such as the JVM that Tomcat runs in. With the multiple Tomcat's running, of course you need some way to load balance requests across the two instances - you can search the archives of this list for many, many discussions on how to do this. HTH - Richard -Original Message- From: Andri Herumurti [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 7:38 PM To: users@tomcat.apache.org Subject: increase limit Xmx how to increase limit of Xmx? i use suse linux enterprise server 9, but i need to increase the limit of Xmx so it can become more than 1800m? Thanks Andri - What are the most popular cars? Find out at Yahoo! Autos - 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: How to capture printf() stdout to stdout_nnn.log?
running startup.bat myfile.log Le Jeudi 19 Janvier 2006 18:25, Joe Siebenmann a écrit : Hi All, My System.out.println() gets logged to Tomcat's log file fine. I want to be able to capture the printf()s in the DLL of my JNI to the same, or another, log file. If I start Tomcat from the command line using 'startup.bat' the printf()s show-up on the console output. My question is how can I get this to get logged to a log file when I run Tomcat normally? I start the Apache Tomcat Service. I'd rather not have to go through all that using log4j stuff unless it's really needed. Can't it be done with the normal Commons Logging, or what's built-into Tomcat? I've found bits and pieces on how to do this, but nothing that's clear. I'm using Tomcat-5.5.9 with Java 1.5, on Windows XP. Thanks, Joe Siebenmann __ 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] -- David Delbecq Royal Meteorological Institute of Belgium - Pingouins dans les champs, hiver méchant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
blank admin
hi all... i realize this is probably a retarded question but it is a retarded problem too... new installation of tomcat 5.0.30 with jdk 1.4.2. when i go to http://myserver:8080 and login as manager - no problems there. but if i go to the admin directory i get a blank page. the admin directory under server/webapps has exactly the same permissions as manager and here is my tomcat-users.xml: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=manager/ role rolename=admin/ user username=manager password=very-secret roles=manager/ user username=admin password=bigger-secret roles=admin,manager/ /tomcat-users this is probably normal but i would like to mention that even if i change the order if the elements in the tomcat-users and put admin first after restarting the server they get switched back in this order... any help appreciated... thanks... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
In which directory and file is session data stored?
Hello, Can anyone tell me where session data is stored in tomcat?? Thanks in advance, Julien Martin.
Re: In which directory and file is session data stored?
Julien Martin wrote: Can anyone tell me where session data is stored in tomcat?? $CATALINA_BASE/work/[enginename]/[hostname]/[webappname] which is by default: .../work/Catalina/localhost/[webappname] Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Overlapping contexts?
Hi All, I was just wondering if it is possible to have overlapping contexts? I am not sure if this will make sense so I'll try and explain it with a little example; Basically, I'd like to be able to have two *similar* URL's map to separate locations on the filesystem; Example; localhost/myapp/index.jsp (refers to C:\myapp\index.jsp) localhost/myapp/external/index.jsp (refers to Z:\otherapp\index.jsp) Ideally, I'd like to achieve this using Tomcat's Context path=/myapp docBase=C:/myapp ... Context path=/myapp/external docBase=Z:/otherapp/ ... element in server.xml. The important part here is that both contexts begin with /myapp! However, the last time I tried this, I had several different errors when Tomcat started up. I believe this may be due to the fact that with Tomcat 5.5 and above you shouldn't have context tags in server.xml. Therefore, I tried similar things in conf/context.xml with much similar results (errors). I then tried separate context files in C:\tomcat5\work\Catalina\localhost but this didn't work either. Can someone tell me if what I am trying to do is possible? If so, a hint in the right direction would also be appreciated ;) Regards, Chris Connaught honoured AIM 'Decade of Excellence' Award Connaught awarded Partnering Contractor of the Year 2005 Connaught wins AIM 'Company of the Year' award 2004 West of England Business of the Year Award Winner 2003 Why not visit our website http://www.connaught.plc.uk Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546 The presence of this footer indicates that this message has been scanned for viruses by Network Associates Group Shield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: In which directory and file is session data stored?
Hello Markus, I wonder why my file only weighs 1ko (tldCache.ser). Is this file only to do with Tag Lib Descriptors? If I have a lot of session data where (in what file) is it stored? Julien. 2006/1/23, Markus Schönhaber [EMAIL PROTECTED]: Julien Martin wrote: Can anyone tell me where session data is stored in tomcat?? $CATALINA_BASE/work/[enginename]/[hostname]/[webappname] which is by default: .../work/Catalina/localhost/[webappname] Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Manually setting up Tomcat5.0 as service on Windows server 2003 : some questions
Hi I'm trying to manually setting up Tomcat5.0 as a service on a Windows Server 2003. I've already set up my JAVA_HOME and CATALINA_HOME variables, as well as updated the PATH with : %JAVA_HOME%;%JAVA_HOME%\jre\bin\client;. My questions are : - should the service launch the startup.bat ? If so, what about the console output ? Would it be better for the service to launch a shortcut (this shortcut would link to startup.bat and redirect the console output) ? - on the server shutdown, would it matter that the shutdown.bat is not launched ? - do I have to do something more that the points above ? Thanks in advance ! Cheers, ZedroS
Re: In which directory and file is session data stored?
Julien Martin wrote: I wonder why my file only weighs 1ko (tldCache.ser). Is this file only to do with Tag Lib Descriptors? I think so. If I have a lot of session data where (in what file) is it stored? Julien. AFAIK session data is stored in SESSION.ser in the same directory - at least when the webapp is stopped. 2006/1/23, Markus Schönhaber [EMAIL PROTECTED]: Julien Martin wrote: Can anyone tell me where session data is stored in tomcat?? $CATALINA_BASE/work/[enginename]/[hostname]/[webappname] which is by default: .../work/Catalina/localhost/[webappname] Regards mks - 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: Overlapping contexts?
Chris Mooring wrote: I was just wondering if it is possible to have overlapping contexts? I am not sure if this will make sense so I'll try and explain it with a little example; Basically, I'd like to be able to have two *similar* URL's map to separate locations on the filesystem; Example; localhost/myapp/index.jsp (refers to C:\myapp\index.jsp) localhost/myapp/external/index.jsp (refers to Z:\otherapp\index.jsp) Ideally, I'd like to achieve this using Tomcat's Context path=/myapp docBase=C:/myapp ... Context path=/myapp/external docBase=Z:/otherapp/ ... element in server.xml. The important part here is that both contexts begin with /myapp! However, the last time I tried this, I had several different errors when Tomcat started up. I believe this may be due to the fact that with Tomcat 5.5 and above you shouldn't have context tags in server.xml. Therefore, I tried similar things in conf/context.xml with much similar results (errors). I then tried separate context files in C:\tomcat5\work\Catalina\localhost but this didn't work either. If you store your Context information in individual files in .../conf/Catalina/localhost (conf, not work), the path-Attribute is ignored and the path information is derived from the name of the XML-file. So if you want to define a Context which shall be accessible via http://your.server/myapp the XML-file has to be named myapp.xml. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html If the Context's path shall contain slashes, replace them with # in the file name. I don't know if this works but what you could try is the following: put the two Contexts you mention above each in an individual XML-file under .../conf/Catalina/localhost and name the first myapp.xml and the second myapp#external.xml. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: In which directory and file is session data stored?
Thanks Markus! 2006/1/23, Markus Schönhaber [EMAIL PROTECTED]: Julien Martin wrote: I wonder why my file only weighs 1ko (tldCache.ser). Is this file only to do with Tag Lib Descriptors? I think so. If I have a lot of session data where (in what file) is it stored? Julien. AFAIK session data is stored in SESSION.ser in the same directory - at least when the webapp is stopped. 2006/1/23, Markus Schönhaber [EMAIL PROTECTED]: Julien Martin wrote: Can anyone tell me where session data is stored in tomcat?? $CATALINA_BASE/work/[enginename]/[hostname]/[webappname] which is by default: .../work/Catalina/localhost/[webappname] Regards mks - 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]
Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version.
Hello, For a webapp deployed on Tomcat 5.5.9 to access external resources, which we don't want to be deleted when the application is undeployed, we use the following entry on the context.xml file of the webapp: Context docBase=/path/to/resources path=/contents Resources className=org.apache.naming.resources.FileDirContext/ /Context Having configured this, we can access the files under /path/to/resources through the URL http://localhost:8080/contents. This worked perfectly with Tomcat 5.5.9, but when upgrading to Tomcat 5.5.10 or above (and we've tested on 5.5.10, 5.5.12 and 5.5.15) the webapp cannot access the external resources we place outside of the Tomcat webapps directory. Is this a bug or a better method to access external resources from a webapp has been defined from version 5.5.10? Thanks in advance, Gema Berdasco Valderrábano División de Transferencia de Tecnología Deimos Space S.L. Ronda de Poniente 19, Edificio Fiteni VI, P. 2, 2º 28760 Tres Cantos Madrid, España Tel +34 91 806 24 80 e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version.
Gema Berdasco wrote: For a webapp deployed on Tomcat 5.5.9 to access external resources, which we don't want to be deleted when the application is undeployed, we use the following entry on the context.xml file of the webapp: Context docBase=/path/to/resources path=/contents Resources className=org.apache.naming.resources.FileDirContext/ /Context Having configured this, we can access the files under /path/to/resources through the URL http://localhost:8080/contents. This worked perfectly with Tomcat 5.5.9, but when upgrading to Tomcat 5.5.10 or above (and we've tested on 5.5.10, 5.5.12 and 5.5.15) the webapp cannot access the external resources we place outside of the Tomcat webapps directory. Does your docBase (/path/to/resources) point to a directory within the Host's appBase? If so, then docBase will be ignored and you should find a corresponding warning message in the log file. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Overlapping contexts?
Hi Markus, I just have to say that you are a champ! I checked your proposed solution, and it seems to work fine. I will mess around with it a bit and see how I go. Thanks again, Chris -Original Message- From: Markus Schönhaber [mailto:[EMAIL PROTECTED] Sent: 23 January 2006 11:35 To: Tomcat Users List Subject: Re: Overlapping contexts? Chris Mooring wrote: I was just wondering if it is possible to have overlapping contexts? I am not sure if this will make sense so I'll try and explain it with a little example; Basically, I'd like to be able to have two *similar* URL's map to separate locations on the filesystem; Example; localhost/myapp/index.jsp (refers to C:\myapp\index.jsp) localhost/myapp/external/index.jsp (refers to Z:\otherapp\index.jsp) Ideally, I'd like to achieve this using Tomcat's Context path=/myapp docBase=C:/myapp ... Context path=/myapp/external docBase=Z:/otherapp/ ... element in server.xml. The important part here is that both contexts begin with /myapp! However, the last time I tried this, I had several different errors when Tomcat started up. I believe this may be due to the fact that with Tomcat 5.5 and above you shouldn't have context tags in server.xml. Therefore, I tried similar things in conf/context.xml with much similar results (errors). I then tried separate context files in C:\tomcat5\work\Catalina\localhost but this didn't work either. If you store your Context information in individual files in .../conf/Catalina/localhost (conf, not work), the path-Attribute is ignored and the path information is derived from the name of the XML-file. So if you want to define a Context which shall be accessible via http://your.server/myapp the XML-file has to be named myapp.xml. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html If the Context's path shall contain slashes, replace them with # in the file name. I don't know if this works but what you could try is the following: put the two Contexts you mention above each in an individual XML-file under .../conf/Catalina/localhost and name the first myapp.xml and the second myapp#external.xml. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Connaught honoured AIM 'Decade of Excellence' Award Connaught awarded Partnering Contractor of the Year 2005 Connaught wins AIM 'Company of the Year' award 2004 West of England Business of the Year Award Winner 2003 Why not visit our website http://www.connaught.plc.uk Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546 The presence of this footer indicates that this message has been scanned for viruses by Network Associates Group Shield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
writing files with a web application
Hi, I'm working on a web application using tomcal 5.x as servlet engine. Now i have to use another java tool for generating some html files. I would like to call the main method in my java code. My question is now: 1.) am I allowed to call main methods or programms in my web applicatio? 2.) am I allowed to write files on the disk from within an web application? If I am, something went wrong while trieing ;-) Can i write anywhere or have I to write to my application dir or to temp dir or something. thx Dominik __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: writing files with a web application
From: SOA Work [mailto:[EMAIL PROTECTED] Check the Servlet Spec (version 2.4 is at http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) for questions of this kind. From memory in both cases (so treat with caution): 1.) am I allowed to call main methods or programms in my web applicatio? If you wish to be spec-compliant, no. However, it should work depending on Tomcat's security settings. 2.) am I allowed to write files on the disk from within an web application? If I am, something went wrong while trieing ;-) Can i write anywhere or have I to write to my application dir or to temp dir or something. If you wish to be spec-compliant, you can only write to a temporary directory that you ask the context for. However, this may or may not be enforced depending on Tomcat's security settings. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting up connection pools on the fly...
This sequence is typically correct (with the close portions in a finally{} block.) You could add some timing around each of these statements, and determine the exact impact. Think about the relative complexity of each of these operations - Get a context - hashed lookup - Get a datasource - hashed lookup - Get a connection - DNS resolution, TCP connection, parameter transmission and negotiation, authentication... (possibly more depending on the driver and DB) - Make the statements - query optimization, caching (or cache lookup if a repeat), execution - Close resultsets - clean up - Close statements - clean up - Close connection - clean up, close TCP connection Now, replace the two connection operations with hash-type operations - one to remove it from a pool (list, collection, hash) and one to put it back. This is where you get the savings. This leaves the statement execution as the next largest time consumer, but that is an invariant in this problem. Empirically, I can tell you I added pooling to an older web app recently and some 'typical' web requests improved by about 2.5X. More importantly, Oracle 8i stopped running out of resources, saving operations from nightly DB restarts. Tim -Original Message- From: Warrick Wilson [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 9:24 PM To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 6:21 AM To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... The point of connection pooling is to eliminate the overhead of setting up and tearing down a (TCP, database, AAA) connection for every database transaction (typically, the web request in a web app.) This can add 100s or 1000s of milliseconds to every request, and is quite expensive. If you can architect your application so that there is a JNDI data source for each server (database server, instance, etc.) with its own pool of connections, you can always call setCatalog (http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.h tml#setCatalog (java.lang.String)) on the connection returned from the pool. One doesn't typically add new database servers on the fly, and this option would require defining a new JNDI datasource for a new server. Of course all catalogs processed in this way must be accesible to the user specified in the connnection pool properties. I would suggest setting the defaultCatalog property as well, so that you are not accidentally connected to the last-used catalog from the previous borrower of the connection. Tim Tim - If you could educate me on an aspect of this, I'd hugely appreciate it... What part of the standard set of calls for making a JDBC connection is the part that sets up the connection? Normally, all the tutorial stuff shows something like (assuming the Tomcat JNDI stuff is set up in context.xml): Get a context Get a datasource Get a connection Make the statements Close resultsets Close statements Close connection Is there a part of this that takes a lot of time? Part of what I need to do is handle database calls in a couple of different places (at least in the current design, which I'm the first to admin is likely not optimal). So that means figuring out how to get at the database in an effective manner as far as performance goes. I've seen a number of references to setting up a connection takes a long time - I'm not sure which of the calls is the part that takes a long time. Thanks... Warrick - 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: Setting up connection pools on the fly...
Got it. If you only need connections, you can write your own provider class which returns connections (or DataSources) based on a name-to-database mapping of your chosing. Or, if you really must provide each connection as a JNDI DataSource, I would investigate writing your own JNDI provider that operates on the single, manual connection, and returns DataSources based on the information found via that connection. You can borrow some code from javaranch.com's jrunittesthelper, a package which provides JNDI lookups for JUnit test cases. Tim -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 4:28 AM To: Tomcat Users List Subject: RE: Setting up connection pools on the fly... Hi Tim, Thanks for the assistance. Our basic requirement is during tomcat load/start-up to query the database (with a single manual connection) and read the available database environments that have been pre-configured. Then create these dynamically so they are available as if they had been configured within conf/../context.xml etc. I managed to get this kind of working buy rewriting the config details during start-up but it seems at this time it's too late for Tomcat to use these (i.e. the connection pools are already set up). They would become available the next time tomcat was restarted... I then tried adding the config files as a 'watched' resource but this lead to some strange behaviour. While in most cases we don't change servers as such - we do provide our own tools to manage the database details such as username, password etc and these need to updated without modifying the config files directly. Hopes this clarifies the problem a little (shout if you need further or alternative explanations). Thanks again for your help. Rob -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: 22 January 2006 23:42 To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... How often do you change servers? What you describe below can be handled by editing the appropriate context / resource and restarting Tomcat. Perhaps more detail on the business requirement, rather then stating I must define them on the fly would enable us to give you a better solution. -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 5:41 PM To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... One doesn't typically add new database servers on the fly, and this option would require defining a new JNDI datasource for a new server That's exactly what I need to be able to do... Is this possible on Tomcat start-up as it doesn't have to strictly on the fly just on start-up. I mainly need to remove the configuration details from the context.xml file and read these from the database before tomcat starts and creates the pools. Any help much appreciated. Rob -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: 22 January 2006 14:21 To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... The point of connection pooling is to eliminate the overhead of setting up and tearing down a (TCP, database, AAA) connection for every database transaction (typically, the web request in a web app.) This can add 100s or 1000s of milliseconds to every request, and is quite expensive. If you can architect your application so that there is a JNDI data source for each server (database server, instance, etc.) with its own pool of connections, you can always call setCatalog (http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#setCat alog (java.lang.String)) on the connection returned from the pool. One doesn't typically add new database servers on the fly, and this option would require defining a new JNDI datasource for a new server. Of course all catalogs processed in this way must be accesible to the user specified in the connnection pool properties. I would suggest setting the defaultCatalog property as well, so that you are not accidentally connected to the last-used catalog from the previous borrower of the connection. Tim -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 8:23 AM To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... I also have the same requirement (to provide connection pools on the fly) but also need these pools available to Cocoon (so need them to map to the standard jdbc/mypool jndi location. Tomcat declares it's initial context as being readonly so I have no idea how to go about binding the pools I have created dynamically. Any pointers would be a great help. Thanks in advance Rob -Original Message- From: Alex Turner [mailto:[EMAIL PROTECTED] Sent: 20 January 2006 22:50 To: Tomcat Users List Subject: Re: Setting up connection pools on the fly... Maybe you don't even want a connection pool, rather a simple non-pooling
Is this a tomcat problem - jive no longer works?
Well I copied my jive webapp folder across - plus my jiveHome folder complete with license - exported the mysql database and reimported it to the latest version - when I go to the admin signon I get the following. Jive Forums 2.5.4 Admin Error --- - java.lang.NullPointerException at java.lang.Object.getClass() (/usr/lib/libgcj.so.6.0.0) at com.jivesoftware.forum.database.DbAuthorizationFactory.createAuthorization(java .lang.String, java.lang.String) (Unknown Source) at com.jivesoftware.forum.AuthorizationFactory.getAuthorization(java.lang.String, java.lang.String) (Unknown Source) at org.apache.jsp.admin.login_jsp._jspService(javax.servlet.http.HttpServletReques t, javax.servlet.http.HttpServletResponse) (Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletReq uest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-runtime-5.0.30.jar.so) at javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so) at org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) at org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) at org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) at javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet. ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletR equest, javax.servlet.ServletResponse) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Reques t, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardValveContext.invokeNext(org.apache.catalina.Re quest, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardContextValve.invokeInternal(org.apache.catalin a.Wrapper, org.apache.catalina.Request, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Reques t, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardValveContext.invokeNext(org.apache.catalina.Re quest, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardValveContext.invokeNext(org.apache.catalina.Re quest, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardValveContext.invokeNext(org.apache.catalina.Re quest, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.Request , org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardValveContext.invokeNext(org.apache.catalina.Re quest, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) (/usr/lib/libcatalina-5.0.30.jar.so) at org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response)
Re: multihoming examplified
I've generally found that I only need one Host element in the server.xml file. The Magic is in the Catalina/hostname/ROOT.xml file. Here's whats in my tomcat/conf/Catalina/localhost/ directory: ?xml version='1.0' encoding='utf-8'? Context docBase=/Users/kurt/sandboxes/myapp/webapp path= reloadable=true Parameter name=serv1 value=custom1 override=true/ /Context (you don't need that Parameter line- thats a custom parameter for my application) so if you put a directory in Catalina like: Catalina/www.myhost.com/ROOT.xml ...and made that ROOT.xml look like: ?xml version='1.0' encoding='utf-8'? Context docBase=/Users/kurt/sandboxes/myapp/webapp path= reloadable=true/ ...it would most likely work. I've also put Alias directives into the Host section of my server.xml like this: Host name=localhost appbase=/Users/kurt/sandboxes/myapp/webapp Aliaswww.blah.com/Alias /Host ...requests to www.blah.com will also get sent to that localhost context. I'm not sure if this is the 'proper' way to do it, but it seems to work just fine. I'm also using 5.0.27. Hope this helped! /kurt Morten Andersen wrote: How do I set up tomcat to run several webapps each serving requests for their respective domains? I've figured that I can create a Host element in the server.xml, but the Tomcat documentation doesn't really help me much more. It mentions the option to add files in the conf/[Engine]/[Appname] folder, but what should the file name be and how should it be structured? Please provide a few explained examples. Morten Tomcat version: 5.0.28 PS: More examples in documentation please. It's easier to write and understand. - 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]
How to diagnose a TomCat hang?
Thanks to Tim Lucia I found the solution to my problem. In case any one else gets this problem here's the answer. Problem Briefly: Is there anyway to figure out what TomCat is doing, or trying to do, when it hangs and does not respond to any http or https request? Problem Details: I am running Tomcat 5.1.12 on Redhat9 on a 4 processor server. I get frequent but random Tomcat hangs. It has not happened on a 1 processor system, with either Linux or Windows. I can force the hang to happen fairly reliably if I run tests to bombard the server with http requests (several per second). According to logs it happens after the end of processing one request and before the beginning the next. It is apparently not within application code, unless it's a finalizer. I have run a higher priority daemon thread in same JVM that just writes the time to a log file, and it hangs at the same time, so it could be the JVM that's hanging, or whatever does the real threading. Mostly, but not always, 'top' shows the 'java' process using 99.9% of CPU, and 2 of the 4 processors at about 40%. I can kill the java process with 'kill -9', but I can't figure what it was stuck doing. Any suggestions? Answer: The linux command 'kill -QUIT pid' dumps the state of the JVM to catalina.out which shows, for example, where you are in your code if it is in an infinite loop or a wait-deadlock. kill -QUIT does not actually stop Tomcat. (You find the pid of tomcat to use in 'kill -QUIT pid' using the command 'ps -ef | grep java' which gives output like this: root 30625 1 0 Jan22 ?00:10:00 /pgm/java/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLo gManager -Djava.util.logging.config.file=/data/tomcat/conf/logging.propertie s -Djava.endorsed.dirs=/pgm/tomcat/common/endorsed -classpath :/pgm/tomcat/bin/bootstrap.jar:/pgm/tomcat/bin/commons-logging-api.jar -Dcat alina.base=/data/tomcat -Dcatalina.home=/pgm/tomcat -Djava.io.tmpdir=/data/t omcat/temp org.apache.catalina.startup.Bootstrap start root 11354 11056 0 08:30 pts/100:00:00 grep java The pid is 30625 in this case - so the command is 'kill -QUIT 30625' ) If kill -QUIT does not write stuff to catalina.out, the JVM is hung. This was my problem, and the cause was a kernel SMP threading bug. I switched from Redhat 9 (2.4.20 kernel) to Fedora Core 4 (2.6.11-1.1369_FC4smp kernel) and have now run for 48 hours without a hang. Changing LD_ASSUME_KERNEL also made a difference. See the tomcat release notes ... #GLIBC 2.2 / Linux 2.4 users should define an environment variable: #export LD_ASSUME_KERNEL=2.2.5 # #Redhat Linux 9.0 users should use the following setting to avoid #stability problems: #export LD_ASSUME_KERNEL=2.4.1 On Redhat 9 running on the 4-way SMP, LD_ASSUME_KERNEL=2.2.5, or nothing at all seemed to be more stable than the recommended LD_ASSUME_KERNEL=2.4.1. I am current running Fedora Core 4 with LD_ASSUME_KERNEL=2.2.5 and it seems to be stable. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with tomcat 5.5.9
Hi, We observed that tomcat's memory footprint (not the heap size) keeps increasing if we run it for a long time under constant load. Initially it was 305 MB, but after running it for 12 hours continuously, it increased to 1153 MB. We are running the server on Red Hat Linux AS 3.0. We are using Tomcat version: 5.5.9 and we checked that the application is not the cause for memory leak (checked with Jprobe Profiler). Is this a known problem? Any solutions? Thanks in advance, Regards, Rajesh Gannarapu The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
Re: writing files with a web application
Peter Crowther wrote: From: SOA Work [mailto:[EMAIL PROTECTED] Check the Servlet Spec (version 2.4 is at http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) for questions of this kind. From memory in both cases (so treat with caution): 1.) am I allowed to call main methods or programms in my web applicatio? If you wish to be spec-compliant, no. However, it should work depending on Tomcat's security settings. Really? I thought you could do anything within a Servlet that you can do within normal Java code. Also, a restriction on calling the main() method within a class seems nonsensical, because one can simply rename that method. 2.) am I allowed to write files on the disk from within an web application? If I am, something went wrong while trieing ;-) Can i write anywhere or have I to write to my application dir or to temp dir or something. If you wish to be spec-compliant, you can only write to a temporary directory that you ask the context for. However, this may or may not be enforced depending on Tomcat's security settings. This point I'm less sure on, but I would think it's the role of the *servlet container* to be spec-compliant, not the programmer of a servlet. But FWIW, the Tomcat Administration Web Application (separate download in 5.5.x[1]) does alter the XML files located in the Tomcat /conf directory. If the original questioner is having problems altering text files located on the server, perhaps the code for the Admin application would be a good reference for him. Glen [1] http://tomcat.apache.org/download-55.cgi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manually setting up Tomcat5.0 as service on Windows server 2003 : some questions
ZedroS Schwart wrote: Hi I'm trying to manually setting up Tomcat5.0 as a service on a Windows Server 2003. May I ask why you need to manually set it up? You can download the Windows Executable version of TC[1] and choose install as a service when prompted. Glen [1] http://tomcat.apache.org/download-55.cgi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: blank admin
kalin mintchev escribió: hi all... i realize this is probably a retarded question but it is a retarded problem too... new installation of tomcat 5.0.30 with jdk 1.4.2. when i go to http://myserver:8080 and login as manager - no problems there. But doesn't http://myserver:8080 just take you to the Congratulations! You've successfully installed Tomcat! home page? (There's nothing to log into there.) It would probably be best to state the exact URLs you are using in the good and bad cases here. but if i go to the admin directory i get a blank page. the admin directory under server/webapps has exactly the same permissions as manager and here is my tomcat-users.xml: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=manager/ role rolename=admin/ user username=manager password=very-secret roles=manager/ user username=admin password=bigger-secret roles=admin,manager/ /tomcat-users this is probably normal but i would like to mention that even if i change the order if the elements in the tomcat-users and put admin first after restarting the server they get switched back in this order... I sense tomcat-users.xml may not be your problem--it seems something URL-related to me. Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] ParallelGCThreads more than cpu count
From: Andri Herumurti [mailto:[EMAIL PROTECTED] Subject: ParallelGCThreads more than cpu count it is possible to setting XX:ParallelGCThreads over than CPU count? Yes, you get the number of GC threads you asked for. They contend for the CPUs, just as all the other threads in your system do. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: (newb) Tomcat servlet mapping problem
Not sure if your first sentence meant you found the problem, but just to make sure it's clear, the current Servlet Spec does require that servlet classes be in a package. - Chuck Doh! That's not good. Could that be the cause of the ClassDefNotFound error I'm getting? I've inherited this code, and we will be designing a new site, and I *will* be using packages - but that doesn't change the current situation, which is, I need to keep the existing site running while the new site is being developed. I need to find out how to get the old code deployed on tomcat 5.0 and get the servlet mappings working properly so that we no longer need to use the invoker servlet to keep the site functioning. Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 9:19 PM To: Tomcat Users List Subject: RE: (newb) Tomcat servlet mapping problem From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem I have. The servlets I am trying to deploy (err, map?) do not have a package associated with them. Not sure if your first sentence meant you found the problem, but just to make sure it's clear, the current Servlet Spec does require that servlet classes be in a package. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version.
From: Gema Berdasco [mailto:[EMAIL PROTECTED] Subject: Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version. we use the following entry on the context.xml file of the webapp: Context docBase=/path/to/resources path=/contents Resources className=org.apache.naming.resources.FileDirContext/ /Context You don't explicitly say where your Context element is, but the implication is that it's inside a file named context.xml in your webapp's META-INF directory. If that is the case, both the path and docBase attributes are ignored. See: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Look at the descriptions for the two attributes in question. The docBase attribute is intended to provide the location of the webapp, not a link to external resources. Tomcat versions after 5.5.9 seem to have tightened up enforcement of the configuration rules. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving up a non-JSP file
Bill Barker wrote: The APR connector is still a bit buggy in 5.5.12. I suggest either upgrading to 5.5.15, or disabling the APR connector. I don't know the TC source, but the stacktrace appears to show that the bug is within the Catalina code--this has happened to someone else[1] with a JAR file. If 5.5.15 doesn't fix the problem, I would look at the checkSendfile() below which appears to be calling this non-existent method. Glen [1] http://forum.java.sun.com/thread.jspa?threadID=681043messageID=3970179 Dola Woolfe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a file sound.wav sitting alongside my .jsp files and when I point the browser to that file, I get the error below. This has just started happening - I don't know what I changed. Previously, it would just serve up the file. In any case, here's the error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.naming.resources.ResourceAttributes.getCanonicalPath()Ljava/lang/String; org.apache.catalina.servlets.DefaultServlet.checkSendfile(DefaultServlet.java:1521) org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:839) org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:348) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs. __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: (newb) Tomcat servlet mapping problem
From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? Not that I'm aware of, since the application code is in violation of the spec. Others with more experience may know some tricks. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: writing files with a web application
Peter Crowther wrote: From: SOA Work [mailto:[EMAIL PROTECTED] Check the Servlet Spec (version 2.4 is at http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) for questions of this kind. From memory in both cases (so treat with caution): 1.) am I allowed to call main methods or programms in my web applicatio? If you wish to be spec-compliant, no. However, it should work depending on Tomcat's security settings. 2.) am I allowed to write files on the disk from within an web application? If I am, something went wrong while trieing ;-) Can i write anywhere or have I to write to my application dir or to temp dir or something. If you wish to be spec-compliant, you can only write to a temporary directory that you ask the context for. However, this may or may not be enforced depending on Tomcat's security settings. I couldn't find any hint that either action would violate the spec. If I simply missed the relevant parts, could you please point me in the right direction? Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Pool Woes
Its poor practise to have a sql: jstl tag in production ready code. How do you deal with this when using pure JSTL sql calls using a connection? How does JSTL sql library release the connection at the end of a page to ensure that connections don't get leaked? For reasons exactly like this. __ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] problem with tomcat 5.5.9
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: problem with tomcat 5.5.9 We observed that tomcat's memory footprint (not the heap size) keeps increasing if we run it for a long time under constant load. Initially it was 305 MB, but after running it for 12 hours continuously, it increased to 1153 MB. We are running the server on Red Hat Linux AS 3.0. This is expected behavior of any Java program, and can be controlled by command line options. Please read up on the functioning of the JVM heap and garbage collection. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Pool Woes
You should use JNDI with your connection pool to ensure that connections are being managed appropriately. - Asad On Mon, 23 Jan 2006, Chris McCormack wrote: Its poor practise to have a sql: jstl tag in production ready code. How do you deal with this when using pure JSTL sql calls using a connection? How does JSTL sql library release the connection at the end of a page to ensure that connections don't get leaked? For reasons exactly like this. __ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.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]
Tomcat 5.0.5 threads + log4j Mapped Diagnostic Contexts. Simultaneous clients access problem.
Hi folks, here is a description of the current situation we have releasing the logging component. Prehistory: Using the log4j mapped diagnostic context dump the application specific information into the log files. Details: http://logging.apache.org/log4j/docs/api/org/apache/log4j/MDC.html The log4j documentation has a primary statement that is accordingly the basis for the MDC/NDC approach: In a typical multithreaded implementation of such a system, different threads will handle different clients. History: As the test environment apache 2.0.49 and tomcat 5.0.25 under windows 2000 professional were used. The tests showed that two clients not necessarily become the different threads. Quite often the thread, taken by the client A is shared later with the client B and afterwards is used again by the client A. Questions: I`m wondering how it is at all possible, does it mean that tomcat has somewhere the pool of the actual HttpSessions and they are not associated with the corresponding threads or even worth it makes the session serialization and gives another client the control over the thread? Due to my tomcat configuration I do not see any restrictions on the thread pool, in many times the client even opens the several threads and this is understandable. The non-understandable is the thread sharing between several clients and valid HttpSessions. I believe it is pure tomcat issue, that’s why stated the question here. The ideas and suggestions are highly appreciated, Yefym.
Related to msg unprotected data transfer on ssl port
I forgot at that time, what I did to tomcat. but it was true. SSL connector is defined on 8443 for my tomcat 5.5.12. https://localhost:8443/ no response for long time, however, http://localhost:8443/ I got everything, same as http://localhost/ It seems that at that time, I still don't know the native code for windows causes the no response for long time problem. After i delete native.dll. it becomes normal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manually setting up Tomcat5.0 as service on Windows server 2003 : some questions
Wouldn't you find it easier to just install Tomcat with the 'run as a service' option? Then all you have to do is change the service that is created for you to run as a secure user and you're done. -marc --- ZedroS Schwart [EMAIL PROTECTED] wrote: Hi I'm trying to manually setting up Tomcat5.0 as a service on a Windows Server 2003. I've already set up my JAVA_HOME and CATALINA_HOME variables, as well as updated the PATH with : %JAVA_HOME%;%JAVA_HOME%\jre\bin\client;. My questions are : - should the service launch the startup.bat ? If so, what about the console output ? Would it be better for the service to launch a shortcut (this shortcut would link to startup.bat and redirect the console output) ? - on the server shutdown, would it matter that the shutdown.bat is not launched ? - do I have to do something more that the points above ? Thanks in advance ! Cheers, ZedroS __ 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: (newb) Tomcat servlet mapping problem
On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote: From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? Not that I'm aware of, since the application code is in violation of the spec. Others with more experience may know some tricks. - Chuck Well, that really stinks. That means I have either a big code change ahead of me, or we need to continue using the invoker servlet for now. Thanks for your help, Chuck. If anyone knows a way that I can map a servlet that is not in a package through the web.xml, please let me know. Thanks Darren As far as I can see, it just works. Whether it's correct or not, it does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So this is probably not the cause of your problem. Try putting one servlet in a package to see if that makes a difference, before you try to change them all. Here's a servlet declaration that I just tested: servlet servlet-nameTest/servlet-name servlet-classTest/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping -- Len - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (newb) Tomcat servlet mapping problem
Hi, sorry for my question, but I'm googling, reading manuals and still no answer... So. The question si very simple: How can I ommit the servlet name in the URL? Ex.: I have http://localhost:8080/ServletTest/path_in_the_servlet_and arguments and I need http://localhost:8080/path_in_the_servlet_and arguments I will run under Tomcat only one servlet; and I want to handle all the domain. To override DefaultServlet is, I think, not so good solution, isn't it? Thank you very much for your tips. PETR On 1/23/06, Len Popp [EMAIL PROTECTED] wrote: On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote: From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? Not that I'm aware of, since the application code is in violation of the spec. Others with more experience may know some tricks. - Chuck Well, that really stinks. That means I have either a big code change ahead of me, or we need to continue using the invoker servlet for now. Thanks for your help, Chuck. If anyone knows a way that I can map a servlet that is not in a package through the web.xml, please let me know. Thanks Darren As far as I can see, it just works. Whether it's correct or not, it does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So this is probably not the cause of your problem. Try putting one servlet in a package to see if that makes a difference, before you try to change them all. Here's a servlet declaration that I just tested: servlet servlet-nameTest/servlet-name servlet-classTest/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping -- Len - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (newb) Tomcat servlet mapping problem
Hi, sorry for my question, but I'm googling, reading manuals and still no answer... So. The question si very simple: How can I ommit the servlet name in the URL? Ex.: I have http://localhost:8080/ServletTest/path_in_the_servlet_and arguments and I need http://localhost:8080/path_in_the_servlet_and arguments I will run under Tomcat only one servlet; and I want to handle all the domain. To override DefaultServlet is, I think, not so good solution, isn't it? Thank you very much for your tips. PETR On 1/23/06, Petr Hadraba [EMAIL PROTECTED] wrote: Hi, sorry for my question, but I'm googling, reading manuals and still no answer... So. The question si very simple: How can I ommit the servlet name in the URL? Ex.: I have http://localhost:8080/ServletTest/path_in_the_servlet_and arguments and I need http://localhost:8080/path_in_the_servlet_and arguments I will run under Tomcat only one servlet; and I want to handle all the domain. To override DefaultServlet is, I think, not so good solution, isn't it? Thank you very much for your tips. PETR On 1/23/06, Len Popp [EMAIL PROTECTED] wrote: On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote: From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? Not that I'm aware of, since the application code is in violation of the spec. Others with more experience may know some tricks. - Chuck Well, that really stinks. That means I have either a big code change ahead of me, or we need to continue using the invoker servlet for now. Thanks for your help, Chuck. If anyone knows a way that I can map a servlet that is not in a package through the web.xml, please let me know. Thanks Darren As far as I can see, it just works. Whether it's correct or not, it does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So this is probably not the cause of your problem. Try putting one servlet in a package to see if that makes a difference, before you try to change them all. Here's a servlet declaration that I just tested: servlet servlet-nameTest/servlet-name servlet-classTest/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping -- Len - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Capturing JNI DLL printf()s to Tomcat logfile
Hi All, I want to be able to capture the printf()s in my JNI DLL to a logfile in Tomcat. I'm using jakarta-tomcat-5.5.9 and Java 1.5 on Windows XP. I'd rather use something that's built-into Tomcat.. Commons Logging or the JDK logging. Something simple if there is such a thing.. If I have to go with Log4j to do it, that's okay. There HAS to be some kind of way to do this.. :-\ Thanks, Joe Siebenmann __ 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: problem with tomcat 5.5.9
[EMAIL PROTECTED] wrote: We observed that tomcat's memory footprint (not the heap size) keeps increasing if we run it for a long time under constant load. Initially it was 305 MB, but after running it for 12 hours continuously, it increased to 1153 MB. We are running the server on Red Hat Linux AS 3.0. We are using Tomcat version: 5.5.9 and we checked that the application is not the cause for memory leak (checked with Jprobe Profiler). Did the profiler indicate any memory leak? If so where was it? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk with httpd tomcat
I am trying to get mod_jk to work with apache 2.0.55 and get this error on the load module: Syntax error on line 276 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_jk.so into server: ld.so.1: /usr/local/apache2/bin/httpd: fatal: relocation error: file /usr/local/apache2/modules/mod_jk.so: symbol ap_null_cleanup: referenced symbol not found I have looked everywhere, and have been advised to recompile apache, which I have done successfully a few times. This is how I have recompiled: ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-so --enable-rule=SHARED_CORE make make install I use make clean between attempts..Ihave tried withou the SHARED_CORE and without the --enable-so because --enable-mods-shared=all should cover that. Still no luck. I am using Solaris 9. Here is some diag info: [EMAIL PROTECTED]:/usr/local/apache2/bin # ldd -d /usr/local/apache2/modules/mod_jk.so libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 symbol not found: ap_server_root (/usr/local/apache2/modules/mod_jk.so) symbol not found: ap_null_cleanup (/usr/local/apache2/modules/mod_jk.so) symbol not found: dir_module (/usr/local/apache2/modules/mod_jk.so) /usr/platform/SUNW,Serverblade1/lib/libc_psr.so.1 [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -V Server version: Apache/2.0.55 Server built: Jan 23 2006 13:17:34 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/local/apache2 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec -D DEFAULT_PIDLOG=logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=logs/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -v Server version: Apache/2.0.55 Server built: Jan 23 2006 13:17:34 Please advise as to what info would be helpful in determining the root cause. Thanks for your help, Greg - What are the most popular cars? Find out at Yahoo! Autos
RE: (newb) Tomcat servlet mapping problem
On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote: From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? As far as I can see, it just works. Whether it's correct or not, it does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So this is probably not the cause of your problem. Try putting one servlet in a package to see if that makes a difference, before you try to change them all. Here's a servlet declaration that I just tested: servlet servlet-nameTest/servlet-name servlet-classTest/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping -- Len ok, the start of this thread got lost... let me try and do a brief refresher... I'm working with Tomcat 5.0, Apache 2, and a whole bunch of servlets that I inherited. The website is a combination of static HTML and java. 95% of the java code is implemented in servlets (that write out the dynamic HTML) and NONE of the Java code is in packages. The HTML on the site, when referring to servlets, uses relative paths like form action=../servlet/servlet-name. In order to remove the invoker servlet, I need to map all the servlets on the site through a web.xml file. Initially, I was getting a resource unavailable error from Tomcat, but it now appears as if my servlet mapping was wrong. (my app lived in the ${catalina.home}/webapp/servlet directory, and my web.xml was mapping a servlet to url-mapping/servlet/[servlet-name]/url-mapping. I fixed this by removing the '/servlet' in the url-mapping tag, and I now get a stack trace with a ClassDefNotFound [servlet-name] error. This error occurs when I point at Tomcat directly, so I know the error has nothing to do with Apache. I now have a stripped down web.xml file that looks like this (minus the xml and DOCTYPE directives): ... web-app servlet servlet-nameFLCUpEvDisplayServlet/servlet-name servlet-classFLCUpEvDisplayServlet/servlet-class /servlet servlet-mapping servlet-nameFLCUpEvDisplayServlet/servlet-name url-pattern/FLCUpEvDisplayServlet/url-pattern /servlet-mapping /web-app Now everytime I hit the servlet, I get the ClassDefNotFound error, and after that I see an entry in the log file: 2006-01-23 11:35:53 StandardContext[/servlet]Marking servlet FLCUpEvDisplayServlet as unavailable 2006-01-23 11:35:53 StandardContext[/servlet]Error loading WebappClassLoader delegate: false repositories: /WEB-INF/classes/ after which I get a resource is not available error again, until I stop and restart Tomcat. So, my question is... why am I getting the ClassDefNotFound error, and how do I correct it (or can I, given my current configuration)? Thanks Darren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with httpd tomcat
I had the same problem a while back. I had to do some googling and find the mod_jk source. Trying to compile it was problematic and I also got the unresolved errors I had to rebuild apache with jk as part of the build in order to get it to work. I wish I could remember where I got the source and the instructions, but I am old and forget easily (actually age has nothing to do with italways been like that) I appologize, especially since I spent many hours trying this and that and I know what you are going through I do remember, that the proceedure was different with apache 2.x than it was with 1.3x that I have installed. Greg Bobak wrote: I am using Tomcat 5.0.28 BTW. G. Greg Bobak [EMAIL PROTECTED] wrote: I am trying to get mod_jk to work with apache 2.0.55 and get this error on the load module: Syntax error on line 276 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_jk.so into server: ld.so.1: /usr/local/apache2/bin/httpd: fatal: relocation error: file /usr/local/apache2/modules/mod_jk.so: symbol ap_null_cleanup: referenced symbol not found I have looked everywhere, and have been advised to recompile apache, which I have done successfully a few times. This is how I have recompiled: ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-so --enable-rule=SHARED_CORE make make install I use make clean between attempts..Ihave tried withou the SHARED_CORE and without the --enable-so because --enable-mods-shared=all should cover that. Still no luck. I am using Solaris 9. Here is some diag info: [EMAIL PROTECTED]:/usr/local/apache2/bin # ldd -d /usr/local/apache2/modules/mod_jk.so libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 symbol not found: ap_server_root (/usr/local/apache2/modules/mod_jk.so) symbol not found: ap_null_cleanup (/usr/local/apache2/modules/mod_jk.so) symbol not found: dir_module (/usr/local/apache2/modules/mod_jk.so) /usr/platform/SUNW,Serverblade1/lib/libc_psr.so.1 [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -V Server version: Apache/2.0.55 Server built: Jan 23 2006 13:17:34 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/local/apache2 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec -D DEFAULT_PIDLOG=logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=logs/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -v Server version: Apache/2.0.55 Server built: Jan 23 2006 13:17:34 Please advise as to what info would be helpful in determining the root cause. Thanks for your help, Greg - What are the most popular cars? Find out at Yahoo! Autos - What are the most popular cars? Find out at Yahoo! Autos -- Mike Sabroff Web Services Developer [EMAIL PROTECTED] 920-568-8379 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: (newb) Tomcat servlet mapping problem
As an add-on - I successfully mapped the Tomcat servlet example HelloWorldServlet to my /servlet directory successfully through my web.xml file. I did this to make sure that a servlet with no package could be deployed the way I am attempting (HelloWorldExample has no package). The ONLY error I encountered while deploying the HelloWorldExample, was it complained that the ResourceBundle the code was looking for couldn't be found. I recompiled the servlet without the ResourceBundle code and the servlet worked correctly. (I wasn't sure how to configure the ResourceBundle in the code. I copied all the files the resource bundle seemed to be referring to into my /servlet directory along with the compiled HelloWorldServlet code, but it still complained on execution that it couldn't locate the resource, so it was easier for me to comment it out.) This tells me I can definitely deploy a servlet the way I am trying to, but it also raises questions about why the resource bundle couldn't be located. Is all of this really a classpath or class loader issue in some way? -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 2:46 PM To: 'Tomcat Users List' Subject: RE: (newb) Tomcat servlet mapping problem On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote: From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem Is there a way I can map these servlets (in the web.xml file) so that Tomcat can see them and execute them? As far as I can see, it just works. Whether it's correct or not, it does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So this is probably not the cause of your problem. Try putting one servlet in a package to see if that makes a difference, before you try to change them all. Here's a servlet declaration that I just tested: servlet servlet-nameTest/servlet-name servlet-classTest/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping -- Len ok, the start of this thread got lost... let me try and do a brief refresher... I'm working with Tomcat 5.0, Apache 2, and a whole bunch of servlets that I inherited. The website is a combination of static HTML and java. 95% of the java code is implemented in servlets (that write out the dynamic HTML) and NONE of the Java code is in packages. The HTML on the site, when referring to servlets, uses relative paths like form action=../servlet/servlet-name. In order to remove the invoker servlet, I need to map all the servlets on the site through a web.xml file. Initially, I was getting a resource unavailable error from Tomcat, but it now appears as if my servlet mapping was wrong. (my app lived in the ${catalina.home}/webapp/servlet directory, and my web.xml was mapping a servlet to url-mapping/servlet/[servlet-name]/url-mapping. I fixed this by removing the '/servlet' in the url-mapping tag, and I now get a stack trace with a ClassDefNotFound [servlet-name] error. This error occurs when I point at Tomcat directly, so I know the error has nothing to do with Apache. I now have a stripped down web.xml file that looks like this (minus the xml and DOCTYPE directives): ... web-app servlet servlet-nameFLCUpEvDisplayServlet/servlet-name servlet-classFLCUpEvDisplayServlet/servlet-class /servlet servlet-mapping servlet-nameFLCUpEvDisplayServlet/servlet-name url-pattern/FLCUpEvDisplayServlet/url-pattern /servlet-mapping /web-app Now everytime I hit the servlet, I get the ClassDefNotFound error, and after that I see an entry in the log file: 2006-01-23 11:35:53 StandardContext[/servlet]Marking servlet FLCUpEvDisplayServlet as unavailable 2006-01-23 11:35:53 StandardContext[/servlet]Error loading WebappClassLoader delegate: false repositories: /WEB-INF/classes/ after which I get a resource is not available error again, until I stop and restart Tomcat. So, my question is... why am I getting the ClassDefNotFound error, and how do I correct it (or can I, given my current configuration)? Thanks Darren - 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: (newb) Tomcat servlet mapping problem
From: Darren Hall [mailto:[EMAIL PROTECTED] Subject: RE: (newb) Tomcat servlet mapping problem So, my question is... why am I getting the ClassDefNotFound error, and how do I correct it (or can I, given my current configuration)? Simplistic packageless servlets may well work, but real ones without packages have caused grief for several people on this list. Take a look at: http://tomcat.apache.org/faq/classnotfound.html for more details. Until that potential source of class loading confusion is removed, it may be difficult to resolve any other issues you may be encountering. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with httpd tomcat
Hi, Thansk for the reply. I think I had found some documentation about rebuild Apache with mod_jk bound. I'll have to look again. I've been trying to rebuild mod_jk (to no avail) in hopes that would work, but keep getting this error: could not find /usr/local/apache2/bin/apxs configure: error: You must specify a valid --with-apxs path Of course it is the right path. G. Mike Sabroff [EMAIL PROTECTED] wrote: I had the same problem a while back. I had to do some googling and find the mod_jk source. Trying to compile it was problematic and I also got the unresolved errors I had to rebuild apache with jk as part of the build in order to get it to work. I wish I could remember where I got the source and the instructions, but I am old and forget easily (actually age has nothing to do with italways been like that) I appologize, especially since I spent many hours trying this and that and I know what you are going through I do remember, that the proceedure was different with apache 2.x than it was with 1.3x that I have installed. Greg Bobak wrote: I am using Tomcat 5.0.28 BTW. G. Greg Bobak wrote: I am trying to get mod_jk to work with apache 2.0.55 and get this error on the load module: Syntax error on line 276 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_jk.so into server: ld.so.1: /usr/local/apache2/bin/httpd: fatal: relocation error: file /usr/local/apache2/modules/mod_jk.so: symbol ap_null_cleanup: referenced symbol not found I have looked everywhere, and have been advised to recompile apache, which I have done successfully a few times. This is how I have recompiled: ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-so --enable-rule=SHARED_CORE make make install I use make clean between attempts..Ihave tried withou the SHARED_CORE and without the --enable-so because --enable-mods-shared=all should cover that. Still no luck. I am using Solaris 9. Here is some diag info: [EMAIL PROTECTED]:/usr/local/apache2/bin # ldd -d /usr/local/apache2/modules/mod_jk.so libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 symbol not found: ap_server_root (/usr/local/apache2/modules/mod_jk.so) symbol not found: ap_null_cleanup (/usr/local/apache2/modules/mod_jk.so) symbol not found: dir_module (/usr/local/apache2/modules/mod_jk.so) /usr/platform/SUNW,Serverblade1/lib/libc_psr.so.1 [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -V Server version: Apache/2.0.55 Server built: Jan 23 2006 13:17:34 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/local/apache2 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec -D DEFAULT_PIDLOG=logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=logs/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -v Server version: Apache/2.0.55 Server built: Jan 23 2006 13:17:34 Please advise as to what info would be helpful in determining the root cause. Thanks for your help, Greg - What are the most popular cars? Find out at Yahoo! Autos - What are the most popular cars? Find out at Yahoo! Autos -- Mike Sabroff Web Services Developer [EMAIL PROTECTED] 920-568-8379 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
Re: blank admin
kalin mintchev escribió: hi all... i realize this is probably a retarded question but it is a retarded problem too... new installation of tomcat 5.0.30 with jdk 1.4.2. when i go to http://myserver:8080 and login as manager - no problems there. But doesn't http://myserver:8080 just take you to the Congratulations! You've successfully installed Tomcat! home page? yes it does. there are 3 links on the top left side under Administration: Status Tomcat Administration Tomcat Manager clicking Tomcat Administration takes me to http://myserver:8080/admin/ and i just get a blank page whereas if i go to http://myserver:8080/manager/html i enter the manager user/password and it works fine. i tried http://myserver:8080/admin/html but i get 404. but if i go to the admin directory i get a blank page. the admin directory under server/webapps has exactly the same permissions as manager and here is my tomcat-users.xml: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=manager/ role rolename=admin/ user username=manager password=very-secret roles=manager/ user username=admin password=bigger-secret roles=admin,manager/ /tomcat-users this is probably normal but i would like to mention that even if i change the order if the elements in the tomcat-users and put admin first after restarting the server they get switched back in this order... I sense tomcat-users.xml may not be your problem--it seems something URL-related to me. like how? thanks... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: blank admin
kalin mintchev wrote: tomcat-users.xml: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=manager/ role rolename=admin/ user username=manager password=very-secret roles=manager/ user username=admin password=bigger-secret roles=admin,manager/ /tomcat-users this is probably normal but i would like to mention that even if i change the order if the elements in the tomcat-users and put admin first after restarting the server they get switched back in this order... I sense tomcat-users.xml may not be your problem--it seems something URL-related to me. like how? It seems what you have in your tomcat-users.xml file is OK, although I would use try a different username instead of admin because it matches the role name. (I don't know if that is commonly done for Tomcat, however.) I use TC 5.5, where the Admin app is a separate download from the main distribution. FWIW, it works fine for me on 5.5, using a tomcat-users file very similar to yours. Sorry I can't help you much here I guess. Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (newb) Tomcat servlet mapping problem
url-pattern/simple-servlet/url-pattern should be url-pattern/simple-servlet/*/url-pattern Georg Sauer-Limbach wrote: Darren, if I look at your original configuration servlet-mapping servlet-nameSimpleServlet/servlet-name url-pattern/simple-servlet/url-pattern /servlet-mapping ---snip--- Context path=/simple-servlet docBase=SimpleServlet reloadable=true debug=99 then, if I am not overlooking something, the correct URL to invoke the servlet is http://localhost/simple-servlet/simple-servlet because the first simple-servlet is the Context path where the webapp resides, and the second simple-servlet is the URL for the servlet inside the webapp, like correctly configured in the webapp descriptor. Georg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mike Sabroff Web Services Developer [EMAIL PROTECTED] 920-568-8379 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I take a webapp temporarily out of service using mod_jk?
Hi I am running a JBoss cluster, using tomcat as the Servlet engine. Apache and mod_jk provide load-balancing of requests over the machines in the cluster I need to be able to replace all the URLs in the webapp with a Temporarily out of service page during maintenance, and I need to do this without making any permanent Apache configuration changes and without restarting Apache (Operations is very reluctant to restart Apache). Does anyone know a way to do this? I think there may be a way to use the controls on the mod_jk status page to redirect all requests for a webapp to a different URL ( the Route Redirect input) but this is probably wishful thinking - even if does allow me to redirect requests, it would probably apply to all the webapps in the cluster, which wouldn't meet the requirement. The status page teases me by listing all the JkMounts and JkUnmounts, but doesn't allow me to change them; adding a JkUnmount dynamically would be a good solution. Any Ideas? John * The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank you. *
RE: (newb) Tomcat servlet mapping problem
Georg, if I look at your original configuration servlet-mapping servlet-nameSimpleServlet/servlet-name url-pattern/simple-servlet/url-pattern /servlet-mapping ---snip--- Context path=/simple-servlet docBase=SimpleServlet reloadable=true debug=99 then, if I am not overlooking something, the correct URL to invoke the servlet is http://localhost/simple-servlet/simple-servlet because the first simple-servlet is the Context path where the webapp resides, and the second simple-servlet is the URL for the servlet inside the webapp, like correctly configured in the webapp descriptor. You are correct. I realized this yesterday while playing with this problem. I've since removed my servlet.xml file that contains the Context tag specifying the docBase and path. I've gotten over this hurdle and immediately gotten hung up on the next one. =P The only file I'm using for mapping the servlet now is the web.xml file in the ${catalina.home}/webapps/servlet/WEB-INF directory. The new issue is ClassDefNotFound that occurs when I point my browser at the servlet (see last message, because I'm not retyping that 'brief' recap again). Thanks, though. I do appreciate the help. Darren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I take a webapp temporarily out of service using mod_jk?
The problem with this solution is that the webapp really is out of service and unable to serve any pages - it's Apache that will have to serve the Out of service page; that's why I'm looking at mod_jk. Or were you thinking of an Apache filter, rather than a servlets filter? I don't know much about Apache filters Thanks - John -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 2:00 PM To: Tomcat Users List Cc: users@tomcat.apache.org Subject: Re: How can I take a webapp temporarily out of service using mod_jk? Hi John, A filter should do the trick for you. Have it interrogate some value somewhere (context value? static class? database?) and when it sees a particular value, redirect to your out of service page. Since your in a cluster, you have the problem of replicating this out of service flag to all the nodes... a database would be the obvious answer, but clearly that has performance implications. You may need some special URL in your app that sets the flag, properly secured of course, and make yourself a quick little page that fires it to all nodes. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Mon, January 23, 2006 4:56 pm, Prout John - jprout said: Hi I am running a JBoss cluster, using tomcat as the Servlet engine. Apache and mod_jk provide load-balancing of requests over the machines in the cluster I need to be able to replace all the URLs in the webapp with a Temporarily out of service page during maintenance, and I need to do this without making any permanent Apache configuration changes and without restarting Apache (Operations is very reluctant to restart Apache). Does anyone know a way to do this? I think there may be a way to use the controls on the mod_jk status page to redirect all requests for a webapp to a different URL ( the Route Redirect input) but this is probably wishful thinking - even if does allow me to redirect requests, it would probably apply to all the webapps in the cluster, which wouldn't meet the requirement. The status page teases me by listing all the JkMounts and JkUnmounts, but doesn't allow me to change them; adding a JkUnmount dynamically would be a good solution. Any Ideas? John * The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. 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]
RE: Setting up connection pools on the fly...
Cheers Tim, Not had a chance to look at your suggested code (will be doing so soon for further pointers) to be honest the question is looking more like one of JNDI rather than a connection pool/tomat/cocoon issue. Can anyone suggest a good JNDI user group (hopefully focused on both Tomcat and Cocoon as I need the final solution to be available to both) Thanks All for the pointers, I'm getting closer... Just wish I had someone at work more interested in the technology they use daily... Rob -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: 23 January 2006 12:57 To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... Got it. If you only need connections, you can write your own provider class which returns connections (or DataSources) based on a name-to-database mapping of your chosing. Or, if you really must provide each connection as a JNDI DataSource, I would investigate writing your own JNDI provider that operates on the single, manual connection, and returns DataSources based on the information found via that connection. You can borrow some code from javaranch.com's jrunittesthelper, a package which provides JNDI lookups for JUnit test cases. Tim -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 4:28 AM To: Tomcat Users List Subject: RE: Setting up connection pools on the fly... Hi Tim, Thanks for the assistance. Our basic requirement is during tomcat load/start-up to query the database (with a single manual connection) and read the available database environments that have been pre-configured. Then create these dynamically so they are available as if they had been configured within conf/../context.xml etc. I managed to get this kind of working buy rewriting the config details during start-up but it seems at this time it's too late for Tomcat to use these (i.e. the connection pools are already set up). They would become available the next time tomcat was restarted... I then tried adding the config files as a 'watched' resource but this lead to some strange behaviour. While in most cases we don't change servers as such - we do provide our own tools to manage the database details such as username, password etc and these need to updated without modifying the config files directly. Hopes this clarifies the problem a little (shout if you need further or alternative explanations). Thanks again for your help. Rob -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: 22 January 2006 23:42 To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... How often do you change servers? What you describe below can be handled by editing the appropriate context / resource and restarting Tomcat. Perhaps more detail on the business requirement, rather then stating I must define them on the fly would enable us to give you a better solution. -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 5:41 PM To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... One doesn't typically add new database servers on the fly, and this option would require defining a new JNDI datasource for a new server That's exactly what I need to be able to do... Is this possible on Tomcat start-up as it doesn't have to strictly on the fly just on start-up. I mainly need to remove the configuration details from the context.xml file and read these from the database before tomcat starts and creates the pools. Any help much appreciated. Rob -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: 22 January 2006 14:21 To: 'Tomcat Users List' Subject: RE: Setting up connection pools on the fly... The point of connection pooling is to eliminate the overhead of setting up and tearing down a (TCP, database, AAA) connection for every database transaction (typically, the web request in a web app.) This can add 100s or 1000s of milliseconds to every request, and is quite expensive. If you can architect your application so that there is a JNDI data source for each server (database server, instance, etc.) with its own pool of connections, you can always call setCatalog (http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#setCat alog (java.lang.String)) on the connection returned from the pool. One doesn't typically add new database servers on the fly, and this option would require defining a new JNDI datasource for a new server. Of course all catalogs processed in this way must be accesible to the user specified in the connnection pool properties. I would suggest setting the defaultCatalog property as well, so that you are not accidentally connected to the last-used catalog from the previous borrower of the connection. Tim -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 8:23 AM To: 'Tomcat Users List' Subject: RE:
RE: mod_jk with httpd tomcat
Hi, I don't think the issue is with tomcat (the connector is built independently, so I would concentrate on the mod_jk (binary or building of it) and it's interaction with apache. I recently built mod_jk (v 1.2.15) on sol8 from source, from my notes I had the following: cd jakarta-tomcat-connectors-1.2.15-src/jk/native ./configure --with-java-home=/usr/jdk1.5.0_06 --with-apxs=/usr/local/apache/apache_2.0.54/bin/apxs I also remember noting that it might be necessary to build mod_jk on the same server on which apache was built. There were references to apache source during the mod_jk build (as opposed to just the installed instance): saw the following: (APRINCLUDEDIR is -I/export/home/kchong/httpd-2.0.54/srclib/apr/include -I/export/home/kchong/httpd-2.0.54/srclib/apr-util/include) Hope this helps. -Original Message- From: Greg Bobak [mailto:[EMAIL PROTECTED] Sent: Tuesday, 24 January 2006 7:42 AM To: Tomcat Users List Subject: Re: mod_jk with httpd tomcat Hi, Thansk for the reply. I think I had found some documentation about rebuild Apache with mod_jk bound. I'll have to look again. I've been trying to rebuild mod_jk (to no avail) in hopes that would work, but keep getting this error: could not find /usr/local/apache2/bin/apxs configure: error: You must specify a valid --with-apxs path Of course it is the right path. G. Mike Sabroff [EMAIL PROTECTED] wrote: I had the same problem a while back. I had to do some googling and find the mod_jk source. Trying to compile it was problematic and I also got the unresolved errors I had to rebuild apache with jk as part of the build in order to get it to work. I wish I could remember where I got the source and the instructions, but I am old and forget easily (actually age has nothing to do with italways been like that) I appologize, especially since I spent many hours trying this and that and I know what you are going through I do remember, that the proceedure was different with apache 2.x than it was with 1.3x that I have installed. Greg Bobak wrote: I am using Tomcat 5.0.28 BTW. G. Greg Bobak wrote: I am trying to get mod_jk to work with apache 2.0.55 and get this error on the load module: Syntax error on line 276 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_jk.so into server: ld.so.1: /usr/local/apache2/bin/httpd: fatal: relocation error: file /usr/local/apache2/modules/mod_jk.so: symbol ap_null_cleanup: referenced symbol not found snip - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP. www.about.sensis.com.au A leading Australian advertising, information and directories business. www.sensis.com.au www.yellowpages.com.au www.whitepages.com.au www.citysearch.com.au www.whereis.com.au www.telstra.com.au www.tradingpost.com.au www.universalpublishers.com.au www.invizage.com.au This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged. Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email. If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 8653 5000] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (newb) Tomcat servlet mapping problem
Mike Sabroff wrote: url-pattern/simple-servlet/url-pattern should be url-pattern/simple-servlet/*/url-pattern Does not need to. You can specify paths without wildcards, which then only match that very url. The whole story about servlet mappings (which is quite short actually) is concisely explained in section 11.2 of the Servlet specification, which is available at http://java.sun.com/products/servlet/download.html#specs Georg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (newb) Tomcat servlet mapping problem
Darren Hall wrote: (I wasn't sure how to configure the ResourceBundle in the code. I copied all the files the resource bundle seemed to be referring to into my /servlet directory along with the compiled HelloWorldServlet code, but it still complained on execution that it couldn't locate the resource, so it was easier for me to comment it out.) Better forget about the /servlet url|directory. It was only a made-up url segment for the invoker. In production environments, never use that, but explicit Context paths. Put your servlet.xml (or whatever named, better name it something like myapp.xml) in place again, using a nice Context path. After that, you can put all your servlets with no package in WEB-INF/classes. This will also be the place where your resource bundles will be found. Then, these mappings are perfectly alright: web-app servlet servlet-nameFLCUpEvDisplayServlet/servlet-name servlet-classFLCUpEvDisplayServlet/servlet-class /servlet servlet-mapping servlet-nameFLCUpEvDisplayServlet/servlet-name url-pattern/FLCUpEvDisplayServlet/url-pattern /servlet-mapping /web-app Now everytime I hit the servlet, I get the ClassDefNotFound error, and after that I see an entry in the log file: 2006-01-23 11:35:53 StandardContext[/servlet]Marking servlet FLCUpEvDisplayServlet as unavailable 2006-01-23 11:35:53 StandardContext[/servlet]Error loading WebappClassLoader delegate: false repositories: /WEB-INF/classes/ Hmm, you're mixing up that /servlet story. Better remove everything named servlet from your environment... It is only confusing. Create app.xml, put the Context path / or /app, and then /FCLxyzServlet or /app/FCLxyzServlet are the correct URLs. Does that make any sense? Georg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Pool Woes
Alex Turner wrote: Somehow I doubt the JSTL authors were so short sighted as not to release database connections properly. I'm sure they had production usage in mind when it was written, I'm just wondering how. Actually, they seemed to mostly have rapid prototyping in mind with the JSTL SQL tags. From the JSTL Specification, Chapter 10: Many web applications need to access relational databases as the source of dynamic data for their presentation layer. While it is generally preferred to have database operations handled within the business logic of a web application designed with an MVC architecture, there are situations where page authors require this capability within their JSP pages (e.g. prototyping/testing, small scale/simple applications, lack of developer resources). But I would agree that the JSTL tags should be releasing DB connections properly--AFAICT the JSTL spec seems to indicate this is automatically done. Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat upgrade: 3.3.1 -- 5.0.28, hang up after running 1 or 2 days
As I mentioned in last email, I rolled back Tomcat 5.0 to 3.3 last Friday. It played dead again after lunch today (Monday). I had trouble restarting it - dead very soon after restart. The similar symptom to Tomcat 5.0. Later I decided to remove tomcat 5.0 and Java sdk 5.0 and J2EE 5.0 completely. Re-installed JDK1.3.1 and J2EE 1.3.0. Re-started. It runs until now (about 1 hour). My question: Do you think different version of java and tomcat co-exist on the same machine causes this problem? For each version, the system environment variables, classpath, java_home and path, were adjusted to a single version. Tomcat5's service.bat file was ensured to point to Java5. - Monica -Original Message- From: Monica Wu [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 9:43 AM To: Tomcat Users List Subject: RE: Tomcat upgrade: 3.3.1 -- 5.0.28, hang up after running 1 or 2 days Thank you for your input, Aparna! Based on Chunk and Aparna's suggestion, I changed PermGen/Heap parameters to be 128M/256M. It worked well on the following day too. However, Friday's traffic is usually light. I am not sure these new parameter values would fix this problem. Instead of keeping testing this production web server with every end user, I rolled this web server back to V.3.3.1, which had run smoothly for about 4 years. About updating to Tomcat 5.5. Since the cause is not unclear, and some Tomcat 5.5 hangups were reported as well, I don't think simply upgrading to 5.5 would fix my problem. Thank you all for your help and attention! - Monica - 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] ParallelGCThreads more than cpu count
is there any weakness if i setting like that? Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Andri Herumurti [mailto:[EMAIL PROTECTED] Subject: ParallelGCThreads more than cpu count it is possible to setting XX:ParallelGCThreads over than CPU count? Yes, you get the number of GC threads you asked for. They contend for the CPUs, just as all the other threads in your system do. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Photos Showcase holiday pictures in hardcover Photo Books. You design it and well bind it!
RE: problem with tomcat 5.5.9
Hi, Yeah, profiler indicates the Tomcat Objects as memory leak. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 11:25 PM To: Tomcat Users List Subject: Re: problem with tomcat 5.5.9 [EMAIL PROTECTED] wrote: We observed that tomcat's memory footprint (not the heap size) keeps increasing if we run it for a long time under constant load. Initially it was 305 MB, but after running it for 12 hours continuously, it increased to 1153 MB. We are running the server on Red Hat Linux AS 3.0. We are using Tomcat version: 5.5.9 and we checked that the application is not the cause for memory leak (checked with Jprobe Profiler). Did the profiler indicate any memory leak? If so where was it? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hopefully?
Jack [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Barker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] After a request response, on the keep alive connection. The web server starts to negotiate an SSL support by sending a Hello request. It won't, since it has no reason to renegotiate. They will (hopefully) close the connection to port 80, and open a new connection to port 443. No, simply that practically no browser supports RFC2817 http://www.ietf.org/rfc/rfc2817.txt. Great! Thanks a lot. I got it. People have already work on this. RFC2817 is pretty comprehensive. It seems you didn't get my point, let me put in this way. Over a normal http connection (port 80), after the first request response, the server sends hello request. Is it easy for the broswer tomcat turn the normal connection into ssl connection (still on port 80)? Either the Connector is either expecting SSL or HTTP, but not both. The browser won't do it either unless you specify a https URL. If you try this, Tomcat will simply respond with a 400 (Bad Request), and close the socket connection. You can see it by doing https://localhost:8080 against an out-of-the-box Tomcat install. Thank you for your time. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] ParallelGCThreads more than cpu count
From: Andri Herumurti [mailto:[EMAIL PROTECTED] Subject: RE: [OT] ParallelGCThreads more than cpu count is there any weakness if i setting like that? There will be some potential of extra overhead due to unnecessary switching and lock contention, but I would expect the effect to be rather minor (haven't measured it). Since garbage collection is CPU-bound activity (no I/O - other than possible paging - and limited lock contention), there's no real advantage to having more GC threads than CPUs. When UseParallelGC is enabled, the default number of GC threads in a HotSpot JVM is the number of CPUs for 8 or less processors, and 3 plus 5/8 of the number of CPUs for larger systems. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT-ANN] Java Web Parts v1.0 beta3
Hi all... I haven't been posting JWP release announcements here lately, and generally I will refrain from doing so, but the team just put out a new release last night and I think it has some features that might be of interest to many of you... * AjaxTags now has some new capabilities, including the ability to have multiple config files, the ability to have static parameters on the target URLs, a built-in debugging facility and an implicit passing in of the ajaxRef with each request, so now you can always determine which element fired the event. * The Chain implementation now supports loading config files from JAR files, and there is now a SimpleCommand that you can extend (instead of implementing Command) that has default implementations of all three Command methods (init(), execute() and destroy()), so you can only worry about the ones that interest you. * A new popup calendar widget has been added to the UIWidgets taglib. * JSDigester was added to the JSTags taglib. JSDigester, as you may be able to guess, is a client-side implementation of our beloved Commons Digester. It is not as full-featured as it's big brother, but it can come in *very* handy, just like the full-fledged Digester. Take care! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version.
The situation is just you`ve said. Do you know any other way to access to external resources? - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, January 23, 2006 4:08 PM Subject: RE: Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version. From: Gema Berdasco [mailto:[EMAIL PROTECTED] Subject: Cannot access external resources from a webapp when upgrading Tomcat above 5.5.9 version. we use the following entry on the context.xml file of the webapp: Context docBase=/path/to/resources path=/contents Resources className=org.apache.naming.resources.FileDirContext/ /Context You don't explicitly say where your Context element is, but the implication is that it's inside a file named context.xml in your webapp's META-INF directory. If that is the case, both the path and docBase attributes are ignored. See: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Look at the descriptions for the two attributes in question. The docBase attribute is intended to provide the location of the webapp, not a link to external resources. Tomcat versions after 5.5.9 seem to have tightened up enforcement of the configuration rules. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: serializing java code
u can just impelment the serializable interface. if u want to gnerate unique IDs for each classes u can simply use the serialver tool that comes with JDK which usually resids at the $JAVA_HOME/bin On 1/24/06, Nehal Sangoi [EMAIL PROTECTED] wrote: Hi I need to serialize my existing java code for implementing Tomcat Clustering feature. Is there any ready-made tool which does the job easily? Otherwise, manually, how can i convert my existing code into serialized format? Thanks Nehal - 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 can I take a webapp temporarily out of service using mod_jk?
Prout John - jprout wrote: Hi I am running a JBoss cluster, using tomcat as the Servlet engine. Apache and mod_jk provide load-balancing of requests over the machines in the cluster Use mod_jk status worker. This is webapp inside Apache that allows you to manage loadbalancer members. Inside workers.properties add worker.list=,jkstatus ... worker.jkstatus.type=status Add this to httpd.conf: #JK Balancer manager Location /manager/ JkMount jkstatus Order deny,allow Deny from all Allow from 127.0.0.1 /Location Now http://manager/ will give you the mod_jk admin console, where you can disable, or stop particular nodes for maintenance. If you need only to remove particular mappings then use JkMount directive and prefix each mapping with '-'. Within 60 seconds, mod_jk will disable the mappings. See: http://tomcat.apache.org/connectors-doc/config/apache.html Does anyone know a way to do this? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serializing java code
Your code does not really get serialized. You just have to be sure that you are not storing any objects in the Session that are not Serializable - i.e. they must implement the interface java.io.Serializable. For many of your custom object types it may be as simple as just implementing the Serializable interface. But if any of your objects have database connection, or other information that cannot be readily serialized - this will take a bit more thought. I'm not aware of a tool that would do this for you - it would be magic :) When I moved an application to a Tomcat cluster a while back, it turned up a number of objects that I did not realize were Serializable, including Log4J loggers. It took a bit of rework, but probably was all done within a half of a day. HTH - Richard -Original Message- From: Nehal Sangoi [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 11:32 PM To: Tomcat Users List (E-mail) Subject: serializing java code Hi I need to serialize my existing java code for implementing Tomcat Clustering feature. Is there any ready-made tool which does the job easily? Otherwise, manually, how can i convert my existing code into serialized format? Thanks Nehal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with tomcat 5.5.9
Hi, Small update on the problem mentioned We did not found any memory leak, but memory footprint is increasing. We observed that tomcat's memory footprint (not the heap size) keeps increasing if we run it for a long time under constant load. Initially it was 305 MB, but after running it for 12 hours continuously, it increased to 1153 MB. We are running the server on Red Hat Linux AS 3.0. Thanks in advance, Rajesh Gannarapu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 24, 2006 9:15 AM To: users@tomcat.apache.org Subject: RE: problem with tomcat 5.5.9 Hi, Yeah, profiler indicates the Tomcat Objects as memory leak. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 11:25 PM To: Tomcat Users List Subject: Re: problem with tomcat 5.5.9 [EMAIL PROTECTED] wrote: We observed that tomcat's memory footprint (not the heap size) keeps increasing if we run it for a long time under constant load. Initially it was 305 MB, but after running it for 12 hours continuously, it increased to 1153 MB. We are running the server on Red Hat Linux AS 3.0. We are using Tomcat version: 5.5.9 and we checked that the application is not the cause for memory leak (checked with Jprobe Profiler). Did the profiler indicate any memory leak? If so where was it? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serializing java code
I do have objects that do db connections. I think i would need to dig out some more info into the direction you provided. I will look out for how to do it and work upon. Thank You.for providing useful information !! Nehal -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 24, 2006 12:55 PM To: 'Tomcat Users List' Subject: RE: serializing java code Your code does not really get serialized. You just have to be sure that you are not storing any objects in the Session that are not Serializable - i.e. they must implement the interface java.io.Serializable. For many of your custom object types it may be as simple as just implementing the Serializable interface. But if any of your objects have database connection, or other information that cannot be readily serialized - this will take a bit more thought. I'm not aware of a tool that would do this for you - it would be magic :) When I moved an application to a Tomcat cluster a while back, it turned up a number of objects that I did not realize were Serializable, including Log4J loggers. It took a bit of rework, but probably was all done within a half of a day. HTH - Richard -Original Message- From: Nehal Sangoi [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 11:32 PM To: Tomcat Users List (E-mail) Subject: serializing java code Hi I need to serialize my existing java code for implementing Tomcat Clustering feature. Is there any ready-made tool which does the job easily? Otherwise, manually, how can i convert my existing code into serialized format? Thanks Nehal - 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]