Tomcat - Automatically writes a session?
Someone just pointed out that my JSPs are have this in the header: "Set-Cookie: JSESSIONID=97C8777F16379B8EC2CD17273CE35C3C; Path=/" The problem is that I'm not setting any sessions or cookies from the page so I have no idea what's going on. Is there some reason this is there? Is there some setting in the Web.xml and/or server.xml file that I must tweak? PS - I use Tomcat has my http server, not apache (in case that's meaningful). Thanks. Neal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat webapp welcome file
It's possible with TC 3.3.x (with non-default config options), and with TC 5.0.x (with the default config options), but not with TC 4.1.x. "Denis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi: > I created a webapp as ROOT under tomcat 4.1.27, and set the welcome > file as index.jsp for the webapp. And I start the tomcat server and open > my IE go to localhost. In the IE address bar, it changes to > http://localhost/index.jsp. Is there a way to config the tomcat to let > it not display index.jsp and just display http://localhost? > Thanks in advance. > > > - Denis > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2 for Apache 2.0.43 (and only 2.0.43)
Why does it say the following. start This is the 2.0.2 release of JK2 You'll find here binaries for Apache 1.3, 2.0 and IIS. Build under Windows XP, Apache 1.3.27 and 2.0.43, IIS 5.1 * isapi_redirector2.dll is for Microsoft's IIS web server * mod_jk2-1.3.27.dll is for Apache 1.3.x * mod_jk2-1.3.27-jni.dll is for Apache 1.3.x with JNI supported * mod_jk2-2.0.43.dll is for Apache 2.0.43 (and only 2.0.43) end When the main releases for Apache are 2.0.47 and .48 ? Is this random or does that mean it wont work for my version of Apache ? Brennon Obst Java Security Programmer iEnergy Main Branch 39 Melbourne St. / Brisbane p. (617) 3846- [EMAIL PROTECTED]
Re: WAR file not expanded on deployment
At 09:36 PM 1/19/2004 -0500, you wrote: IIS 5.0, Tomcat 4.1.29, Windows XP and 2000 I am trying to use the Tomcat/ISAPI Redirection installer from http://www.shiftomat.com/opensource It looks for contexts to map by listing everything in /webapps that is not ROOT, therefore I need my app expanded on deployment. Currently for some readon I cannot get my WAR to be expanded. I have an .war and an -context.xml file copied into the webapps/ directiory on deployment, and even after I restart Tomcat it will not expand. However if I do not include an -context.xml in the webapps dir in does expand the WAR. Any clue what is going on? How can I get the behavior that I want? Sure, upgrade to Tomcat5. It has the behavior you want. Tomcat 4.1.xx behaves exactly as you describe. It isn't a bug, its a feature. Tomcat5 simply has a different feature :-) Jake Thanks in advance, Frank - 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: TC5 won't start on Xeon | severe error
What is the error now? -Original Message- From: K. Harvatis [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 7:56 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: TC5 won't start on Xeon | severe error Ok, what was needed was an installation of SDK 1.4 and the creation of an empty \lib directory. Now TC5 starts, but with "severe" error. Any idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mozilla showing JSP source code
Hi, I used to see this when doing a response.sendRedirect() without following it with a return(), but didn't see jsp source, just html source. I did have a problem with mod_jk showing .jsp source when the URI contained a // in the path like http://dom.ain/context//file.jsp, but that sounds like a different problem and an upgrade of mod_jk fixed that. The redirect without return was a common problem in dreamweaver ultradev 4. response.sendRedirect() does not terminate execution of the servlet/jsp (nor should it), it just adds header content to the output. I.E. is being 'nice' by painting over the html of the page that sent the redirect with the html of the redirected page, but netscape/mozilla leaves the html from the redirecting page in the browser. A more serious issue is that if you are using response.sendRedirect() to send an unauthorized user to a login page, you are sending them the content you were trying to protect, and then telling them they need to log in to see it. Not at all secure. Though this is an overly simplistic analogy, think of a servlet/jsp as a dynamically loaded function being called by tomcat. This is why you can't call system.exit() in a servlet without terminating tomcat itself. Unless you tell the servlet to cease processing, it will happily continue doing what it does best -- outputting html. bottom line: if (not authorized) { response.sendRedirect(some location); return; // don't bother doing anything else } If you opened any jdbc connections be sure to close them before returning. Sean Web Solutions That Work Developing custom web solutions designed specifically to accomplish the unique objectives of our clients. Phone 503-639-2727 Fax 503-639-0807 - Original Message - From: Guy Rouillier [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 5:36 PM To: Tomcat Users List Subject: Mozilla showing JSP source code [snip] (4) The most reliable way to see this fail is via a redirect. This happens most frequently on the secure half of our website (https). On those pages, we have an authentication header at the top of each page: <%@ include file="/includes/authenheader.jspf" %> Inside this file, we check some session variables, and if they don't have the right set of values (or those values don't exist) we response.sendRedirect() to a login page. During this redirect, I *always* see the source for the login page - the login page has not come up cleanly one time. This page is very small, and neither the buffer or timeout changes help. If anyone has any ideas on how to address this problem, I'm willing to try anything. I really am out of ideas and don't know where to go next. Thanks for any help. -- Guy Rouillier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mozilla showing JSP source code
I'm sure this doesn't help, but we had the same problem with the 3.x series. It went away when we upgraded to 4.x and 5.x. Good luck, Jeff -Original Message- From: Guy Rouillier [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 5:36 PM To: Tomcat Users List Subject: Mozilla showing JSP source code I've tried to do due diligence on this issue, searching the archives as well as Google. I'm sure it is a common problem, but I found several questions and no definitive responses, so here goes. Our website works fine with IE, but we're having a significant problem with Mozilla (and derivatives like Galeon). I've tried various versions, including 1.5 as well as the brand new 1.6. I'm seeing this problem both from a Windows XP/2000 host and a Solaris host. I've tried Mozilla both on Windows XP clients and Mandrake Linux 9.2 i586 clients. All exhibit the same behavior. As the title says, when using Mozilla, I'll frequently see source code in the browser window. If I hit reload, in most cases, I'll see the page properly displayed (99% of the time - rarely, I'll see the source again.) We are still using Apache 1.3.27, Tomcat 3.2.3 and mod_jk 1.2.4. Here, for example, is one I can produce very regularly: === HTTP/1.1 200 Date: Tue, 20 Jan 2004 00:14:25 GMT Server: Apache/1.3.26 (Unix) mod_jk mod_ssl/2.8.9 OpenSSL/0.9.6c Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html;charset=ISO-8859-1 1172 === I'm still working on getting Tomcat 5.0.19 configured with JK2, in the hopes this will magically go away, but I've having problems getting JK2 configured properly. Here are some things I've tried or noticed: (1) I first tried going directly to Tomcat, bypassing Apache (using :8080) and this works. All our pages are displayed in Mozilla without any problem. That leads me to conclude that the problem is either in Tomcat delivering the pages to Apache via mod_jk, or in Apache delivering the pages to the browser. The first seems more likely. (2) We specify no buffer clause on our page directive. On some pages, specifying buffer="64kb" seems to work. Frustratingly, this solution seems to work on some pages but not others, and on some systems and not others for the same page. (3) I also tried changing the KeepAliveTimeout in Apache httpd.conf. The default value is 15. As a test, I upped it to 150. Again, this solved the problem on some pages on some clients, but not reliably or predictably. It also caused Mozilla to spin its wheels for about the whole 2 1/2 minutes. (4) The most reliable way to see this fail is via a redirect. This happens most frequently on the secure half of our website (https). On those pages, we have an authentication header at the top of each page: <%@ include file="/includes/authenheader.jspf" %> Inside this file, we check some session variables, and if they don't have the right set of values (or those values don't exist) we response.sendRedirect() to a login page. During this redirect, I *always* see the source for the login page - the login page has not come up cleanly one time. This page is very small, and neither the buffer or timeout changes help. If anyone has any ideas on how to address this problem, I'm willing to try anything. I really am out of ideas and don't know where to go next. Thanks for any help. -- Guy Rouillier - 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 webapp welcome file
Hi: I created a webapp as ROOT under tomcat 4.1.27, and set the welcome file as index.jsp for the webapp. And I start the tomcat server and open my IE go to localhost. In the IE address bar, it changes to http://localhost/index.jsp. Is there a way to config the tomcat to let it not display index.jsp and just display http://localhost? Thanks in advance. - Denis
WAR file not expanded on deployment
IIS 5.0, Tomcat 4.1.29, Windows XP and 2000 I am trying to use the Tomcat/ISAPI Redirection installer from http://www.shiftomat.com/opensource It looks for contexts to map by listing everything in /webapps that is not ROOT, therefore I need my app expanded on deployment. Currently for some readon I cannot get my WAR to be expanded. I have an .war and an -context.xml file copied into the webapps/ directiory on deployment, and even after I restart Tomcat it will not expand. However if I do not include an -context.xml in the webapps dir in does expand the WAR. Any clue what is going on? How can I get the behavior that I want? Thanks in advance, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
long startup time with JDK1.4
I am Using Tomcat V 3.2.3. I have encountered a strange behaviour of Tomcat when switching from JDK 1.3.1 to 1.4.2. The time until the server is bound to its listening port has increased from a few seconds up to 3 (!!!)minutes. All contexts are added within a second, however after adding the contexts, it seems that the server runs into a kind of timeout before it finally binds to its port (during this 3 minutes the server is idle). The same behaviour has been reached with the latest tomcat-Version (5.0.16). Any Guesses will be appreciated! Thanks in advance for any help! Roland
RE: Running multiple JVMs
Check this URL for load balancing: http://raibledesigns.com/tomcat/ --- Brennon Obst <[EMAIL PROTECTED]> wrote: > How do you run multiple instances of tomcat with an > apache > front/balancer? > > /Brennon > > -Original Message- > From: Donie Kelly [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 20 January 2004 3:03 AM > To: 'Tomcat Users List' > Subject: RE: Running multiple JVMs > > > Or you can have one IP and get multiple tomcat's > listening on different > ports and get your balancer to route to each of > them. Multiple IP's are > not necessary if you need to use a balancer. > > Donie > > -Original Message- > From: Ralph Einfeldt > [mailto:[EMAIL PROTECTED] > Sent: 19 January 2004 16:52 > To: Tomcat Users List > Subject: RE: Running multiple JVMs > > An additional remark: > > Only one process can listen on port 80 at a time on > the !!! same IP !!!. > > You can define several IP's on one machine and thus > can have several > services that listen on port 80. (One for each IP) > > > -Original Message- > > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > > Sent: Monday, January 19, 2004 5:42 PM > > To: Tomcat Users List > > Subject: RE: Running multiple JVMs > > > > Only one process can listen on port 80 at a time. > > > > - > 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] > __ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mozilla showing JSP source code
I've tried to do due diligence on this issue, searching the archives as well as Google. I'm sure it is a common problem, but I found several questions and no definitive responses, so here goes. Our website works fine with IE, but we're having a significant problem with Mozilla (and derivatives like Galeon). I've tried various versions, including 1.5 as well as the brand new 1.6. I'm seeing this problem both from a Windows XP/2000 host and a Solaris host. I've tried Mozilla both on Windows XP clients and Mandrake Linux 9.2 i586 clients. All exhibit the same behavior. As the title says, when using Mozilla, I'll frequently see source code in the browser window. If I hit reload, in most cases, I'll see the page properly displayed (99% of the time - rarely, I'll see the source again.) We are still using Apache 1.3.27, Tomcat 3.2.3 and mod_jk 1.2.4. Here, for example, is one I can produce very regularly: === HTTP/1.1 200 Date: Tue, 20 Jan 2004 00:14:25 GMT Server: Apache/1.3.26 (Unix) mod_jk mod_ssl/2.8.9 OpenSSL/0.9.6c Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html;charset=ISO-8859-1 1172 === I'm still working on getting Tomcat 5.0.19 configured with JK2, in the hopes this will magically go away, but I've having problems getting JK2 configured properly. Here are some things I've tried or noticed: (1) I first tried going directly to Tomcat, bypassing Apache (using :8080) and this works. All our pages are displayed in Mozilla without any problem. That leads me to conclude that the problem is either in Tomcat delivering the pages to Apache via mod_jk, or in Apache delivering the pages to the browser. The first seems more likely. (2) We specify no buffer clause on our page directive. On some pages, specifying buffer="64kb" seems to work. Frustratingly, this solution seems to work on some pages but not others, and on some systems and not others for the same page. (3) I also tried changing the KeepAliveTimeout in Apache httpd.conf. The default value is 15. As a test, I upped it to 150. Again, this solved the problem on some pages on some clients, but not reliably or predictably. It also caused Mozilla to spin its wheels for about the whole 2 1/2 minutes. (4) The most reliable way to see this fail is via a redirect. This happens most frequently on the secure half of our website (https). On those pages, we have an authentication header at the top of each page: <%@ include file="/includes/authenheader.jspf" %> Inside this file, we check some session variables, and if they don't have the right set of values (or those values don't exist) we response.sendRedirect() to a login page. During this redirect, I *always* see the source for the login page - the login page has not come up cleanly one time. This page is very small, and neither the buffer or timeout changes help. If anyone has any ideas on how to address this problem, I'm willing to try anything. I really am out of ideas and don't know where to go next. Thanks for any help. -- Guy Rouillier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache 1.3.29 + mod_jk2 + tomcat 4.1.29: cannot get SSL to work via Apache
nevermind this. we found what the problems was. for the records, when you add the connector via the admin interface, it uses the Http11Protocol rather than the JkCoyoteHandler, which was what we needed. cheers, federico. -- Original Message --- > [..] > we've at work 2 different 1.3.29 apache daemons to handle regular > and ssl connection, both are working against a single tomcat 4.1.29, > using mod_jk2 in both cases. the first daemon works just fine and > the connection if forwarded to tomcat's 8009 port as we've > configured it. we've also the ssl part for tomcat configured and > working properly; the pages are displayed when we direct our > browsers to https://ip-address:8443/, but we cannot get the ssl > apache to handle the connection on behalf of tomcat's 8443 port. > we're pretty sure it's something related to workers2.properties, > but so far we're unable to find the problem. for every request, > jk2.log shows: > [..] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adjust Memory Settings
I think I found the answer (in case anyone else wants to know). In the registry, find: HKLM\Software\apache software foundation\tomcat service manager\tomcat5\parameters And edit JavaOptions. This is where the command line parameters are stored. Does anyone know of a different/better way? This seems fairly simple and straightforward to me, but I would like to know if others have a better way of doing it. Jeff -Original Message- From: Jeff Greenland Sent: Monday, January 19, 2004 5:13 PM To: [EMAIL PROTECTED] Subject: Adjust Memory Settings Hello all, I need to be able to adjust the memory settings for Tomcat as it runs on Win2003 as a service. In previous versions, I was able to modify the wrapper.properties file to something like this: wrapper.cmd_line=$(wrapper.javabin) -Djava.security.policy=="$(wrapper.tomcat_policy)" -Dtomcat.home="$(wrapper.tomcat_home)" -Xmx384m -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Which would then allow 384mb for applications. In Tomcat 5 -- since it installs as a service automatically -- I'm unable to find where I can change this. Can someone point me in the right direction? Thanks in advance, Jeff - 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: maxProcessors vs maxThreads
thanks much remy. i was looking for configuring maxThreads for the ajp connector with jk2. anyways, do you know what the default value for maxThreads is for channelSocket? (it's not in the docs) what are the defaults for the other options? or where can i find them? backLog tcpNoDelay soTimeout soLinger serverTimeout again, thanks. this was exactly what i was looking for. ps: you know if you specify maxProcessors or maxThreads in the ajp Connector element, tomcat starts up fine, without any warnings. as a suggestion, (i don't know how beneficial), but it would probably be nice if a message gets printed in the log (with debug=0) stating that the values will be ignored and should be set in jk2.properties. > > For AJP, you're supposed to use the jk2.properties file. This is all in > the JK docs, with the native connector docs. Some select parameters from > jk2.properties could be set on the Connector element, but it seemed > better to use only one configuration file for AJP, and I removed them > from the documentation. > > -- > x > Rémy Maucherat > Senior Developer & Consultant > JBoss Group (Europe) SàRL > x > > - > 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: HTTP tunneling
Hi! Without knowing your setup better, I can't be entirely certain here, but my best guess is that your servlet's attempt to open a connection to the outside world is denied by it's sandbox's security manager. Check the console of your client vm for any security related errors. You might have to tweak the security manager a bit to allow a servlet to open an externa connection. HTH Phil niranjan inamdar wrote: Hello eveybody, I am using tomcat for the first time. Using tomcat , i was able to invoke a simple servlet that shows data acceted by a form but i was unable to invoke a sevlet from an applet. I want to invoke a servlet using Java URL class and OpenConnection method but it doesn't work. The servlet is not invoked , even i don't get any HTTP error message. Can any one tell what is the problem? How can i know what is the exact problem. Do i need to change any configuration options? __ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - 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]
Adjust Memory Settings
Hello all, I need to be able to adjust the memory settings for Tomcat as it runs on Win2003 as a service. In previous versions, I was able to modify the wrapper.properties file to something like this: wrapper.cmd_line=$(wrapper.javabin) -Djava.security.policy=="$(wrapper.tomcat_policy)" -Dtomcat.home="$(wrapper.tomcat_home)" -Xmx384m -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Which would then allow 384mb for applications. In Tomcat 5 -- since it installs as a service automatically -- I'm unable to find where I can change this. Can someone point me in the right direction? Thanks in advance, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Keeping servlet thread awake
I have a servlet running under tomcat4.1.24. I want the servlet to sleep for 30 minutes and sync with another servlet hosted by one of my friends, but it seems that tomcat kills the thread, and wont let it run every 30 mins. Is there something I can do to ensure tomcat doesnt kill the thread? It works fine on my friends machine (not tomcat). Thanks Allan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: virtual hosting and tomcat wt Apache 2 and JK2
Thank you Charlie, I missed this email in my last response. I will follow that tutorial and report back. Cheers mate! /Brennon -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED] Sent: Tuesday, 20 January 2004 3:30 AM To: 'Tomcat Users List' Subject: RE: virtual hosting and tomcat wt Apache 2 and JK2 You probably have this bug(different than the other one posted) http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22045 The only solution I have found is to map each virtualhost/dir in your workers2.properties that should go to tomcat. While a PITA(at least for me), it does work. See this link for an example. http://www.aexx.net/arcane/article.jsp?article=tomcat4-apache2-jk2 These are the only 2 things that I have found about this issue. Charlie > -Original Message- > From: Brennon Obst [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 1:02 AM > To: 'Tomcat Users List' > Subject: RE: virtual hosting and tomcat wt Apache 2 and JK2 > > Thank you Martina, > > I will check my version and report back =/ > > /Brennon > > -Original Message- > From: Frankl Martina [mailto:[EMAIL PROTECTED] > Sent: Friday, 16 January 2004 10:23 PM > To: Brennon Obst; 'Tomcat Users List' > Subject: AW: virtual hosting and tomcat wt Apache 2 and JK2 > > > Maybe your jk2 version still has this bug: > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18472 > > hth > Martina > > > > -Ursprüngliche Nachricht- > > Von: Brennon Obst [mailto:[EMAIL PROTECTED] > > Gesendet: Freitag, 16. Januar 2004 05:43 > > An: 'Tomcat Users List' > > Betreff: virtual hosting and tomcat wt Apache 2 and JK2 > > > > > > > > Dear usergroup, > > > > When I activated the following in my Apache 2 config within the > > VirtualHost block for x.xxx.net: > > > > JkUriSet worker ajp13:localhost:8009 > > > > > > > > ALL of my virtual hosts stopped working and started complaining of > > not being able to find /index.jsp > > > > It is like the wasn't confined to the VirtualHost but > > rather became a server wide configuration. > > > > When I activated the apache<-->tomcat connection it took over ALL of > > the virtual hosts and was routing them through Tomcat, does > > anyone know how to > > stop that? > > > > Is it my Apache 2 and JK2 connectors, where do I turn now? Thank you > > in advance, > > > > Brennon Obst > > > > > > Java Security Programmer > > iEnergy Main Branch > > 39 Melbourne St. / Brisbane > > p. (617) 3846- > > [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]
Apache 1.3.29 + mod_jk2 + tomcat 4.1.29: cannot get SSL to work via Apache
hi, we've at work 2 different 1.3.29 apache daemons to handle regular and ssl connection, both are working against a single tomcat 4.1.29, using mod_jk2 in both cases. the first daemon works just fine and the connection if forwarded to tomcat's 8009 port as we've configured it. we've also the ssl part for tomcat configured and working properly; the pages are displayed when we direct our browsers to https://ip-address:8443/, but we cannot get the ssl apache to handle the connection on behalf of tomcat's 8443 port. we're pretty sure it's something related to workers2.properties, but so far we're unable to find the problem. for every request, jk2.log shows: [Mon Jan 19 23:38:35 2004] (error) [jk_msg_ajp.c (447)]: msgAjp.receive(): Bad signature 153 [Mon Jan 19 23:38:35 2004] (error) [jk_channel_socket.c (549)]: channelSocket.receive(): Bad header [Mon Jan 19 23:38:35 2004] (error) [jk_workerEnv.c (482)]: workerEnv.processCallbacks() Error reading reply [Mon Jan 19 23:38:35 2004] (error) [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply recoverable error 21000 [Mon Jan 19 23:38:35 2004] (error) [jk_msg_ajp.c (447)]: msgAjp.receive(): Bad signature 153 [Mon Jan 19 23:38:35 2004] (error) [jk_channel_socket.c (549)]: channelSocket.receive(): Bad header [Mon Jan 19 23:38:35 2004] (error) [jk_workerEnv.c (482)]: workerEnv.processCallbacks() Error reading reply [Mon Jan 19 23:38:35 2004] (error) [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply recoverable error 21000 [Mon Jan 19 23:38:35 2004] (error) [jk_worker_ajp13.c (512)]: ajp13.service() Error forwarding ajp13:testbed:8443 1 0 [Mon Jan 19 23:38:35 2004] (error) [mod_jk2.c (427)]: mod_jk.handler() Error connecting to tomcat 21000 my workers2.properties follows: [channel.socket:testbed:8443] tomcatId=testbed:8443 [shm:] file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [uri:/*.jsp] [uri:domain.net/*] as for the httpd.conf, only 'LoadModule jk2_module module/mod_jk2.so' was added. we've tried several things, but we're running out of ideas, and the documentation is not really helpful. we'd appreciate any help or documentation references. thanks in advance, Federico. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redhat9 / mod_jk2 builds from source
Hi when using Redhat is mod_jk2 the latest bin and closest to the actual JK2. I have a bug that is listed as fixed in jk2 but I don't know how to get jk2 for redhat. I have looked here but only win32 and solaris http://apache.mirrors.ilisys.com.au/jakarta/tomcat-connectors/jk2/binari es I am running tomcat-4.1.27-8.ent.1 with mod_jk2-4.1.27-8.ent.1 rpms sourced from http://people.redhat.com/gbenson/naoko Also running httpd-2.0.46-25.ent (Apache 2). -Original Message- From: George Shafik [mailto:[EMAIL PROTECTED] Sent: Sunday, 18 January 2004 12:40 PM To: Tomcat Users List Subject: Re: Redhat9 / mod_jk2 builds from source Hi Mark, Oscar Sorry I now realise you want the ssl feature in apache 2 build. try the following ./configure --with-ssl=shared --enable-modules=all --enable-shared=max remember I'm running things on Linux 9 by default OpenSSH running as a daemon But I'm having problems with getting httpd.conf ssl.conf files right - can you e-mail any that work Cheers, George - Original Message - From: "George Shafik" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, January 15, 2004 8:39 PM Subject: Re: Redhat9 / mod_jk2 builds from source > Opps typo > > ./configure --enable-module=all --enabled-shared=max > > should be > > ./configure --enable-module=all --enable-shared=max > > > - Original Message - > From: "George Shafik" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Thursday, January 15, 2004 8:35 PM > Subject: Re: Redhat9 / mod_jk2 builds from source > > > > Hi Mark, Oscar, and anyone interested: > > > > I found the following always works: > > > > > > make > > make install > > > > I think I've could the eXtrem functionality - I call is Xapache > > while drinking lots of Pepsi :-) > > > > enjoy, > > George > > > > - Original Message - > > From: "Mark Eggers" <[EMAIL PROTECTED]> > > To: "Tomcat Users List" <[EMAIL PROTECTED]> > > Sent: Thursday, January 15, 2004 1:05 PM > > Subject: Re: Redhat9 / mod_jk2 builds from source > > > > > > > Oscar - set $JAVA_HOME if you get configure errors > > > with include-os-type=include/linux. The configure > > > script will tack on the $JAVA_HOME value. > > > > > > If you don't, then give the full path to the header files. > > > > > > I think I get all the extra info because I build > > > Apache with: > > > > > > ./configure --with-ssl=shared --with-modules=all > > > --with-shared=most > > > > > > Basically, I have the kitchen sink version of Apache. > > > > > > Hope that clears things up. > > > > > > /mde/ > > > just my two cents . . . . > > > > > > __ > > > Do you Yahoo!? > > > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > > > http://hotjobs.sweepstakes.yahoo.com/signingbonus > > > > > > -- > > > --- > > > 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: Running multiple JVMs
How do you run multiple instances of tomcat with an apache front/balancer? /Brennon -Original Message- From: Donie Kelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, 20 January 2004 3:03 AM To: 'Tomcat Users List' Subject: RE: Running multiple JVMs Or you can have one IP and get multiple tomcat's listening on different ports and get your balancer to route to each of them. Multiple IP's are not necessary if you need to use a balancer. Donie -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:52 To: Tomcat Users List Subject: RE: Running multiple JVMs An additional remark: Only one process can listen on port 80 at a time on the !!! same IP !!!. You can define several IP's on one machine and thus can have several services that listen on port 80. (One for each IP) > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 5:42 PM > To: Tomcat Users List > Subject: RE: Running multiple JVMs > > Only one process can listen on port 80 at a time. > - 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]
mod_jk load balancing question
Hi! I have a question about the load balancing capabilities of JK connector. If this is not the correct forum to ask this please let me know. We have been using a single apache load balanced equally between two Tomcat machines, using JK connector. Now during load tests on one of the installation the load is getting distributed evenly but on another installation (different machines and different application) the load distribution is very uneven. It always favors one Tomcat machine over the other in the ratio of 5:1. We have checked everything including the load factor etc. But the Tomcat sessions on one machine is 50 and on another one they are only 10. Is there a place where I can get more information about the load balancing algorithm? Any thing we can do to figure out why it is behaving in such a way? Thanks, Rahul __ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: virtual hosting and tomcat wt Apache 2 and JK2
Yes that looks like the bug, I cant find a later version of mod_jk2 though. I am running tomcat-4.1.27-8.ent.1 with mod_jk2-4.1.27-8.ent.1 rpms sourced from http://people.redhat.com/gbenson/naoko I looked at the http://apache.mirrors.ilisys.com.au/jakarta/tomcat-connectors/jk2/binari es however there is only w32 and solaris there. I dont know where to get jk2 for linux anywhere and I have been looking. Thanks in advance, Brennon Obst -Original Message- From: Frankl Martina [mailto:[EMAIL PROTECTED] Sent: Friday, 16 January 2004 10:23 PM To: Brennon Obst; 'Tomcat Users List' Subject: AW: virtual hosting and tomcat wt Apache 2 and JK2 Maybe your jk2 version still has this bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18472 hth Martina > -Ursprüngliche Nachricht- > Von: Brennon Obst [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 16. Januar 2004 05:43 > An: 'Tomcat Users List' > Betreff: virtual hosting and tomcat wt Apache 2 and JK2 > > > > Dear usergroup, > > When I activated the following in my Apache 2 config within > the VirtualHost > block for x.xxx.net: > > JkUriSet worker ajp13:localhost:8009 > > > > ALL of my virtual hosts stopped working and started > complaining of not being > able to find /index.jsp > > It is like the wasn't confined to the > VirtualHost but rather > became a server wide configuration. > > When I activated the apache<-->tomcat connection it took over > ALL of the > virtual hosts and was routing them through Tomcat, does > anyone know how to > stop that? > > Is it my Apache 2 and JK2 connectors, where do I turn now? Thank you > in advance, > > Brennon Obst > > > Java Security Programmer > iEnergy Main Branch > 39 Melbourne St. / Brisbane > p. (617) 3846- > [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]
Eclipse+Ant+Tomcat 5 - problems
I'm starting to try out Tomcat 5 in our development environment, which has been running Tomcat 4.1.x to-date. Preface: our IDE is Eclipse, I use Ant with the catalina-ant tasks to install/remove our web-app from a local Tomcat installation. Everything has worked fine, though I've noticed that after my first install (once I start Eclipse and Tomcat) - anytime I remove/install the web-app, the install appears to init the app twice (my load-on-init servlet's are called twice, etc.) I never figured out what caused this, but it didn't negatively impact anything, so I didn't care. Now, with Tomcat 5 ... after a little tweaking, to my Eclipse environment, I was able to get my same install/remove task working with Ant. The only problem now is that after the initial install, when I do a remove/install, it seems to still init the app twice, only on the second init, it crokes. Talks about a property string that it can't find and then that it can't find the deployment directory for the app (the app is installed from a .WAR) Not good. So, I did some googling - found that apparent install/remove has been deprecated in favor of deploy/undeploy. Fine - so I tried using the deploy task. Apparently, ant doesn't have enough memory to deploy my 90MB+ .WAR (installing never seemed to be a problem) - and when I looked for threads on the DeployTask generating "OutOfMemory" exceptions, it said to increase ant's memory ... which I can't, for the life of myself, figure out how to do with Eclipse. I've previously gone done the path of having ant fork, but it caused so many problems with our builds, I'd rather not revisit that. Does anybody have anything that can help me? I'm trying out Tomcat 5 because Tomcat 4.1.x appears to have some pretty severe memory leaks with its install/remove operations - if I install/remove my web-app more than 2-3 times, Tomcat (not the Ant task and not Eclipse) runs OutOfMemory ... other users have reported that Tomcat 5 does much better in this arena. Advise on any of these issues is much appreciated!! Respectfully, Brice Ruth Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.
RE: maxProcessors vs maxThreads
Apu Shah wrote: > thanks yoav. > > this begs another question... under what circumstances would > one choose to use the ajp connector? i am assuming it's > probably a more compact and efficient protocol compared to > http (not sure about that). > > in any case, if one never needs to access tomcat directly > from a browser (tomcat is always hidden behind apache on an > internal network not accessible from the outside) what > parameters should i use to judge whether to use http or ajp > connectors? > > it seems like http is better (due to the fact that you can > customize settings like maxThreads) but i was always under > the impression that ajp should be preferred over http (i > guess i was wrong) > > any thoughts on this? AJP and HTTP serve different purposes. AJP is used for Apache to talk to Tomcat. They could use HTTP, I suppose, but AJP is a more efficient protocol. You cannot use directly from your browser to Tomcat using AJP - browsers don't support that protocol. Apache has a module (the mod_jk.dll or the equivalent on Unix) that enables it to communicate using that protocol. You can indeed communicate with Tomcat directly from your browser. If you have it enabled, you can use port 8080 (default value, you can change), so a URL might look like http://yourserver:8080/yourpage.jsp. If you want, you can even cut Apache out completely, and tell Tomcat to handle port 80. Not advisable, though, as Apache has had thousands of hours invested to make it efficient at delivering static content. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors vs maxThreads
On Mon, January 19, 2004 at 1:47 pm, Apu Shah wrote: > > this begs another question... under what circumstances would one choose to > use the ajp connector? i am assuming it's probably a more compact and > efficient protocol compared to http (not sure about that). The AJP protocol is designed to be used for webservers to communicate to Tomcat. For example, the mod_jk module for Apache is used to communicate with Tomcat, it proxies requests from Apache to Tomcat. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clustering question...
Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors vs maxThreads
thanks yoav. this begs another question... under what circumstances would one choose to use the ajp connector? i am assuming it's probably a more compact and efficient protocol compared to http (not sure about that). in any case, if one never needs to access tomcat directly from a browser (tomcat is always hidden behind apache on an internal network not accessible from the outside) what parameters should i use to judge whether to use http or ajp connectors? it seems like http is better (due to the fact that you can customize settings like maxThreads) but i was always under the impression that ajp should be preferred over http (i guess i was wrong) any thoughts on this? > > Howdy, > >>thanks yoav, i noticed that but then does that mean that there is no >>method to specify max threads/processors for the coyote ajp connector? >>that sounds a bit strange > > If it's not documented, then there's no configurable way to do it. Of > course, you can always subclass/extend a connector just like any other > tomcat element to add the behavior you want. > >>how does tomcat behave with the ajp connector? does it indefinitely > spawn >>threads to handle requests until it bombs out of memory? or is there >>behaviour as specified by the acceptcount/max processors for the http >>connector buried in the code of the ajp connector that can't be > modified? > > I don't use the AJP connector, so I can't answer that one, but the code > is open for you to inspect at your leisure... > > Yoav Shapira > > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, > proprietary and/or privileged. This e-mail is intended only for the > individual(s) to whom it is addressed, and may not be saved, copied, > printed, disclosed or used by anyone else. If you are not the(an) > intended recipient, please immediately delete this e-mail from your > computer system and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session sharing for multiple webapps
I've googled and googled and I can't find what I'm looking for. I'd like to deploy several small webapps that share a login method. (Several small ones, because I teach high school and my students will be working on them. I'd prefer to break only small amounts of functionality at any one time rather than the whole website.) Unfortunately, access to the individual servlets is fairly fine-grained and not amenable, at least as far as I can tell, to the built-in single login functionality. (For example, I have "/info/login.html" set to use the Info servlet, but only administrators or the login that's being accessed should be able to access the information. In the first few lines of the servlet, I use the session to determine the login and either accept or reject the request. Since every role should have access to the Info servlet, but not every user should be able to access all the information available from it, I don't know how the built-in access method helps me. If I'm mistaken, I'd love to here about it, though.) There's a pair of messages on an archive that mention sticking a singleton in $CATALINA_HOME/shared/lib or $CATALINA_HOME/common/lib to maintain sessions across multiple webapps, but they go no farther than mentioning it. Does anybody have a pointer with more information about how exactly to do this? I've been sticking a User object in the session which allows me easy access to login, role, etc., and I'd love to be able to continue doing that and share that user info between multiple webapps in the same container. If this hasn't been fleshed out anywhere that's publicly accessible, would someone like to flesh it out for me and posterity? Or talk me out of it. I'm open at this point... Thanks, Todd O'Bryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors vs maxThreads
Howdy, >thanks yoav, i noticed that but then does that mean that there is no >method to specify max threads/processors for the coyote ajp connector? >that sounds a bit strange If it's not documented, then there's no configurable way to do it. Of course, you can always subclass/extend a connector just like any other tomcat element to add the behavior you want. >how does tomcat behave with the ajp connector? does it indefinitely spawn >threads to handle requests until it bombs out of memory? or is there >behaviour as specified by the acceptcount/max processors for the http >connector buried in the code of the ajp connector that can't be modified? I don't use the AJP connector, so I can't answer that one, but the code is open for you to inspect at your leisure... Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maxProcessors vs maxThreads
Shapira, Yoav wrote: Howdy, there seems to be some confusion about whether to use maxThreads or maxProcessors and the effect on tomcat. futher it is not clear from the docs which one to use and whether they have an effect on the protocol used by the connector. Read the documentation carefully. The Coyote (HTTP) connector for Tomcat 5 supports parameters for max threads, spare threads, and other settings. The Coyote (HTTP) connector for tomcat 4 supports maxProcessors, minProcessors, and other settings. Anything not listed on these pages is not supported, meaning Coyote in Tomcat 5 does NOT support maxProcessors and Coyote in tomcat 4 does NOT support max threads. The AJP connector in tomcat 5, as its documentation states, does not support either max threads or maxProcessors. The docs lay it all out. For AJP, you're supposed to use the jk2.properties file. This is all in the JK docs, with the native connector docs. Some select parameters from jk2.properties could be set on the Connector element, but it seemed better to use only one configuration file for AJP, and I removed them from the documentation. -- x Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors vs maxThreads
thanks yoav, i noticed that but then does that mean that there is no method to specify max threads/processors for the coyote ajp connector? that sounds a bit strange how does tomcat behave with the ajp connector? does it indefinitely spawn threads to handle requests until it bombs out of memory? or is there behaviour as specified by the acceptcount/max processors for the http connector buried in the code of the ajp connector that can't be modified? thanks in advance. > > Howdy, > >>there seems to be some confusion about whether to use maxThreads or >>maxProcessors and the effect on tomcat. futher it is not clear from the >>docs which one to use and whether they have an effect on the protocol > used >>by the connector. > > Read the documentation carefully. The Coyote (HTTP) connector for > Tomcat 5 supports parameters for max threads, spare threads, and other > settings. The Coyote (HTTP) connector for tomcat 4 supports > maxProcessors, minProcessors, and other settings. Anything not listed > on these pages is not supported, meaning Coyote in Tomcat 5 does NOT > support maxProcessors and Coyote in tomcat 4 does NOT support max > threads. > > The AJP connector in tomcat 5, as its documentation states, does not > support either max threads or maxProcessors. The docs lay it all out. > > Yoav Shapira > > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, > proprietary and/or privileged. This e-mail is intended only for the > individual(s) to whom it is addressed, and may not be saved, copied, > printed, disclosed or used by anyone else. If you are not the(an) > intended recipient, please immediately delete this e-mail from your > computer system and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors vs maxThreads
Howdy, >there seems to be some confusion about whether to use maxThreads or >maxProcessors and the effect on tomcat. futher it is not clear from the >docs which one to use and whether they have an effect on the protocol used >by the connector. Read the documentation carefully. The Coyote (HTTP) connector for Tomcat 5 supports parameters for max threads, spare threads, and other settings. The Coyote (HTTP) connector for tomcat 4 supports maxProcessors, minProcessors, and other settings. Anything not listed on these pages is not supported, meaning Coyote in Tomcat 5 does NOT support maxProcessors and Coyote in tomcat 4 does NOT support max threads. The AJP connector in tomcat 5, as its documentation states, does not support either max threads or maxProcessors. The docs lay it all out. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: DataSource Realm
This isn't what I want to do. In this way, you described, the web application can also obtain a DataSource and so a connection to the user database. We have a tomcat admin, which sets up the user database. And a lot of people which writes web application. The tomcat admin wants to protect the userdatabase in the way that no application has access to it. Gernot -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Montag, 19. Jänner 2004 15:00 An: [EMAIL PROTECTED] Betreff: RE: DataSource Realm This is probably not the only way to accomplish what you want, but a simple one to code for. 1)Define your DataSource resource in of conf/server.xml. 2)Add a to the DataSource in the application context file in conf/Catalina//.xml This way the only applications that are able to access the datasource are the ones with a entry. -Original Message- From: ext Pfingstl Gernot [mailto:[EMAIL PROTECTED] Sent: Sunday, January 18, 2004 3:32 PM To: [EMAIL PROTECTED] Subject: DataSource Realm If I want to use a DataSourceRealm (tomcat 4.1) like I had to configure a JNDI named JDBC DataSource "java:/comp/env/jdbc/authority". So all web applications can also use this DataSource and can read the user-table - this is possibly a security hole. Is there a way to prohibit web applications to use this DataSource? Thanks, Gernot - 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]
maxProcessors vs maxThreads
there seems to be some confusion about whether to use maxThreads or maxProcessors and the effect on tomcat. futher it is not clear from the docs which one to use and whether they have an effect on the protocol used by the connector. could someone please clarify this... using tomcat 5.0.16: the JK2 AJP connector (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html) docs doesn't list any directive like maxProcessors or maxThreads. the HTTP connector does (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html) list a maxThreads directive. 1. is maxProcessors deprecated? 2. does maxProcessors and/or maxThreads apply to the AJP connector? 3. if i do set maxProcessors/maxThreads does the total number of maxThreads/maxProcessors across all tomcat instances in a load balanced setup need to equal/less than/greater than the apache serverlimit? example: - 2 apache servers with serverlimit 1024 each => total server limit = 2048 - 4 tomcat instances. - should maxProcessors be set to 2048/4 = 512 or less than/greater than that? 4. similiar questions as 1&2 for maxSpareThreads/maxIdleProcessors and minSpareThreads/minIdleProcessors. 5. does acceptCount work for both HTTP and AJP connectors? thanks in advance for clarifications. here is the ajp connector element in my server.xml do i set maxThreads, maxSpareThreads, minSpareThreads, acceptCount or maxProcessors, maxIdleProcessors, minIdleProcessors, acceptCount? apu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help, I have a headache .. servlet init troubles
Just a stab Did you back up a copy of your application such that you might have something like this? /tomcat /webapps /myapp /myapp_bak /ROOT /... Maybe Tomcat is attempting to load myapp_bak with default settings. -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 10:57 AM To: TOMCAT USER (E-mail) Subject: Please help, I have a headache .. servlet init troubles I am having the biggest headache ever with this. When I start Tomcat 1) Why is my controller servlet always initialised twice?? That is, as soon as all my logging has finished for one init, it all comes out again a second time! 2) In the init I get the following error when it tries to look at my JNDI datasource... 2004-01-19 15:35:28,764 INFO com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : dataSource: done 2004-01-19 15:35:28,764 ERROR com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : Init could not acquire connection from DataSource: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: null Cannot create JDBC driver of class '' for connect URL 'null' Yet shortly after it seems to have found my datasource perfectly ok because calls work... 2004-01-19 15:36:44,828 DEBUG com.qas.newmedia.intranet.iq.base.navigation.NavigationManager.init(Unknown Source) : CONNECTIOINIT [EMAIL PROTECTED] My JNDI resouce is below (clearly a URL DOES exist). Thank you all! ADC -- snip -- factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver url jdbc:microsoft:sqlserver://server:1433 username sa password pass maxActive 50 maxIdle 10 maxWait 1 validationQuery SELECT 1 + 1 logAbandonedtrue removeAbandonedtrue --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - 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: OracleConnection datasource CLOB.createTemporary
Note that you MUST NOT close the Connection returned by DelegatingConnection.getInnermostDelegate, and you MUST close (i.e., return to the pool) the DelegatingConnection from which you got the delegate OracleConnection once you're finished with the OracleConnection. -john. -Original Message- From: Kahle, Pavel (GE Consumer Finance) [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 6:54 AM To: Tomcat Users List Subject: RE: OracleConnection datasource CLOB.createTemporary I've figured it out using this code : public void init(ServletConfig config) throws ServletException { .. ds lookup ((BasicDataSource) ds).setAccessToUnderlyingConnectionAllowed(true); ... protected OracleConnection getConnection() throws SQLException ,NamingException { return ( (OracleConnection) ( (DelegatingConnection ) ds.getConnection() ).getInnermostDelegate()); >-Original Message- >From: Rob Augustinus [mailto:[EMAIL PROTECTED] >Sent: Sunday, January 18, 2004 2:04 PM >To: Tomcat Users List >Subject: Re: OracleConnection datasource CLOB.createTemporary > > > >how about typcasting the DBCP Connection to OracleConnection ? >afaik this is the proper way? > >Kahle, Pavel (CONS FIN) wrote: > >>somwehere in the CLOB.createTemporary is Connection retype to >>OracleConnection but Connection returned from DBCP >DataSource.getConnection >>is not assignable to that class. I can create clob in DB but I prefer >>CLOB.createTemporary is there any solution to use >CLOB.createTemporary with >>DBCP? >>Thank Pavel Kahle >> >> >> >>- >>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: Need an Idea - appending #tag after someurl.jsp ?
Mufaddal, You can set location.hash='myNamedTarget' once the page has finished loading into the browser. See attached. -john. -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 6:07 PM To: Tomcat Users List Subject: Re: Need an Idea - appending #tag after someurl.jsp ? I set a request attribute before forwarding the request to JSP. Does anybody have some javascript that would allow me to jump to a an anchor within that page ? On Jan 15, 2004, at 3:55 PM, Hume, John - NA US HQ Delray wrote: > Is the servlet doing a RequestDispatcher.forward or HTTP redirecting? > It > seems a response.sendRedirect (HTTP redirect) would work, assuming > your JSP > doesn't need the data from the form POST request. If it DOES need to > share > the request with the servlet, then I believe the HTML form action will > have > to include the #tag. > > The other way to go would be JavaScript in the JSP that looks at a > request > parameter or something else in the URI, which doesn't strike me as > pretty, > but others may like. Note that JavaScript won't see request > parameters that > you add in a RequestDispatcher.forward, so here again the form (if > it's a > GET) or form action (if it's a POST) would have to include something > for the > JS to see. > > -john. > > > -Original Message- > From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 15, 2004 5:45 PM > To: Tomcat Users List > Subject: Need an Idea - appending #tag after someurl.jsp ? > > > hi, > > I have a page called First.jsp. I have a on it. When i > submit a form to a servlet, the servlet needs to forward me to > First.jsp#tag. Problem is i get the following message when i try to do > this: > > type: Status report > message: /First.jsp#tag > description: The requested resource (/First.jsp#tag) is not available. > > if it were: First.html#tag it would have worked, but for a jsp .. Any > Ideas to get the same effect? > > > - > 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]
How to access a Cluster using JMX
Hi, I am working on setting up a cluster environment using Tomcat 5. I was wondering if there is a way to access the Cluster object using JMX API. If anyone has done this, could you please e-mail me sample code or instructions. Thanks Srini _ Scope out the new MSN Plus Internet Software optimizes dial-up to the max! http://join.msn.com/?pgmarket=en-us&page=byoa/plus&ST=1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using CA-issued certificates in Tomcat 5
DOCUMENTATION MAINTAINERS: Please read. Contact me if you have questions. Mark: Thanks, your comments were key to figuring things out the problem. Apparently the docs are out of date and incompatible with current the JDK/Tomcat5 behavior. I still don't know why keytool refuses the .p7b keys. FRUSTRATED CERTIFICATE USERS (like I was): Here are steps that work for CA-issued test certs 0) Use the default Tomcat keystore and key password "changeit" anytime you are asked for a password. You can always use something else after you get things working. 1) Delete (or rename) the keystore with the self signed cert you created following the Tomcat docs. 2) Create a new keystore and personal key pair. Ignore the docs and DO NOT USE "tomcat" as the alias. If you do, you will not be able to import the CA's key as "tomcat". Use: keytool -genkey -alias mykey -keyalg RSA 3) Generate a CSR using your key: keytool -certreq -keyalg RSA -alias mykey -file certreq.csr 4) Use the CSR to get a X.509 certificate (PKCS#7 don't work anymore) from a CA. Don't use Verisign - their tech support does not understand Tomcat (and I assume Java) and all they would do is parrot the docs verbatim, then blame Tomcat for not working. Thawte worked for me, but you must ignore their (obsolete) recommendation to use PKCS#7. 5) Install the CA's root test certificates in your browsers. 6) At least for Thawte, DO NOT get/install an intermediate or chain certificate. That means you ignore the step in the docs that tells you to do "keytool -import -alias root -trustcacerts -file ". 7) Install the X.509 cert: keytool -install -alias tomcat -file svrcert.cer 8) DONE!!! You may look at your certs/keys with "keytool -list". You should see mykey and tomcat. -Original Message- From: ext Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 12:38 PM To: 'Tomcat Users List' Subject: RE: Using CA-issued certificates in Tomcat 5 I am using 1.4.2_03 without any problems and have successfully imported various certs (versign, self-signed and Windows cert server signed). I have never tried to import a CA signed cert on top of a self signed cert. To be honest, I would expect it to fail. This may be the cause of your problem. Can you try generating a key, not signing it yourself and sending that to be signed by the CA? Also, can you confirm that you did the format conversion as described below. Mark > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 2:49 PM > To: [EMAIL PROTECTED] > Subject: RE: Using CA-issued certificates in Tomcat 5 > > keytool in JDK 1.4.2_03 no longer seems to accept PKCS#7 > certificates by default and I have not found a parameter to > tell it to use them. > > When I do as you suggested (or download a Thawte pkcs#7 > certificate) I get "keytool error: java.lang.Exception: > Input not an X.509 certificate". > > Also, keytool does not not allowing the import for the cert > under the "tomcat" alias if the self-signed cert is already > in the keystore with the alias "tomcat". > > Can it be that Sun royally messed up the keytool > implementation when moving from PKCS#7 to X.509 certificates? > > -Original Message- > From: ext Mark Thomas [mailto:[EMAIL PROTECTED] > Sent: Friday, January 16, 2004 5:20 PM > To: 'Tomcat Users List' > Subject: RE: Using CA-issued certificates in Tomcat 5 > > > Try this - don't delete the alias before importing the response. > > What happens is: > > keytool -genkey -alias tomcat -keyalg RSA > Creates your private and public key > > keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr > wraps a copy of your _public_ key in a certficate request > > ... got the certs... > CA uses their private key to sign your public key - this is > essentially your > certificate > > keytool -delete -alias tomcat > This deletes your private key. This is bad. > > keytool -import -alias root -trustcacerts -file rootcert.cer > (root/intermediate/chain cert, as appropriate for the CA) > Adds the public key of your CA to your trusted certs. > > keytool -import -alias tomcat -trustcacerts -file testcert.cer > With your private key still in place, this replaces your > unsigned public key > with a signed public key > > You may find that the format the cert comes back in is not > compatible with > keytool. I normally do the following: > 1. In windows, change extension to .cer > 2. Double click on .cer file. > 3. On "Details" tab click "Copy to file..." > 4. Select the .p7b output format and tick the box to include > all certs in path. > 5. Specify a file name. > 6. Use key tool to import this file. > > Sorry this is a windows solution but if you don't use windows > as along as you > can get access to a windows box you should be able to do this. > > Mark > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Frida
serialization (tomcat)
Hi A have problem with serialization of objects in tomcat. I wrote something like this: servlet: _package tunelowanie_http; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class DataStreamEcho extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, java.io.IOException { String text = "Hi"; resp.setContentType("application/x-java-serialized-object"); //resp.setContentType("application/octet-stream"); ObjectOutputStream out = new ObjectOutputStream(resp.getOutputStream()); out.writeObject(text); out.flush(); } } __ APPLICATION: __ package tunelowanie_http; import java.io.*; public class TestDataStream { public static void main(String args[]) { if (args.length == 0) { System.out.println("\nServlet URL must be specified"); return; } try { System.out.println("Attempting to connect to " + args[0]); java.net.URL url = new java.net.URL(args[0]); java.net.URLConnection con = url.openConnection(); con.setRequestProperty("Content-type","application/x-java- serialized-object"); //con.setRequestProperty("Content-type","application/octet-stream"); con.setUseCaches(false); System.out.println("Reading response"); ObjectInputStream in = new ObjectInputStream(con.getInputStream()); String returned = (String)in.readObject(); in.close(); System.out.println("Data read: " + returned ); } catch (Exception ex) { ex.printStackTrace(); } } } When i'm using "application/x-java-serialized-object" it seems tomcat does not recognize this type when i'm using "application/octet-stream" its connecting but it returns objectinputstream Exception: wrong header or sth. this same happens when i want to send single number using: writeInt readInt writeBoolean readBoolean [i dont have code with me right now so i dont remember exactly] but when i sent e.g. int 5, i recive int 26487485 it seems tomcat write some prefixes in both examples im sure that it is problem of tomcat because i can serialize objets to file and read them back. -- Pozdrowienia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with jk2 on IIS 5.0 and Tomcat 4.0
Rasmus, I didn't manage to get the T4.0 jk2.02 IIS5 combi to work either. It worked for me with an older jk2.01 bin. Another user at this forum suggested to use a jk2.shm file with size power of 2. If you have the possibility to upgrade to Tomcat 4.1.29 you can try our jk2 installer at http://www.shiftomat.com/opensource , but you have to remove your manual setup before. hope this helps Rasmus Munk wrote: Tried it, but it still does not work. Mostly the requests is passed to tomcat correctly. The log then look like this: [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (288)] [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (93)] Into .. jk_ws_service_t::write [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (515)] HttpExtensionProc service() returned OK It seems like an error occurs: Error sending initial post -1 0 0. Does anyone know what this means? Even though the log says: HttpExtensionProc service() returned OK, a response is never returned. The browser simply gets a timeout! Any help would be greatly appreciated Thanks, Rasmus -Original Message- From: Jeff Trout [mailto:[EMAIL PROTECTED] Sent: 19. januar 2004 13:39 To: Rasmus Munk Cc: [EMAIL PROTECTED] Subject: Re: Problems with jk2 on IIS 5.0 and Tomcat 4.0 On Fri, 16 Jan 2004 15:54:00 EST "Rasmus Munk" <[EMAIL PROTECTED]> wrote: HttpFilterProc [/camping_lars/servlet/camping.XMLServer.Server] is a servlet url - should redirect to ajp13:localhost:8009 HttpFilterProc check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing to the web-inf directory HttpFilterProc started In HttpFilterProc Virtual Host redirection of localhost : 80 HttpFilterProc [/jakarta/isapi_redirector2.dll] is not a servlet url HttpFilterProc check if [/jakarta/isapi_redirector2.dll] is pointing to the web-inf directory HttpExtensionProc started HttpExtensionProc could not get a worker for name HttpExtensionProc worker is NULL I just recently spent a few days struggling with this 1. Did you setup the /jakarta/ virtual dir properly (pointing it to the dir that has isapi_redirector2.dll? 2. Did you install isapi_redirector2.dll at the server or site level? I found on w2k sp4 that I had to install it at the SITE level... Oddly it worked fine at the server level on sp2. If I get some time I'll investigate more. Good luck! -- Jeff Trout <[EMAIL PROTECTED]> Global Engineering / Terra Lycos - 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] -- Daniel Schmitt shiftomat Chat Systems http://www.shiftomat.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTTP tunneling
Hello eveybody, I am using tomcat for the first time. Using tomcat , i was able to invoke a simple servlet that shows data acceted by a form but i was unable to invoke a sevlet from an applet. I want to invoke a servlet using Java URL class and OpenConnection method but it doesn't work. The servlet is not invoked , even i don't get any HTTP error message. Can any one tell what is the problem? How can i know what is the exact problem. Do i need to change any configuration options? __ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: out of memory problem. Help!
This did not work for me in 4.1.29 since the only way to do this is to set minProcessors==maxProcessors but that did not have any effect in 4.1.29. I am not sure whether I could use xxxThreads there but downgrading to 4.1.27 did help. For those using 5.0.16 this can help - Filip thanks for finding out. Best, David Filip Hanik wrote: set maxSpareThreads=minSpareThreads=maxThreads will cause the system to never shrink the pool Filip -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of David Strupl Sent: Monday, January 19, 2004 9:58 AM To: [EMAIL PROTECTED] Subject: Re: out of memory problem. Help! Remy Maucherat wrote: This is not true: there's indeed a memory leak with 5.0.16, but it would occur only with specific traffic patterns. It will not bring a server down in just a few requests. Indeed. The thread pool has to grow and shrink for this to happen. Unfortunatelly quite common e.g. day and night traffic. D. - 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: out of memory problem. Help!
set maxSpareThreads=minSpareThreads=maxThreads will cause the system to never shrink the pool Filip -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of David Strupl Sent: Monday, January 19, 2004 9:58 AM To: [EMAIL PROTECTED] Subject: Re: out of memory problem. Help! Remy Maucherat wrote: > This is not true: there's indeed a memory leak with 5.0.16, but it would > occur only with specific traffic patterns. It will not bring a server > down in just a few requests. Indeed. The thread pool has to grow and shrink for this to happen. Unfortunatelly quite common e.g. day and night traffic. D. - 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: Apache 2.048 + Tomcat 5 + Win 2k
I, too, am having difficulty getting Apache 2.0.48 to load Tomcat 4.1.29 in-process. Apache installed and runs just fine, Tomcat installed and runs just fine on it's own (I can access the examples JSPs and servlets, etc.) and I'm using the latest mod_jk2.dll (in the Apache2\modules directory). I used this link http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html to perform the installations. The server.xml file is "out of the box" unchanged. I added LoadModule jk2_module modules/mod_jk2.dll to the httpd.conf file (this was the only change). Here's my jk2.properties file: ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED ## WHEN YOU EDIT THE FILE. ## COMMENTS WILL BE _LOST_ ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. # Set the desired handler list # handler.list=apr,request,channelJni # # Override the default port for the socketChannel # channelSocket.port=8019 # Default: # channelUnix.file=${jkHome}/work/jk2.socket # Just to check if the the config is working shm.file=${jkHome}/work/jk2.shm # In order to enable jni use any channelJni directive channelJni.disabled = 0 # And one of the following directives: # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so # If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 apr.jniModeSo=inprocess Here's my workers2.properties file: [vm:] info=Parameters used to load a JVM in the server process #JVM=C:\jdk\jre\bin\hotspot\jvm.dll OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;${CATALINA_HOME}/s erver/lib/commons-logging.jar OPT=-Dtomcat.home=${CATALINA_HOME} OPT=-Dcatalina.home=${CATALINA_HOME} OPT=-Xmx128M #OPT=-Djava.compiler=NONE disabled=0 [logger] level=DEBUG [config:] #file=${serverRoot}/conf/workers2.properties file=c:/Apache2/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger #[logger.file:0] #level=DEBUG #file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues #logger=logger.file:0 [lb:lb] info=Default load balancer. debug=0 #[lb:lb_1] #info=A second load balancer. #debug=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 #[channel.socket:localhost:8019] #info=A second tomcat instance. #debug=0 #tomcatId=localhost:8019 #lb_factor=1 #group=lb #group=lb_1 #disabled=0 #[channel.un:/opt/33/work/jk2.socket] #info=A second channel connecting to localhost:8019 via unix socket #tomcatId=localhost:8019 #lb_factor=1 #debug=0 [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [worker.jni:onStartup] info=Command to be executed by the VM on startup. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter ARG=start disabled=0 stdout=c:/Apache2/logs/stdout.log stderr=c:/Apache2/logs/stderr.log [worker.jni:onShutdown] info=Command to be executed by the VM on shutdown. This one will stop tomcat. class=org/apache/jk/apr/TomcatStarter ARG=stop disabled=0 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: #[uri:127.0.0.1:8003] #info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it #alias=myVirtualHost:8003 #[uri:127.0.0.1:8003/ex] #info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 ) #context=/ex #group=lb_1 [uri:/examples] info=Example webapp in the default context. context=/examples debug=0 #[uri:/examples1/*] #info=A second webapp, this time going to the second tomcat only. #group=lb_1 #debug=0 [uri:/examples/servlets/*] info=Prefix mapping [uri:/examples/*.jsp] info=Extension mapping [uri:/examples/*] info=Map the whole webapp [uri:/examples/servlets/HelloW] info=Exampel with debug enabled. debug=10 Here's the Apache2\logs\error.log [Mon Jan 19 10:53:20 2004] [notice] Parent: Created child process 2852 [Mon Jan 19 10:53:21 2004] [notice] Child 2852: Child process is running [Mon Jan 19 10:53:21 2004] [notice] jk2_init() Found child 2852 in scoreboard slot 0 [Mon Jan 19 10:53:21 2004] [notice] vm.init(): Jni lib: C:\Program Files\JavaSoft\JRE\1.3.1_03\bin\hotspot\jvm.dll [Mon Jan 19 10:53:21 2004] [notice] vm.open2() done [Mon Jan 19 10:53:21 2004] [notice] jni.validate() class= org/apache/jk/apr/TomcatStarter [Mon Jan 19 10:53:21 2004] [notice] Loaded org/apache/jk/apr/TomcatStarter [Mon Jan 19 10:53:21 2004] [error] Can't find class org/apache/jk/apr/AprImpl java.lang.NoClassDefFoundError: javax/management/MBeanRegistration at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoade
RE: Using CA-issued certificates in Tomcat 5
I am using 1.4.2_03 without any problems and have successfully imported various certs (versign, self-signed and Windows cert server signed). I have never tried to import a CA signed cert on top of a self signed cert. To be honest, I would expect it to fail. This may be the cause of your problem. Can you try generating a key, not signing it yourself and sending that to be signed by the CA? Also, can you confirm that you did the format conversion as described below. Mark > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 2:49 PM > To: [EMAIL PROTECTED] > Subject: RE: Using CA-issued certificates in Tomcat 5 > > keytool in JDK 1.4.2_03 no longer seems to accept PKCS#7 > certificates by default and I have not found a parameter to > tell it to use them. > > When I do as you suggested (or download a Thawte pkcs#7 > certificate) I get "keytool error: java.lang.Exception: > Input not an X.509 certificate". > > Also, keytool does not not allowing the import for the cert > under the "tomcat" alias if the self-signed cert is already > in the keystore with the alias "tomcat". > > Can it be that Sun royally messed up the keytool > implementation when moving from PKCS#7 to X.509 certificates? > > -Original Message- > From: ext Mark Thomas [mailto:[EMAIL PROTECTED] > Sent: Friday, January 16, 2004 5:20 PM > To: 'Tomcat Users List' > Subject: RE: Using CA-issued certificates in Tomcat 5 > > > Try this - don't delete the alias before importing the response. > > What happens is: > > keytool -genkey -alias tomcat -keyalg RSA > Creates your private and public key > > keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr > wraps a copy of your _public_ key in a certficate request > > ... got the certs... > CA uses their private key to sign your public key - this is > essentially your > certificate > > keytool -delete -alias tomcat > This deletes your private key. This is bad. > > keytool -import -alias root -trustcacerts -file rootcert.cer > (root/intermediate/chain cert, as appropriate for the CA) > Adds the public key of your CA to your trusted certs. > > keytool -import -alias tomcat -trustcacerts -file testcert.cer > With your private key still in place, this replaces your > unsigned public key > with a signed public key > > You may find that the format the cert comes back in is not > compatible with > keytool. I normally do the following: > 1. In windows, change extension to .cer > 2. Double click on .cer file. > 3. On "Details" tab click "Copy to file..." > 4. Select the .p7b output format and tick the box to include > all certs in path. > 5. Specify a file name. > 6. Use key tool to import this file. > > Sorry this is a windows solution but if you don't use windows > as along as you > can get access to a windows box you should be able to do this. > > Mark > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, January 16, 2004 11:03 PM > To: [EMAIL PROTECTED] > Subject: Using CA-issued certificates in Tomcat 5 > > I thought I had all my Tomcat issues resolved and was ready > to go from the > self-signed cert to one issued by a CA. So I followed all > the steps, generated > a CSR, got the root cert and test cert, installed them into > the keytool, and > restarted the server. An exception is thrown saying: > > No available certificate corresponds to the SSL cipher > suites which are enabled > > > > > - > 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]
Global DataSource
Hello Everyone: I'm using a global DataSource and everything's working fine and I thank the developers for a great work. I noticed a strange behaviour, though: If I configure the DataSource in an application Context the NamingContextListener prints all the resource parameters in the log. If I configure it in the GlobalNamingResources of the server.xml instead, I obtain NamingContextListener[my_app_path]: Resource parameters for jdbc/mydb = null NamingContextListener[my_app_path]: Adding resource link jdbc/mydb Setup: - Tomcat 5.0.16 - Windows XP (I know... it's just for developing) - PostgreSQL 7.3.2 Is this a bug? A strange feature? --- Julio César Aguilar Cabrera [EMAIL PROTECTED] Proyecto SIGC3, LANIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying "busy page" while servlet/JSP running
"Chris Ward" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all, Does anyone have a recommended way of displaying a "busy" page while tomcat executes a servlet or JSP? I've done this before using JavaScript to flip the display to "busy" on the client, but I wondered if there was a more generic way using Filters or something. Many thanks as always, Chris Try this: I'm busy now. <% out.flush(); // run code here %> I'm done. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: out of memory problem. Help!
Remy Maucherat wrote: This is not true: there's indeed a memory leak with 5.0.16, but it would occur only with specific traffic patterns. It will not bring a server down in just a few requests. Indeed. The thread pool has to grow and shrink for this to happen. Unfortunatelly quite common e.g. day and night traffic. D. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help, I have a headache .. servlet init troubles
Allistair Crossley wrote: no, it's one host, Cheers, ADC And one Connector element? (commonly 8009 for CoyoteConnector and 8080 for standalone are defined in the default server.xml) I'm purely clutching at straws here. Maybe you could post your /WEB-INF/web.xml and the $CATALINA_HOME/conf/server.xml files? James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where to install Tomcat on Linux?
anywhere you want. I usually install in /usr/local/jakarta-tomcat. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 17:51 To: [EMAIL PROTECTED] Subject: Where to install Tomcat on Linux? In what directory should I install Tomcat on Linux? There is no indication in the docs of a standard location. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where to install Tomcat on Linux?
In what directory should I install Tomcat on Linux? There is no indication in the docs of a standard location. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying "busy page" while servlet/JSP running
Hi all, Does anyone have a recommended way of displaying a "busy" page while tomcat executes a servlet or JSP? I've done this before using JavaScript to flip the display to "busy" on the client, but I wondered if there was a more generic way using Filters or something. Many thanks as always, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: out of memory problem. Help!
Allistair Crossley wrote: This is very interesting to hear. I can believe it too...we lose between 400K and 5MB per request and Tomcat 5.0.16 bombs out at 155. We have invested in JProfiler now to see why but your comment is curious. Are you on the development team? When will 5.0.18 become stable...does not seem to be a binary download yet I suggest you continue investigating with your profiler: you have a different problem. -Original Message- From: David Strupl [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 17:00 To: [EMAIL PROTECTED] Subject: Re: out of memory problem. Help! If you use tomcat 5.0.x upgrade to 5.0.18. If you use 4.1.x downgrade to 4.1.27. There is a significant memory leak in tomcat in 5.0.16, 4.1.28(29). This is not true: there's indeed a memory leak with 5.0.16, but it would occur only with specific traffic patterns. It will not bring a server down in just a few requests. -- x Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tip: Eclipse 3.0, Ant 1.5.4, Tomcat 5.0 Manager Ant tasks
Here's how to install the Tomcat 5.0 Manager Ant tasks into the Eclipse 3.0 Ant plugin: 1. Copy $CATALINA_HOME/server/lib/catalina-ant.jar to $ECLIPSE_HOME/plugins/org.apache.ant_1.5.4/. 2. Insert the following library element into $ECLIPSE_HOME/plugins/org.apache.ant_1.5.4/plugin.xml (see attached file): 3. Restart Eclipse, display the Ant view, add a new Tomcat Ant build file. You should see all the Tomcat Manager Ant tasks such as deploy, list, reload, undeploy. Eclipse The best Java development environment on the planet. http://www.eclipse.org Apache Ant http://ant.apache.org Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: virtual hosting and tomcat wt Apache 2 and JK2
You probably have this bug(different than the other one posted) http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22045 The only solution I have found is to map each virtualhost/dir in your workers2.properties that should go to tomcat. While a PITA(at least for me), it does work. See this link for an example. http://www.aexx.net/arcane/article.jsp?article=tomcat4-apache2-jk2 These are the only 2 things that I have found about this issue. Charlie > -Original Message- > From: Brennon Obst [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 1:02 AM > To: 'Tomcat Users List' > Subject: RE: virtual hosting and tomcat wt Apache 2 and JK2 > > Thank you Martina, > > I will check my version and report back =/ > > /Brennon > > -Original Message- > From: Frankl Martina [mailto:[EMAIL PROTECTED] > Sent: Friday, 16 January 2004 10:23 PM > To: Brennon Obst; 'Tomcat Users List' > Subject: AW: virtual hosting and tomcat wt Apache 2 and JK2 > > > Maybe your jk2 version still has this bug: > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18472 > > hth > Martina > > > > -Ursprüngliche Nachricht- > > Von: Brennon Obst [mailto:[EMAIL PROTECTED] > > Gesendet: Freitag, 16. Januar 2004 05:43 > > An: 'Tomcat Users List' > > Betreff: virtual hosting and tomcat wt Apache 2 and JK2 > > > > > > > > Dear usergroup, > > > > When I activated the following in my Apache 2 config within > > the VirtualHost > > block for x.xxx.net: > > > > JkUriSet worker ajp13:localhost:8009 > > > > > > > > ALL of my virtual hosts stopped working and started > > complaining of not being > > able to find /index.jsp > > > > It is like the wasn't confined to the > > VirtualHost but rather > > became a server wide configuration. > > > > When I activated the apache<-->tomcat connection it took over > > ALL of the > > virtual hosts and was routing them through Tomcat, does > > anyone know how to > > stop that? > > > > Is it my Apache 2 and JK2 connectors, where do I turn now? Thank you > > in advance, > > > > Brennon Obst > > > > > > Java Security Programmer > > iEnergy Main Branch > > 39 Melbourne St. / Brisbane > > p. (617) 3846- > > [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: out of memory problem. Help!
I am not on the developer team. But spent quite a lot of hours (days) latelly with figuring out why my copy of tomcat (4.1.29) leaks memory. The information bellow is based on the info from the dev mailing list + a thread on this mailing list with subject "Tomcat Tuning Memory leak" from last couple of days (weeks). I am still testing 4.1.27 and all seems fine so far. Re 5.0.18: thats a revision where the fix was commited - please check the dev mailing list with subject "Found it - WAS: Memory leak" and "RE: [5.0.18] Build available". Hope this helps, David Allistair Crossley wrote: This is very interesting to hear. I can believe it too...we lose between 400K and 5MB per request and Tomcat 5.0.16 bombs out at 155. We have invested in JProfiler now to see why but your comment is curious. Are you on the development team? When will 5.0.18 become stable...does not seem to be a binary download yet Cheers ADC -Original Message- From: David Strupl [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 17:00 To: [EMAIL PROTECTED] Subject: Re: out of memory problem. Help! If you use tomcat 5.0.x upgrade to 5.0.18. If you use 4.1.x downgrade to 4.1.27. There is a significant memory leak in tomcat in 5.0.16, 4.1.28(29). Hope this helps, David Christian Witucki wrote: We fixed our session timeout to 15 minutes for 100 users and Tomcat hasn't crashed for 36 hours. Does anyone know how we can adjust for the possibilities of 1000's of users??? Christian Witucki Network Analyst 375 Essjay Road Williamsville, NY 14221 716-631-3001 x3812 CONFIDENTIALITY NOTICE. This e-mail and attachments, if any, may contain confidential information which is privileged and protected from disclosure by Federal and State confidentiality laws, rules or regulations. This e-mail and attachments, if any, are intended for the designated addressee only . If you are not the designated addressee, you are hereby notified that any disclosure, copying, or distribution of this e-mail and its attachments, if any, may be unlawful and may subject you to legal consequences. If you have received this e-mail and attachments in error, please contact Independent Health immediately at (716) 631-3001 and delete the e-mail and its attachments from your computer. Thank you for your attention. [EMAIL PROTECTED] 01/19/04 01:20AM >>> Check session-timeout in web.xml. -1 is never timeout -1 -Original Message- From: Christophe Andreoli [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 9:19 PM To: Tomcat Users List Subject: Re: out of memory problem. Help! "Shapira, Yoav" wrote: Howdy, root cause java.lang.OutOfMemoryError It happens When the corresponding request returns more than 2-3 rows from the database, not every time Perhaps you should allocate your JVM more memory, by using the Java -Xmx parameter. I did it and I gave 512 Mb. It works better but why are the 2000 objects are not garbaged after each request ? Alternatively, consider a system design that retrieves a smaller, fixed number of rows instead of "2-3" and lets the user scroll, say 100 rows at a time. Yoav Shapira - 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] --- QAS Ltd. Developers of QuickAddress Software href="http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pushlets and HTTP connectors
Hi, I have been doing some work with making pushlet (http://www.pushlets.com) applications deployed in Tomcat. The basic idea of pushlets is to keep open a persistent http connection to allow real-time ui updates, see the link for more details. I'm having some reliability problems in IE though. If I load a page which contains a persistent connection + many images, IE will intermittently deadlock, resulting in me having to kill the process via the task manager. The problem seems to stem from the fact that the HTTP 1.1 spec says that you can only have a maximum of 2 connection to a single HTTP server. I managed to circumvent the problem by creating 2 HTTP 1.1 connectors (on 2 different ports), using 1 for the persistent connection and the other for everything else. Everything worked fine in this situation. It looks like IE has some issues with trying to load multiple images with a single HTTP connection. The same problem doesn't exist with Mozilla BTW... Unfortunately for me it is unacceptable for this application to run with 2 open ports, it has to run through a single port (it's out of my control). I tried running Tomcat with a single HTTP 1.0 connector (IE will use 4 simultaneous connections for HTTP 1.0), which worked great. However using HTTP 1.0 caused many of my large html forms to break (the browser just shows a blank page). What I really need is an HTTP 1.1 connector which will fall back to HTTP 1.0 for certain urls. I have looked at the connector source code, but it seems to be quite complicated. Has anyone else ever tried to do this? Would it be possible to make such a connector? Thanks, Matt Preston - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out of memory problem. Help!
This is very interesting to hear. I can believe it too...we lose between 400K and 5MB per request and Tomcat 5.0.16 bombs out at 155. We have invested in JProfiler now to see why but your comment is curious. Are you on the development team? When will 5.0.18 become stable...does not seem to be a binary download yet Cheers ADC -Original Message- From: David Strupl [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 17:00 To: [EMAIL PROTECTED] Subject: Re: out of memory problem. Help! If you use tomcat 5.0.x upgrade to 5.0.18. If you use 4.1.x downgrade to 4.1.27. There is a significant memory leak in tomcat in 5.0.16, 4.1.28(29). Hope this helps, David Christian Witucki wrote: > We fixed our session timeout to 15 minutes for 100 users and Tomcat > hasn't crashed for 36 hours. Does anyone know how we can adjust for > the possibilities of 1000's of users??? > > Christian Witucki Network Analyst 375 Essjay Road Williamsville, NY > 14221 716-631-3001 x3812 > > CONFIDENTIALITY NOTICE. This e-mail and attachments, if any, may > contain confidential information which is privileged and protected > from disclosure by Federal and State confidentiality laws, rules or > regulations. This e-mail and attachments, if any, are intended for > the designated addressee only . If you are not the designated > addressee, you are hereby notified that any disclosure, copying, or > distribution of this e-mail and its attachments, if any, may be > unlawful and may subject you to legal consequences. If you have > received this e-mail and attachments in error, please contact > Independent Health immediately at (716) 631-3001 and delete the > e-mail and its attachments from your computer. Thank you for your > attention. > > [EMAIL PROTECTED] 01/19/04 01:20AM >>> > > > Check session-timeout in web.xml. -1 is never timeout > -1 > > -Original Message- From: Christophe Andreoli > [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 9:19 PM To: > Tomcat Users List Subject: Re: out of memory problem. Help! > > "Shapira, Yoav" wrote: > >> Howdy, >> >> >>> root cause >>> >>> java.lang.OutOfMemoryError >>> >>> >>> It happens When the corresponding request returns more than > > 2-3 > >>> rows from the database, not every time > > > > > >> Perhaps you should allocate your JVM more memory, by using the Java >> > > -Xmx > >> parameter. > > > I did it and I gave 512 Mb. > > It works better but why are the 2000 objects are not garbaged after > each request ? > > > > > > > > > Alternatively, consider a system design that retrieves a > >> smaller, fixed number of rows instead of "2-3" and lets the >> > > user > >> scroll, say 100 rows at a time. >> >> Yoav Shapira >> > > > - > 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] --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Running multiple JVMs
Or you can have one IP and get multiple tomcat's listening on different ports and get your balancer to route to each of them. Multiple IP's are not necessary if you need to use a balancer. Donie -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:52 To: Tomcat Users List Subject: RE: Running multiple JVMs An additional remark: Only one process can listen on port 80 at a time on the !!! same IP !!!. You can define several IP's on one machine and thus can have several services that listen on port 80. (One for each IP) > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 5:42 PM > To: Tomcat Users List > Subject: RE: Running multiple JVMs > > Only one process can listen on port 80 at a time. > - 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]
Any success with JDK 1.4.2_03 + Tomcat 5 + CA-issued test certificate?
Has anyone had success using a test certificate from Verisign or other Certificate Authority using JDK 1.4.2_03 and Tomcat 5? Sun changed defaults in the JDK in the recent past (like using X.509 certs instead of PKCS#7, and apparently the list of default ciphers) and now Tomcat chokes on Verisign and Thawte certs because those certs don't have ciphers supported by default. Using a self-signed certificate works fine. Bruno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help, I have a headache .. servlet init troubles
I've seen this before but I can't remember the solution. Search the archives. Donie -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:45 To: Tomcat Users List Subject: RE: Please help, I have a headache .. servlet init troubles no, it's one host, Cheers, ADC -Original Message- From: James Neville [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:31 To: Tomcat Users List Subject: Re: Please help, I have a headache .. servlet init troubles Allistair Crossley wrote: >Do you know why my servlet initalises twice? That's my remaining issue.. > If you are specifying multiple hosts, all running from the same appBase, then each web application will be deployed to each host. If this is the case, run each host from a different appBase so that you don't double deploy. James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - 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: out of memory problem. Help!
If you use tomcat 5.0.x upgrade to 5.0.18. If you use 4.1.x downgrade to 4.1.27. There is a significant memory leak in tomcat in 5.0.16, 4.1.28(29). Hope this helps, David Christian Witucki wrote: We fixed our session timeout to 15 minutes for 100 users and Tomcat hasn't crashed for 36 hours. Does anyone know how we can adjust for the possibilities of 1000's of users??? Christian Witucki Network Analyst 375 Essjay Road Williamsville, NY 14221 716-631-3001 x3812 CONFIDENTIALITY NOTICE. This e-mail and attachments, if any, may contain confidential information which is privileged and protected from disclosure by Federal and State confidentiality laws, rules or regulations. This e-mail and attachments, if any, are intended for the designated addressee only . If you are not the designated addressee, you are hereby notified that any disclosure, copying, or distribution of this e-mail and its attachments, if any, may be unlawful and may subject you to legal consequences. If you have received this e-mail and attachments in error, please contact Independent Health immediately at (716) 631-3001 and delete the e-mail and its attachments from your computer. Thank you for your attention. [EMAIL PROTECTED] 01/19/04 01:20AM >>> Check session-timeout in web.xml. -1 is never timeout -1 -Original Message- From: Christophe Andreoli [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 9:19 PM To: Tomcat Users List Subject: Re: out of memory problem. Help! "Shapira, Yoav" wrote: Howdy, root cause java.lang.OutOfMemoryError It happens When the corresponding request returns more than 2-3 rows from the database, not every time Perhaps you should allocate your JVM more memory, by using the Java -Xmx parameter. I did it and I gave 512 Mb. It works better but why are the 2000 objects are not garbaged after each request ? Alternatively, consider a system design that retrieves a smaller, fixed number of rows instead of "2-3" and lets the user scroll, say 100 rows at a time. Yoav Shapira - 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: Running multiple JVMs
An additional remark: Only one process can listen on port 80 at a time on the !!! same IP !!!. You can define several IP's on one machine and thus can have several services that listen on port 80. (One for each IP) > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 5:42 PM > To: Tomcat Users List > Subject: RE: Running multiple JVMs > > Only one process can listen on port 80 at a time. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Terminating or suspending an application if a "on start up" servlet throws an exception?
Howdy, Not from one servlet: it'll just mark that servlet as unavailable (which is correct behavior). If you throw the runtime exception from a servlet context listener, the context will be marked as unavailable. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Mike Curwen [mailto:[EMAIL PROTECTED] >Sent: Monday, January 19, 2004 9:50 AM >To: 'Tomcat Users List'; [EMAIL PROTECTED] >Subject: RE: Terminating or suspending an application if a "on start up" >servlet throws an exception? > >I think if you throw a RuntimException, then Tomcat will mark the app as >unavailable. > > >> -Original Message- >> From: Adrian Beech [mailto:[EMAIL PROTECTED] >> Sent: Sunday, January 18, 2004 5:35 AM >> To: [EMAIL PROTECTED] >> Subject: Terminating or suspending an application if a "on >> start up" servlet throws an exception? >> >> >> G'day, >> >> Is it possible to have Tomcat 4.1.x terminate or suspend >> access to an application if a servlet which is fired at start >> up throws an exception? For example, we have two servlets >> which are loaded on start up. The first one sets up the >> database connection pool and the second one does various >> other application initialisation type actions. If either one >> throws an exception then I'd like the application to be unavailable. >> >> Can this be done? If so then how? >> >> AB >> >> >> >> - >> 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help, I have a headache .. servlet init troubles
no, it's one host, Cheers, ADC -Original Message- From: James Neville [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:31 To: Tomcat Users List Subject: Re: Please help, I have a headache .. servlet init troubles Allistair Crossley wrote: >Do you know why my servlet initalises twice? That's my remaining issue.. > If you are specifying multiple hosts, all running from the same appBase, then each web application will be deployed to each host. If this is the case, run each host from a different appBase so that you don't double deploy. James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
virtual hosts (Tomcat vs Jetty)
Hello, all! There is jboss-3.2.2RC4_jetty-4.2.11. There is a web app. Jetty lets to create virtual hosts "on-the-fly". Ex., in order to create a virtual host for this web app, I have to add the following string to WEB-INF/jboss-web.xml www.some.host In order to change the name of the virtual host I have to change only WEB-INF/jboss-web.xml: www.some.host1 and I have to redeplay my web app. Everything is ok. Now there is jboss-3.2.3 with jbossweb-tomcat41.sar. Now, in order to create a virtual host for this web app, I have to add not only the corresponding string to WEB-INF/jboss-web.xml, but also I need to add the following string to jboss\server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml : To change the name of the virtual host it's not enough to simply change only WEB-INF/jboss-web.xml, but I need to to change moreover jboss\server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml . Thus, I can't change virtual hosts "on-the-fly". My questions are: who is not right - Jetty or Tomcat? Or it's possible for servers to do it in different ways to (i.e. thare are different vendor specific features)? Can I read somewhere in specifications how servers should setup virtual hosts? Can you give me links where I can read how it should be right? Thanks in advance. Best regards. Bye. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Running multiple JVMs
Howdy, >We have a number of webapps that need separate JVMs. The reason is that we >need decent isolation: if one app grabs too much memory it can crash the >others. What's the best way to do this? Is it at all possible to use >multiple instances of standalone Tomcat? (They all have separate domain >names, but must run on port 80). Or do I have to integrate with Apache? Only one process can listen on port 80 at a time. It can be a single tomcat instance (which uses one JVM), a single Apache instance, or a single instance of whatever other server you want. All webapps on tomcat use the same JVM, so for multiple JVMs you need multiple tomcat instances. Since you can't have all these instances listening on port 80 at the same time, you need Apache (or whatever, e.g. another tomcat running balancer) in front, listening on port 80. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help, I have a headache .. servlet init troubles
Allistair Crossley wrote: Do you know why my servlet initalises twice? That's my remaining issue.. If you are specifying multiple hosts, all running from the same appBase, then each web application will be deployed to each host. If this is the case, run each host from a different appBase so that you don't double deploy. James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help, I have a headache .. servlet init troubles
Hi, No but i do load on startup if that makes a difference? iqController com.comp.newmedia.intranet.iq.IQActionServlet config /WEB-INF/struts-config.xml skin default 1 Cheers, ADC -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:37 To: Tomcat Users List Subject: RE: Please help, I have a headache .. servlet init troubles Howdy, Is the controller servlet declared twice in your web.xml? Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Allistair Crossley [mailto:[EMAIL PROTECTED] >Sent: Monday, January 19, 2004 10:57 AM >To: TOMCAT USER (E-mail) >Subject: Please help, I have a headache .. servlet init troubles > >I am having the biggest headache ever with this. When I start Tomcat > >1) Why is my controller servlet always initialised twice?? That is, as soon >as all my logging has finished for one init, it all comes out again a >second time! > >2) In the init I get the following error when it tries to look at my JNDI >datasource... > >2004-01-19 15:35:28,764 INFO >com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : >dataSource: done > >2004-01-19 15:35:28,764 ERROR >com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : Init >could not acquire connection from DataSource: >org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of >class '' for connect URL 'null', cause: null Cannot create JDBC driver of >class '' for connect URL 'null' > >Yet shortly after it seems to have found my datasource perfectly ok because >calls work... > >2004-01-19 15:36:44,828 DEBUG >com.qas.newmedia.intranet.iq.base.navigation.NavigationManager.init(Unk nown >Source) : CONNECTIOINIT [EMAIL PROTECTED] > >My JNDI resouce is below (clearly a URL DOES exist). > >Thank you all! ADC > >-- snip -- > > > type="javax.sql.DataSource"/> > > > > factory > >org.apache.commons.dbcp.BasicDataSourceFactory > > > driverClassName > > com.microsoft.jdbc.sqlserver.SQLServerDriver > > > url > > jdbc:microsoft:sqlserver://server:1433 > > > username > sa > > > password > pass > > > maxActive > 50 > > > maxIdle > 10 > > > maxWait > 1 > > > validationQuery > SELECT 1 + 1 > > >logAbandonedtrue > >removeAbandonedtrue > > > >--- >QAS Ltd. >Developers of QuickAddress Software >http://www.qas.com";>www.qas.com >Registered in England: No 2582055 >Registered in Australia: No 082 851 474 >--- > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- --
RE: Please help, I have a headache .. servlet init troubles
Howdy, Is the controller servlet declared twice in your web.xml? Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Allistair Crossley [mailto:[EMAIL PROTECTED] >Sent: Monday, January 19, 2004 10:57 AM >To: TOMCAT USER (E-mail) >Subject: Please help, I have a headache .. servlet init troubles > >I am having the biggest headache ever with this. When I start Tomcat > >1) Why is my controller servlet always initialised twice?? That is, as soon >as all my logging has finished for one init, it all comes out again a >second time! > >2) In the init I get the following error when it tries to look at my JNDI >datasource... > >2004-01-19 15:35:28,764 INFO >com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : >dataSource: done > >2004-01-19 15:35:28,764 ERROR >com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : Init >could not acquire connection from DataSource: >org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of >class '' for connect URL 'null', cause: null Cannot create JDBC driver of >class '' for connect URL 'null' > >Yet shortly after it seems to have found my datasource perfectly ok because >calls work... > >2004-01-19 15:36:44,828 DEBUG >com.qas.newmedia.intranet.iq.base.navigation.NavigationManager.init(Unk nown >Source) : CONNECTIOINIT [EMAIL PROTECTED] > >My JNDI resouce is below (clearly a URL DOES exist). > >Thank you all! ADC > >-- snip -- > > > type="javax.sql.DataSource"/> > > > > factory > >org.apache.commons.dbcp.BasicDataSourceFactory > > > driverClassName > > com.microsoft.jdbc.sqlserver.SQLServerDriver > > > url > > jdbc:microsoft:sqlserver://server:1433 > > > username > sa > > > password > pass > > > maxActive > 50 > > > maxIdle > 10 > > > maxWait > 1 > > > validationQuery > SELECT 1 + 1 > > >logAbandonedtrue > >removeAbandonedtrue > > > >--- >QAS Ltd. >Developers of QuickAddress Software >http://www.qas.com";>www.qas.com >Registered in England: No 2582055 >Registered in Australia: No 082 851 474 >--- > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help, I have a headache .. servlet init troubles
Hi, Yes I have the jdbc driver in common/lib - like I say ... it "does" connect but I do not know why it gives this error! I just removed trying to get the JNDI data source in my controller servlet init() and moved it to the classes that need a connection. There are now no errors. Therefore it seems almost that init() is too quick to try and get the JNDI resource before it has managed to load the servlet.xml?? Do you know why my servlet initalises twice? That's my remaining issue.. Cheers, ADC -Original Message- From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 17:22 To: 'Tomcat Users List' Subject: RE: Please help, I have a headache .. servlet init troubles To solve your problem with JDBC Driver, you must put the JDBC driver inside $TOMCAT_HOME/common/lib, try this first the other errors we will see if happens again. > -- > De: Allistair Crossley[SMTP:[EMAIL PROTECTED] > Responder:Tomcat Users List > Enviada: segunda-feira, 19 de janeiro de 2004 12:56 > Para: TOMCAT USER (E-mail) > Assunto: Please help, I have a headache .. servlet init troubles > > I am having the biggest headache ever with this. When I start Tomcat > > 1) Why is my controller servlet always initialised twice?? That is, as > soon as all my logging has finished for one init, it all comes out again a > second time! > > 2) In the init I get the following error when it tries to look at my JNDI > datasource... > > 2004-01-19 15:35:28,764 INFO > com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : > dataSource: done > > 2004-01-19 15:35:28,764 ERROR > com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : Init > could not acquire connection from DataSource: > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of > class '' for connect URL 'null', cause: null Cannot create JDBC driver of > class '' for connect URL 'null' > > Yet shortly after it seems to have found my datasource perfectly ok > because calls work... > > 2004-01-19 15:36:44,828 DEBUG > com.qas.newmedia.intranet.iq.base.navigation.NavigationManager.init(Unknow > n Source) : CONNECTIOINIT > [EMAIL PROTECTED] > > My JNDI resouce is below (clearly a URL DOES exist). > > Thank you all! ADC > > -- snip -- > > >type="javax.sql.DataSource"/> > > > > factory > > org.apache.commons.dbcp.BasicDataSourceFactory > > > driverClassName > > > com.microsoft.jdbc.sqlserver.SQLServerDriver > > > url > > jdbc:microsoft:sqlserver://server:1433 > > > username > sa > > > password > pass > > > maxActive > 50 > > > maxIdle > 10 > > > maxWait > 1 > > > validationQuery > SELECT 1 + 1 > > > logAbandonedtrue > > removeAbandonedtrue > > > > --- > QAS Ltd. > Developers of QuickAddress Software > http://www.qas.com";>www.qas.com > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > --- > > > > - > 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: Antwort: [OFF-TOPIC] ObjectOutputStream keeping handles
Howdy, Reset() is slow as you mentioned. But writeUnshared instead of writeObject solves the problem for us as our serialized objects are independent. Thanks, Yoav Shapira Millennium ChemInformatics >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Monday, January 19, 2004 9:00 AM >To: [EMAIL PROTECTED] >Subject: RE: Antwort: [OFF-TOPIC] ObjectOutputStream keeping handles > >I encountered this problem 3-4 years ago. According to Sun this is by >design. ObjectOutputStream keeps the handles of all objects until you >execute a reset() or close the stream. > >Unfortunately, if you don't do one of these things you end up with a memory >leak because the objects are never garbage collected. Also, our testing >back then showed that resetting the output stream each time is slow. I >think we settled for a reset every 100 objects. Just in case, you might >want to also check to make sure that the reset() does not make you loose >objects before you get them through the input stream. This was not an >issue for us (we were streaming snapshots from a camera and had no visible >effect), so we never checked to see if it was a problem. > >The last time I looked, they had slightly improved the documentation so >that it at least gave some "clue" that this was happening, but they had not >yet made it 100% obvious. > >-Original Message- >From: ext [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] >Sent: Monday, January 19, 2004 6:55 AM >To: Tomcat Users List >Subject: Antwort: [OFF-TOPIC] ObjectOutputStream keeping handles > > > >hi yoav, > >have you tried java.io.ObjectOutputStream.reset()? > >uli > > > > > > "Shapira, Yoav" > <[EMAIL PROTECTED]An: "Tomcat Users >List" <[EMAIL PROTECTED]> > .com>Kopie: > Thema:[OFF-TOPIC] >ObjectOutputStream keeping handles > 16.01.04 18:01 > Bitte antworten > an "Tomcat Users > List" > > > > > > > >Howdy, >Has anyone bumped into an issue where java.io.ObjectOutputStream keep >references to serialized objects until the stream is closed, thereby >preventing the objects from being garbage-collected? I know I can get >around this by closing and reopening the stream after every write, but >that seems to be a high-overhead approach. Any other ideas? >writeUnshared() perhaps? > >Yoav Shapira >Millennium ChemInformatics > > > > > >This e-mail, including any attachments, is a confidential business >communication, and may contain information that is confidential, >proprietary and/or privileged. This e-mail is intended only for the >individual(s) to whom it is addressed, and may not be saved, copied, >printed, disclosed or used by anyone else. If you are not the(an) intended >recipient, please immediately delete this e-mail from your computer system >and notify the sender. Thank you. > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help, I have a headache .. servlet init troubles
To solve your problem with JDBC Driver, you must put the JDBC driver inside $TOMCAT_HOME/common/lib, try this first the other errors we will see if happens again. > -- > De: Allistair Crossley[SMTP:[EMAIL PROTECTED] > Responder:Tomcat Users List > Enviada: segunda-feira, 19 de janeiro de 2004 12:56 > Para: TOMCAT USER (E-mail) > Assunto: Please help, I have a headache .. servlet init troubles > > I am having the biggest headache ever with this. When I start Tomcat > > 1) Why is my controller servlet always initialised twice?? That is, as > soon as all my logging has finished for one init, it all comes out again a > second time! > > 2) In the init I get the following error when it tries to look at my JNDI > datasource... > > 2004-01-19 15:35:28,764 INFO > com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : > dataSource: done > > 2004-01-19 15:35:28,764 ERROR > com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : Init > could not acquire connection from DataSource: > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of > class '' for connect URL 'null', cause: null Cannot create JDBC driver of > class '' for connect URL 'null' > > Yet shortly after it seems to have found my datasource perfectly ok > because calls work... > > 2004-01-19 15:36:44,828 DEBUG > com.qas.newmedia.intranet.iq.base.navigation.NavigationManager.init(Unknow > n Source) : CONNECTIOINIT > [EMAIL PROTECTED] > > My JNDI resouce is below (clearly a URL DOES exist). > > Thank you all! ADC > > -- snip -- > > >type="javax.sql.DataSource"/> > > > > factory > > org.apache.commons.dbcp.BasicDataSourceFactory > > > driverClassName > > > com.microsoft.jdbc.sqlserver.SQLServerDriver > > > url > > jdbc:microsoft:sqlserver://server:1433 > > > username > sa > > > password > pass > > > maxActive > 50 > > > maxIdle > 10 > > > maxWait > 1 > > > validationQuery > SELECT 1 + 1 > > > logAbandonedtrue > > removeAbandonedtrue > > > > --- > QAS Ltd. > Developers of QuickAddress Software > http://www.qas.com";>www.qas.com > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > --- > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
RE: Linking tomcat with apache
Add shm.file=c:/Apache2/logs/jk2.shm to your $CATALINA_HOME\conf\jk2.properties file. -Original Message- From: Allan Bruce [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 6:52 AM To: Tomcat Users List Subject: Re: Linking tomcat with apache Thanks Tim, I am a step closer I think, my configs are detailed below. I have tomcat running with jk2 fine, the log states INFO: JK2: ajp13 listening on /0.0.0.0:8019 but apache has the following error: [Mon Jan 19 14:32:37 2004] [notice] Apache-AdvancedExtranetServer/2.0.44 configured -- resuming normal operations [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file [Mon Jan 19 14:33:23 2004] [error] workerEnv.init() create slot epStat.0 failed [Mon Jan 19 14:33:23 2004] [error] lb.service() worker failed ajp13:localhost:8019 [Mon Jan 19 14:33:23 2004] [error] lb.service() unrecoverable error... [Mon Jan 19 14:33:23 2004] [error] mod_jk.handler() Error connecting to tomcat 12 [Mon Jan 19 14:34:28 2004] [error] shm.init(): No file [Mon Jan 19 14:35:53 2004] [error] workerEnv.init() create slot epStat.2 failed [Mon Jan 19 14:35:53 2004] [error] lb.service() worker failed ajp13:localhost:8019 [Mon Jan 19 14:35:53 2004] [error] lb.service() unrecoverable error... [Mon Jan 19 14:35:53 2004] [error] mod_jk.handler() Error connecting to tomcat 12 What am I doing wrong? Thanks Allan config files added/changed --added to /etc/httpd/conf/commonhttpd.conf LoadModule jk2_module /usr/lib/apache2/mod_jk2.so --/etc/httpd/conf/workers2.properties #min for working [channel.socket:localhost:8019] info=Ajp13 forwarding over socket tomcatId=localhost:8019 # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] info=Map the whole webapp --/usr/local/sites/tomcat/tomcat/conf/jk2.properies # list of needed handlers. handler.list=apr,channelSocket,request # Override the default port for the channelSocket channelSocket.port=8019 # Dynamic library apr.NativeSo=/usr/lib/apache2/mod_jk2.so --added to /usr/local/sites/tomcat/tomcat/conf/server.xml - Original Message - From: "Tim Funk" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Sunday, January 18, 2004 7:23 PM Subject: Re: Linking tomcat with apache > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links > > -Tim > > Allan Bruce wrote: > > I have tomcat and apache both setup and running. At the moment, I am using > > a permanent redirect for urls to servlets to tomcat. But this is not > > correct. How do I get them set up correctly? I have jk2 installed. > > Thanks > > Allan > > > - > 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: Linking tomcat with apache
Map the servlet path you want to use in workers2.properties i.e. [uri:/servlet/*] worker=ajp13:localhost:8019 and make sure your webapp is under webapps/servlet in Tomcat. Yiannis -Original Message- From: Allan Bruce [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 15:38 To: Tomcat Users List Subject: Re: Linking tomcat with apache Thanks very much, thats it working now. Any ideas how I could navigate to: http://server/servlet/WinGalagaHST?Op=GetHTML instead of http://server/examples/servlet/WinGalagaHST?Op=GetHTML i.e. so I dont have to type 'examples'. I dont want to use HTTP 301 Redirect. Thanks Allan - Original Message - From: "Yiannis Mavroukakis" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 2:58 PM Subject: RE: Linking tomcat with apache > Probably this > [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file > > You need a shm directive in your workers2.properties. > > [shm] > file=/tmp/shm.file > size=100 > > Or whatever path takes your fancy. > > Yiannis. > > -Original Message- > From: Allan Bruce [mailto:[EMAIL PROTECTED] > Sent: 19 January 2004 14:52 > To: Tomcat Users List > Subject: Re: Linking tomcat with apache > > > Thanks Tim, > > I am a step closer I think, my configs are detailed below. I have tomcat > running with jk2 fine, the log states > > INFO: JK2: ajp13 listening on /0.0.0.0:8019 > > > but apache has the following error: > > [Mon Jan 19 14:32:37 2004] [notice] Apache-AdvancedExtranetServer/2.0.44 > configured -- resuming normal operations > [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file > [Mon Jan 19 14:33:23 2004] [error] workerEnv.init() create slot epStat.0 > failed > [Mon Jan 19 14:33:23 2004] [error] lb.service() worker failed > ajp13:localhost:8019 > [Mon Jan 19 14:33:23 2004] [error] lb.service() unrecoverable error... > [Mon Jan 19 14:33:23 2004] [error] mod_jk.handler() Error connecting to > tomcat 12 > [Mon Jan 19 14:34:28 2004] [error] shm.init(): No file > [Mon Jan 19 14:35:53 2004] [error] workerEnv.init() create slot epStat.2 > failed > [Mon Jan 19 14:35:53 2004] [error] lb.service() worker failed > ajp13:localhost:8019 > [Mon Jan 19 14:35:53 2004] [error] lb.service() unrecoverable error... > [Mon Jan 19 14:35:53 2004] [error] mod_jk.handler() Error connecting to > tomcat 12 > > > > > What am I doing wrong? > Thanks > Allan > > config files added/changed > --added to /etc/httpd/conf/commonhttpd.conf > LoadModule jk2_module /usr/lib/apache2/mod_jk2.so > > --/etc/httpd/conf/workers2.properties > #min for working > [channel.socket:localhost:8019] > info=Ajp13 forwarding over socket > tomcatId=localhost:8019 > # Map the Tomcat examples webapp to the Web server uri space > [uri:/examples/*] > info=Map the whole webapp > > > --/usr/local/sites/tomcat/tomcat/conf/jk2.properies > # list of needed handlers. > handler.list=apr,channelSocket,request > # Override the default port for the channelSocket > channelSocket.port=8019 > # Dynamic library > apr.NativeSo=/usr/lib/apache2/mod_jk2.so > > > --added to /usr/local/sites/tomcat/tomcat/conf/server.xml > minProcessors="5" maxProcessors="75" enableLookups="true" > redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="0" > useURIValidationHack="false" > protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" /> > > > > - Original Message - > From: "Tim Funk" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Sunday, January 18, 2004 7:23 PM > Subject: Re: Linking tomcat with apache > > > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > > http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links > > > > -Tim > > > > Allan Bruce wrote: > > > I have tomcat and apache both setup and running. At the moment, I am > using > > > a permanent redirect for urls to servlets to tomcat. But this is not > > > correct. How do I get them set up correctly? I have jk2 installed. > > > Thanks > > > Allan > > > > > > - > > 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] > > > > This e-mail has been scanned for all viruses by Star Internet. The > service is powered by MessageLabs. > > > Note:__ > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. No > confidentiality or privilege is waived or lost by any mistransmission. > If you receive this message in error, please immediately delete it and > all copies of it from your system, destroy any hard copies of it and >
Please help, I have a headache .. servlet init troubles
I am having the biggest headache ever with this. When I start Tomcat 1) Why is my controller servlet always initialised twice?? That is, as soon as all my logging has finished for one init, it all comes out again a second time! 2) In the init I get the following error when it tries to look at my JNDI datasource... 2004-01-19 15:35:28,764 INFO com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : dataSource: done 2004-01-19 15:35:28,764 ERROR com.qas.newmedia.intranet.iq.IQActionServlet.init(Unknown Source) : Init could not acquire connection from DataSource: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: null Cannot create JDBC driver of class '' for connect URL 'null' Yet shortly after it seems to have found my datasource perfectly ok because calls work... 2004-01-19 15:36:44,828 DEBUG com.qas.newmedia.intranet.iq.base.navigation.NavigationManager.init(Unknown Source) : CONNECTIOINIT [EMAIL PROTECTED] My JNDI resouce is below (clearly a URL DOES exist). Thank you all! ADC -- snip -- factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver url jdbc:microsoft:sqlserver://server:1433 username sa password pass maxActive 50 maxIdle 10 maxWait 1 validationQuery SELECT 1 + 1 logAbandonedtrue removeAbandonedtrue --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirection of JSP's to iPlanet Web Server
Hi all I managed to configure iPlanet to redirect the requests from JBOSS 321. I would like to thank Rick for his timely and invaluable help :) First, you need to add the below lines into your magnus.conf right on top of the already existing init parameters: Init fn="load-modules" funcs="jk_init,jk_service" shlib="/PATH TO /nsapi_redirector.dll" Init fn="jk_init" worker_file="/PATH TO/workers.properties" log_level="debug" log_file="PATH TO/nsapi.log" Inside your workers.properties file, set "worker.jboss.host" to your FQDN. Now, in your obj.conf file, enter these lines in the section: NameTrans fn="assign-name" from="/examples/*" name="jboss" NameTrans fn="assign-name" from="/jmx-console/*" name="jboss" NameTrans fn="assign-name" from="/jmx-console*" name="jboss" NameTrans fn="assign-name" from="/idm/*" name="jboss" NameTrans fn="assign-name" from="/idm*" name="jboss" Now, underneath the section, make a new section: ObjectType fn="force-type" type="text/plain" Service fn="jk_service" worker="jboss" Stop and start your webserver - you should see a message like: iPlanet-WebServer-Enterprise/6.0SP5 B10/31/2002 16:22 In jk_init. Worker file = /opt/iplanet/webserver/https-servername/config/workers.properties. Log level = debug. Log File = /opt/iplanet/webserver/https-servername/logs/nsapi.log If not, you probably will have to experiment a bit on the order in which you have the directives entered in magnus.conf and obj.conf. If everything is working properly you should be able to access this page: http://youservername:port/jmx-console and have the JBoss admin console appear. Thanks Rick :) .. couldn't have done it without you With regards Ananth
Re: Linking tomcat with apache
Thanks very much, thats it working now. Any ideas how I could navigate to: http://server/servlet/WinGalagaHST?Op=GetHTML instead of http://server/examples/servlet/WinGalagaHST?Op=GetHTML i.e. so I dont have to type 'examples'. I dont want to use HTTP 301 Redirect. Thanks Allan - Original Message - From: "Yiannis Mavroukakis" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 2:58 PM Subject: RE: Linking tomcat with apache > Probably this > [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file > > You need a shm directive in your workers2.properties. > > [shm] > file=/tmp/shm.file > size=100 > > Or whatever path takes your fancy. > > Yiannis. > > -Original Message- > From: Allan Bruce [mailto:[EMAIL PROTECTED] > Sent: 19 January 2004 14:52 > To: Tomcat Users List > Subject: Re: Linking tomcat with apache > > > Thanks Tim, > > I am a step closer I think, my configs are detailed below. I have tomcat > running with jk2 fine, the log states > > INFO: JK2: ajp13 listening on /0.0.0.0:8019 > > > but apache has the following error: > > [Mon Jan 19 14:32:37 2004] [notice] Apache-AdvancedExtranetServer/2.0.44 > configured -- resuming normal operations > [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file > [Mon Jan 19 14:33:23 2004] [error] workerEnv.init() create slot epStat.0 > failed > [Mon Jan 19 14:33:23 2004] [error] lb.service() worker failed > ajp13:localhost:8019 > [Mon Jan 19 14:33:23 2004] [error] lb.service() unrecoverable error... > [Mon Jan 19 14:33:23 2004] [error] mod_jk.handler() Error connecting to > tomcat 12 > [Mon Jan 19 14:34:28 2004] [error] shm.init(): No file > [Mon Jan 19 14:35:53 2004] [error] workerEnv.init() create slot epStat.2 > failed > [Mon Jan 19 14:35:53 2004] [error] lb.service() worker failed > ajp13:localhost:8019 > [Mon Jan 19 14:35:53 2004] [error] lb.service() unrecoverable error... > [Mon Jan 19 14:35:53 2004] [error] mod_jk.handler() Error connecting to > tomcat 12 > > > > > What am I doing wrong? > Thanks > Allan > > config files added/changed > --added to /etc/httpd/conf/commonhttpd.conf > LoadModule jk2_module /usr/lib/apache2/mod_jk2.so > > --/etc/httpd/conf/workers2.properties > #min for working > [channel.socket:localhost:8019] > info=Ajp13 forwarding over socket > tomcatId=localhost:8019 > # Map the Tomcat examples webapp to the Web server uri space > [uri:/examples/*] > info=Map the whole webapp > > > --/usr/local/sites/tomcat/tomcat/conf/jk2.properies > # list of needed handlers. > handler.list=apr,channelSocket,request > # Override the default port for the channelSocket > channelSocket.port=8019 > # Dynamic library > apr.NativeSo=/usr/lib/apache2/mod_jk2.so > > > --added to /usr/local/sites/tomcat/tomcat/conf/server.xml > minProcessors="5" maxProcessors="75" enableLookups="true" > redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="0" > useURIValidationHack="false" > protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" /> > > > > - Original Message - > From: "Tim Funk" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Sunday, January 18, 2004 7:23 PM > Subject: Re: Linking tomcat with apache > > > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > > http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links > > > > -Tim > > > > Allan Bruce wrote: > > > I have tomcat and apache both setup and running. At the moment, I am > using > > > a permanent redirect for urls to servlets to tomcat. But this is not > > > correct. How do I get them set up correctly? I have jk2 installed. > > > Thanks > > > Allan > > > > > > - > > 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] > > > > This e-mail has been scanned for all viruses by Star Internet. The > service is powered by MessageLabs. > > > Note:__ > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. No > confidentiality or privilege is waived or lost by any mistransmission. > If you receive this message in error, please immediately delete it and > all copies of it from your system, destroy any hard copies of it and > notify the sender. You must not, directly or indirectly, use, disclose, > distribute, print, or copy any part of this message if you are not the > intended recipient. Jaguar Freight Services and any of its subsidiaries > each reserve the right to monitor all e-mail communications through its > networks. > Any views expressed in this message are
RE: Problems with jk2 on IIS 5.0 and Tomcat 4.0
Tried it, but it still does not work. Mostly the requests is passed to tomcat correctly. The log then look like this: [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (288)] HttpFilterProc started [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (346)] In HttpFilterProc Virtual Host redirection of 80.199.44.136 : 80 [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (355)] HttpFilterProc [.../servlet/...] is a servlet url - should redirect to ajp13:localhost:8009 [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (421)] HttpFilterProc check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing to the web-inf directory [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (473)] HttpExtensionProc started [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (482)] HttpExtensionProc got a worker for name ajp13:localhost:8009 [Mon Jan 19 14:33:20 2004] (debug ) [jk_service_iis.c (168)] Into jk_ws_service_t::read [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[0] [Content-Encoding] = [gzip] [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[1] [Content-Type] = [text/xml;charset=ISO-8859-1] [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[2] [Content-Length] = [276] [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (172)] handler.response(): status=200 headers=3 [Mon Jan 19 14:33:20 2004] (debug ) [jk_service_iis.c (93)] Into jk_ws_service_t::head [Mon Jan 19 14:33:20 2004] (debug ) [jk_service_iis.c (227)] Into jk_ws_service_t::write [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (515)] HttpExtensionProc service() returned OK But sometimes, the log look like this: [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (288)] HttpFilterProc started [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (346)] In HttpFilterProc Virtual Host redirection of 80.199.44.136 : 80 [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (355)] HttpFilterProc [/.../servlet/...] is a servlet url - should redirect to ajp13:localhost:8009 [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (421)] HttpFilterProc check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing to the web-inf directory [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (473)] HttpExtensionProc started [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (482)] HttpExtensionProc got a worker for name ajp13:localhost:8009 [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (168)] Into jk_ws_service_t::read [Mon Jan 19 15:28:34 2004] (error ) [jk_worker_ajp13.c (389)] ajp13.service() Error sending initial post -1 0 0 [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[0] [Content-Encoding] = [gzip] [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[1] [Content-Type] = [text/xml;charset=ISO-8859-1] [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[2] [Content-Length] = [198] [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (172)] handler.response(): status=200 headers=3 [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (93)] Into jk_ws_service_t::head [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (227)] Into jk_ws_service_t::write [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (515)] HttpExtensionProc service() returned OK It seems like an error occurs: Error sending initial post -1 0 0. Does anyone know what this means? Even though the log says: HttpExtensionProc service() returned OK, a response is never returned. The browser simply gets a timeout! Any help would be greatly appreciated Thanks, Rasmus -Original Message- From: Jeff Trout [mailto:[EMAIL PROTECTED] Sent: 19. januar 2004 13:39 To: Rasmus Munk Cc: [EMAIL PROTECTED] Subject: Re: Problems with jk2 on IIS 5.0 and Tomcat 4.0 On Fri, 16 Jan 2004 15:54:00 EST "Rasmus Munk" <[EMAIL PROTECTED]> wrote: > > HttpFilterProc [/camping_lars/servlet/camping.XMLServer.Server] is a > servlet url - should redirect to ajp13:localhost:8009 HttpFilterProc > check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing > to the web-inf directory HttpFilterProc started In HttpFilterProc > Virtual Host redirection of localhost : 80 HttpFilterProc > [/jakarta/isapi_redirector2.dll] is not a servlet url HttpFilterProc > check if [/jakarta/isapi_redirector2.dll] is pointing to the web-inf > directory HttpExtensionProc started HttpExtensionProc could not get a > worker for name HttpExtensionProc worker is NULL > I just recently spent a few days struggling with this 1. Did you setup the /jakarta/ virtual dir properly (pointing it to the dir that has isapi_redirector2.dll? 2. Did you install isapi_redirector2.dll at the server or site level? I found on w2k sp4 that I had to install it at the SITE level... Oddly it worked fine
Re: Terminating or suspending an application if a "on start up" servlet throws an exception?
Or does it only mark that Servlet as unavailable? Throwing a RuntimeException from the contextInitialized() method of a ServletContextListener will mark the context as unavailable. Use of a ServletContextListener to do app initialization is probably the way to go instead of load-on-startup servlets. my $0.02, Jon Mike Curwen wrote: I think if you throw a RuntimException, then Tomcat will mark the app as unavailable. -Original Message- From: Adrian Beech [mailto:[EMAIL PROTECTED] Sent: Sunday, January 18, 2004 5:35 AM To: [EMAIL PROTECTED] Subject: Terminating or suspending an application if a "on start up" servlet throws an exception? G'day, Is it possible to have Tomcat 4.1.x terminate or suspend access to an application if a servlet which is fired at start up throws an exception? For example, we have two servlets which are loaded on start up. The first one sets up the database connection pool and the second one does various other application initialisation type actions. If either one throws an exception then I'd like the application to be unavailable. Can this be done? If so then how? AB - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using CA-issued certificates in Tomcat 5
keytool in JDK 1.4.2_03 no longer seems to accept PKCS#7 certificates by default and I have not found a parameter to tell it to use them. When I do as you suggested (or download a Thawte pkcs#7 certificate) I get "keytool error: java.lang.Exception: Input not an X.509 certificate". Also, keytool does not not allowing the import for the cert under the "tomcat" alias if the self-signed cert is already in the keystore with the alias "tomcat". Can it be that Sun royally messed up the keytool implementation when moving from PKCS#7 to X.509 certificates? -Original Message- From: ext Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 5:20 PM To: 'Tomcat Users List' Subject: RE: Using CA-issued certificates in Tomcat 5 Try this - don't delete the alias before importing the response. What happens is: > keytool -genkey -alias tomcat -keyalg RSA Creates your private and public key > keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr wraps a copy of your _public_ key in a certficate request > ... got the certs... CA uses their private key to sign your public key - this is essentially your certificate > keytool -delete -alias tomcat This deletes your private key. This is bad. > keytool -import -alias root -trustcacerts -file rootcert.cer (root/intermediate/chain cert, as appropriate for the CA) Adds the public key of your CA to your trusted certs. > keytool -import -alias tomcat -trustcacerts -file testcert.cer With your private key still in place, this replaces your unsigned public key with a signed public key You may find that the format the cert comes back in is not compatible with keytool. I normally do the following: 1. In windows, change extension to .cer 2. Double click on .cer file. 3. On "Details" tab click "Copy to file..." 4. Select the .p7b output format and tick the box to include all certs in path. 5. Specify a file name. 6. Use key tool to import this file. Sorry this is a windows solution but if you don't use windows as along as you can get access to a windows box you should be able to do this. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 11:03 PM To: [EMAIL PROTECTED] Subject: Using CA-issued certificates in Tomcat 5 I thought I had all my Tomcat issues resolved and was ready to go from the self-signed cert to one issued by a CA. So I followed all the steps, generated a CSR, got the root cert and test cert, installed them into the keytool, and restarted the server. An exception is thrown saying: No available certificate corresponds to the SSL cipher suites which are enabled - 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: Linking tomcat with apache
Probably this [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file You need a shm directive in your workers2.properties. [shm] file=/tmp/shm.file size=100 Or whatever path takes your fancy. Yiannis. -Original Message- From: Allan Bruce [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 14:52 To: Tomcat Users List Subject: Re: Linking tomcat with apache Thanks Tim, I am a step closer I think, my configs are detailed below. I have tomcat running with jk2 fine, the log states INFO: JK2: ajp13 listening on /0.0.0.0:8019 but apache has the following error: [Mon Jan 19 14:32:37 2004] [notice] Apache-AdvancedExtranetServer/2.0.44 configured -- resuming normal operations [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file [Mon Jan 19 14:33:23 2004] [error] workerEnv.init() create slot epStat.0 failed [Mon Jan 19 14:33:23 2004] [error] lb.service() worker failed ajp13:localhost:8019 [Mon Jan 19 14:33:23 2004] [error] lb.service() unrecoverable error... [Mon Jan 19 14:33:23 2004] [error] mod_jk.handler() Error connecting to tomcat 12 [Mon Jan 19 14:34:28 2004] [error] shm.init(): No file [Mon Jan 19 14:35:53 2004] [error] workerEnv.init() create slot epStat.2 failed [Mon Jan 19 14:35:53 2004] [error] lb.service() worker failed ajp13:localhost:8019 [Mon Jan 19 14:35:53 2004] [error] lb.service() unrecoverable error... [Mon Jan 19 14:35:53 2004] [error] mod_jk.handler() Error connecting to tomcat 12 What am I doing wrong? Thanks Allan config files added/changed --added to /etc/httpd/conf/commonhttpd.conf LoadModule jk2_module /usr/lib/apache2/mod_jk2.so --/etc/httpd/conf/workers2.properties #min for working [channel.socket:localhost:8019] info=Ajp13 forwarding over socket tomcatId=localhost:8019 # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] info=Map the whole webapp --/usr/local/sites/tomcat/tomcat/conf/jk2.properies # list of needed handlers. handler.list=apr,channelSocket,request # Override the default port for the channelSocket channelSocket.port=8019 # Dynamic library apr.NativeSo=/usr/lib/apache2/mod_jk2.so --added to /usr/local/sites/tomcat/tomcat/conf/server.xml - Original Message - From: "Tim Funk" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Sunday, January 18, 2004 7:23 PM Subject: Re: Linking tomcat with apache > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links > > -Tim > > Allan Bruce wrote: > > I have tomcat and apache both setup and running. At the moment, I am using > > a permanent redirect for urls to servlets to tomcat. But this is not > > correct. How do I get them set up correctly? I have jk2 installed. > > Thanks > > Allan > > > - > 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] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
Tomcat Cluster and Load Balancer
Hi Guys, Could anyone recommend a good place to start for setting up a Tomcat cluster on the same server? I also need a good/free load balancer that can integrate with this cluster. I understand Tomcat 5 can be clustered with a load balancer but have never done anything like it and would appreciate some newbie cluster pointers. At present we are running Tomcat 5.0.16 as a Windows 2000 service which is fed by IIS 5 via the JK2 ISAPI filter. How would I get IIS to talk to a load balancer and then to a Tomcat cluster? Also the server has 2 x 1.5Ghz CPUs, 2GB RAM if this is useful information to this topic. I'd be obliged if anybody could spare some time to advise on this. Many thanks indeed. --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linking tomcat with apache
Thanks Tim, I am a step closer I think, my configs are detailed below. I have tomcat running with jk2 fine, the log states INFO: JK2: ajp13 listening on /0.0.0.0:8019 but apache has the following error: [Mon Jan 19 14:32:37 2004] [notice] Apache-AdvancedExtranetServer/2.0.44 configured -- resuming normal operations [Mon Jan 19 14:32:37 2004] [error] shm.init(): No file [Mon Jan 19 14:33:23 2004] [error] workerEnv.init() create slot epStat.0 failed [Mon Jan 19 14:33:23 2004] [error] lb.service() worker failed ajp13:localhost:8019 [Mon Jan 19 14:33:23 2004] [error] lb.service() unrecoverable error... [Mon Jan 19 14:33:23 2004] [error] mod_jk.handler() Error connecting to tomcat 12 [Mon Jan 19 14:34:28 2004] [error] shm.init(): No file [Mon Jan 19 14:35:53 2004] [error] workerEnv.init() create slot epStat.2 failed [Mon Jan 19 14:35:53 2004] [error] lb.service() worker failed ajp13:localhost:8019 [Mon Jan 19 14:35:53 2004] [error] lb.service() unrecoverable error... [Mon Jan 19 14:35:53 2004] [error] mod_jk.handler() Error connecting to tomcat 12 What am I doing wrong? Thanks Allan config files added/changed --added to /etc/httpd/conf/commonhttpd.conf LoadModule jk2_module /usr/lib/apache2/mod_jk2.so --/etc/httpd/conf/workers2.properties #min for working [channel.socket:localhost:8019] info=Ajp13 forwarding over socket tomcatId=localhost:8019 # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] info=Map the whole webapp --/usr/local/sites/tomcat/tomcat/conf/jk2.properies # list of needed handlers. handler.list=apr,channelSocket,request # Override the default port for the channelSocket channelSocket.port=8019 # Dynamic library apr.NativeSo=/usr/lib/apache2/mod_jk2.so --added to /usr/local/sites/tomcat/tomcat/conf/server.xml - Original Message - From: "Tim Funk" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Sunday, January 18, 2004 7:23 PM Subject: Re: Linking tomcat with apache > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links > > -Tim > > Allan Bruce wrote: > > I have tomcat and apache both setup and running. At the moment, I am using > > a permanent redirect for urls to servlets to tomcat. But this is not > > correct. How do I get them set up correctly? I have jk2 installed. > > Thanks > > Allan > > > - > 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: Terminating or suspending an application if a "on start up" servlet throws an exception?
I think if you throw a RuntimException, then Tomcat will mark the app as unavailable. > -Original Message- > From: Adrian Beech [mailto:[EMAIL PROTECTED] > Sent: Sunday, January 18, 2004 5:35 AM > To: [EMAIL PROTECTED] > Subject: Terminating or suspending an application if a "on > start up" servlet throws an exception? > > > G'day, > > Is it possible to have Tomcat 4.1.x terminate or suspend > access to an application if a servlet which is fired at start > up throws an exception? For example, we have two servlets > which are loaded on start up. The first one sets up the > database connection pool and the second one does various > other application initialisation type actions. If either one > throws an exception then I'd like the application to be unavailable. > > Can this be done? If so then how? > > AB > > > > - > 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: TC5 won't start on Xeon | severe error
I remember Yoav answering something similar to this, it probably has to do with the TC balancer check his post for more details :) http://www.mail-archive.com/[EMAIL PROTECTED]/msg115782.html If it is the same, you can safely ignore it, if you need the balancer fix it, if not remove the balancer :) Y. -Original Message- From: K. Harvatis [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 14:26 To: Tomcat Users List Cc: Yiannis Mavroukakis Subject: Re: TC5 won't start on Xeon | severe error Ok, what was needed was an installation of SDK 1.4 and the creation of an empty \lib directory. Now TC5 starts, but with "severe" error. Any idea? This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
Re: TC5 won't start on Xeon | severe error
-ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Do you have an app installed already, one with a servlet filter? If so, try removing that app and see if the examples shipped with Tomcat work. On Monday 19 January 2004 09:26 am, K. Harvatis wrote: > Ok, what was needed was an installation of SDK 1.4 and the creation of an > empty \lib directory. > > Now TC5 starts, but with "severe" error. Any idea? -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC5 won't start on Xeon | severe error
Just to correct a previous statement made by me. TC5 Does run on j2sdk 1.3.1 (and is in fact the recommended j2sdk in the TC documentation) On Monday 19 January 2004 09:26 am, K. Harvatis wrote: > Ok, what was needed was an installation of SDK 1.4 and the creation of an > empty \lib directory. > > Now TC5 starts, but with "severe" error. Any idea? -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with jk2 on IIS 5.0 and Tomcat 4.0
Tried it, but it still does not work. Mostly the requests is passed to tomcat correctly. The log then look like this: [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (288)] HttpFilterProc started [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (346)] In HttpFilterProc Virtual Host redirection of 80.199.44.136 : 80 [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (355)] HttpFilterProc [.../servlet/...] is a servlet url - should redirect to ajp13:localhost:8009 [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (421)] HttpFilterProc check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing to the web-inf directory [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (473)] HttpExtensionProc started [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (482)] HttpExtensionProc got a worker for name ajp13:localhost:8009 [Mon Jan 19 14:33:20 2004] (debug ) [jk_service_iis.c (168)] Into jk_ws_service_t::read [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[0] [Content-Encoding] = [gzip] [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[1] [Content-Type] = [text/xml;charset=ISO-8859-1] [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[2] [Content-Length] = [276] [Mon Jan 19 14:33:20 2004] (debug ) [jk_handler_response.c (172)] handler.response(): status=200 headers=3 [Mon Jan 19 14:33:20 2004] (debug ) [jk_service_iis.c (93)] Into jk_ws_service_t::head [Mon Jan 19 14:33:20 2004] (debug ) [jk_service_iis.c (227)] Into jk_ws_service_t::write [Mon Jan 19 14:33:20 2004] (debug ) [jk_isapi_plugin.c (515)] HttpExtensionProc service() returned OK But sometimes, the log look like this: [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (288)] HttpFilterProc started [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (346)] In HttpFilterProc Virtual Host redirection of 80.199.44.136 : 80 [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (355)] HttpFilterProc [/.../servlet/...] is a servlet url - should redirect to ajp13:localhost:8009 [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (421)] HttpFilterProc check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing to the web-inf directory [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (473)] HttpExtensionProc started [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (482)] HttpExtensionProc got a worker for name ajp13:localhost:8009 [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (168)] Into jk_ws_service_t::read [Mon Jan 19 15:28:34 2004] (error ) [jk_worker_ajp13.c (389)] ajp13.service() Error sending initial post -1 0 0 [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[0] [Content-Encoding] = [gzip] [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[1] [Content-Type] = [text/xml;charset=ISO-8859-1] [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (155)] handler.response() Header[2] [Content-Length] = [198] [Mon Jan 19 15:28:34 2004] (debug ) [jk_handler_response.c (172)] handler.response(): status=200 headers=3 [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (93)] Into jk_ws_service_t::head [Mon Jan 19 15:28:34 2004] (debug ) [jk_service_iis.c (227)] Into jk_ws_service_t::write [Mon Jan 19 15:28:34 2004] (debug ) [jk_isapi_plugin.c (515)] HttpExtensionProc service() returned OK It seems like an error occurs: Error sending initial post -1 0 0. Does anyone know what this means? Even though the log says: HttpExtensionProc service() returned OK, a response is never returned. The browser simply gets a timeout! Any help would be greatly appreciated Thanks, Rasmus -Original Message- From: Jeff Trout [mailto:[EMAIL PROTECTED] Sent: 19. januar 2004 13:39 To: Rasmus Munk Cc: [EMAIL PROTECTED] Subject: Re: Problems with jk2 on IIS 5.0 and Tomcat 4.0 On Fri, 16 Jan 2004 15:54:00 EST "Rasmus Munk" <[EMAIL PROTECTED]> wrote: > > HttpFilterProc [/camping_lars/servlet/camping.XMLServer.Server] is a > servlet url - should redirect to ajp13:localhost:8009 HttpFilterProc > check if [/camping_lars/servlet/camping.XMLServer.Server] is pointing > to the web-inf directory HttpFilterProc started In HttpFilterProc > Virtual Host redirection of localhost : 80 HttpFilterProc > [/jakarta/isapi_redirector2.dll] is not a servlet url HttpFilterProc > check if [/jakarta/isapi_redirector2.dll] is pointing to the web-inf > directory HttpExtensionProc started HttpExtensionProc could not get a > worker for name HttpExtensionProc worker is NULL > I just recently spent a few days struggling with this 1. Did you setup the /jakarta/ virtual dir properly (pointing it to the dir that has isapi_redirector2.dll? 2. Did you install isapi_redirector2.dll at the server or site level? I found on w2k sp4 that I had to install it at the SITE level... Oddly it worked fine
Re: TC5 won't start on Xeon | severe error
Ok, what was needed was an installation of SDK 1.4 and the creation of an empty \lib directory. Now TC5 starts, but with "severe" error. Any idea? 19 -ܺ 2004 4:19:19 ¹¹ org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 19 -ܺ 2004 4:19:19 ¹¹ org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1625 ms 19 -ܺ 2004 4:19:19 ¹¹ org.apache.catalina.core.StandardService start INFO: Starting service Catalina 19 -ܺ 2004 4:19:19 ¹¹ org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.16 19 -ܺ 2004 4:19:19 ¹¹ org.apache.catalina.core.StandardHost start INFO: XML validation disabled 19 -ܺ 2004 4:19:19 ¹¹ org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) 19 -ܺ 2004 4:19:19 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Gro up\Tomcat 5.0\conf\Catalina\localhost\admin.xml 19 -ܺ 2004 4:19:20 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Gro up\Tomcat 5.0\conf\Catalina\localhost\balancer.xml 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Error filterStart 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Gro up\Tomcat 5.0\conf\Catalina\localhost\manager.xml 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /jsp-examples from URL file:C:\ Program Files\Apache Group\Tomcat 5.0\webapps\jsp-examples 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Error filterStart 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path from URL file:C:\Program Files \Apache Group\Tomcat 5.0\webapps\ROOT 19 -ܺ 2004 4:19:21 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /servlets-examples from URL fil e:C:\Program Files\Apache Group\Tomcat 5.0\webapps\servlets-examples 19 -ܺ 2004 4:19:22 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Error filterStart 19 -ܺ 2004 4:19:22 ¹¹ org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors 19 -ܺ 2004 4:19:22 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /tomcat-docs from URL file:C:\P rogram Files\Apache Group\Tomcat 5.0\webapps\tomcat-docs 19 -ܺ 2004 4:19:22 ¹¹ org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /users from URL file:C:\Program Files\Apache Group\Tomcat 5.0\webapps\users 19 -ܺ 2004 4:19:22 ¹¹ org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 19 -ܺ 2004 4:19:22 ¹¹ org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 19 -ܺ 2004 4:19:22 ¹¹ org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/31 config=C:\Program Files\Apache Group\Tomcat 5.0 \conf\jk2.properties 19 -ܺ 2004 4:19:22 ¹¹ org.apache.catalina.startup.Catalina start INFO: Server startup in 3172 ms - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using JDBC Realms
I would suggest you let the database do the enforcing. If you are using individual user IDs, define database groups with those access rights and place the users on them. If you are using an application ID and doing user authentication in a different way, you can define an application ID for each one of those access right sets, define a datasource for each, and simply use the right datasource for the type of user. If your access rights requirements change in the future, you simply modify the access rights of the database group or application ID. -Original Message- From: ext hhlow [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 1:50 AM To: Tomcat Users List Subject: Using JDBC Realms Hi, How can i group my users to 3 categories? that is : general users administrator registered users general users have no information stored in the car database whereas administrator and registered users have some kind of information stored in the car database general users can do select statements only registered users can do select, insert, update to the car database adminstrator have all the access to the car database Scenario - Tom - general user He have no data in the database but he can do query on the car database Jack - registered user He have his information stored in the database, can do insert of information and updating information ot the car database Tim - administrator He have his information stored in the database, can do anything to the car database Anyone please give me a rough idea how is this possible. Thank you. Clement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out of memory problem. Help!
We fixed our session timeout to 15 minutes for 100 users and Tomcat hasn't crashed for 36 hours. Does anyone know how we can adjust for the possibilities of 1000's of users??? Christian Witucki Network Analyst 375 Essjay Road Williamsville, NY 14221 716-631-3001 x3812 CONFIDENTIALITY NOTICE. This e-mail and attachments, if any, may contain confidential information which is privileged and protected from disclosure by Federal and State confidentiality laws, rules or regulations. This e-mail and attachments, if any, are intended for the designated addressee only . If you are not the designated addressee, you are hereby notified that any disclosure, copying, or distribution of this e-mail and its attachments, if any, may be unlawful and may subject you to legal consequences. If you have received this e-mail and attachments in error, please contact Independent Health immediately at (716) 631-3001 and delete the e-mail and its attachments from your computer. Thank you for your attention. >>> [EMAIL PROTECTED] 01/19/04 01:20AM >>> Check session-timeout in web.xml. -1 is never timeout -1 -Original Message- From: Christophe Andreoli [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 9:19 PM To: Tomcat Users List Subject: Re: out of memory problem. Help! "Shapira, Yoav" wrote: > > Howdy, > > >root cause > > > >java.lang.OutOfMemoryError > > > > > >It happens When the corresponding request returns more than 2-3 > >rows from the database, not every time > Perhaps you should allocate your JVM more memory, by using the Java -Xmx > parameter. I did it and I gave 512 Mb. It works better but why are the 2000 objects are not garbaged after each request ? Alternatively, consider a system design that retrieves a > smaller, fixed number of rows instead of "2-3" and lets the user > scroll, say 100 rows at a time. > > Yoav Shapira > - 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: Antwort: [OFF-TOPIC] ObjectOutputStream keeping handles
I encountered this problem 3-4 years ago. According to Sun this is by design. ObjectOutputStream keeps the handles of all objects until you execute a reset() or close the stream. Unfortunately, if you don't do one of these things you end up with a memory leak because the objects are never garbage collected. Also, our testing back then showed that resetting the output stream each time is slow. I think we settled for a reset every 100 objects. Just in case, you might want to also check to make sure that the reset() does not make you loose objects before you get them through the input stream. This was not an issue for us (we were streaming snapshots from a camera and had no visible effect), so we never checked to see if it was a problem. The last time I looked, they had slightly improved the documentation so that it at least gave some "clue" that this was happening, but they had not yet made it 100% obvious. -Original Message- From: ext [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 6:55 AM To: Tomcat Users List Subject: Antwort: [OFF-TOPIC] ObjectOutputStream keeping handles hi yoav, have you tried java.io.ObjectOutputStream.reset()? uli "Shapira, Yoav" <[EMAIL PROTECTED]An: "Tomcat Users List" <[EMAIL PROTECTED]> .com>Kopie: Thema:[OFF-TOPIC] ObjectOutputStream keeping handles 16.01.04 18:01 Bitte antworten an "Tomcat Users List" Howdy, Has anyone bumped into an issue where java.io.ObjectOutputStream keep references to serialized objects until the stream is closed, thereby preventing the objects from being garbage-collected? I know I can get around this by closing and reopening the stream after every write, but that seems to be a high-overhead approach. Any other ideas? writeUnshared() perhaps? Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataSource Realm
This is probably not the only way to accomplish what you want, but a simple one to code for. 1)Define your DataSource resource in of conf/server.xml. 2)Add a to the DataSource in the application context file in conf/Catalina//.xml This way the only applications that are able to access the datasource are the ones with a entry. -Original Message- From: ext Pfingstl Gernot [mailto:[EMAIL PROTECTED] Sent: Sunday, January 18, 2004 3:32 PM To: [EMAIL PROTECTED] Subject: DataSource Realm If I want to use a DataSourceRealm (tomcat 4.1) like I had to configure a JNDI named JDBC DataSource "java:/comp/env/jdbc/authority". So all web applications can also use this DataSource and can read the user-table - this is possibly a security hole. Is there a way to prohibit web applications to use this DataSource? Thanks, Gernot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat
I assume you found this mailing list in jakarta.apache.org/tomcat. There is extensive documentation in the site to help you get started - not perfect, but very good. Support is through this mailing list (I have seen a few names repeat often, and I would not be surprised if they were part of the Tomcat team). I don't know of any, but I would imagine there are a few commercial outfits that offer support for $$$. Comparing Tomcat vs Jrun is tough. I have used Tomcat, JRun, jBoss, Weblogic and some others, and they are all "the best" for different sets of conditions. It depends on what you are looking for. In theory a container is a container is a container, and they all rarely fail anymore. Developers will typically prefer the one with the best documentation and fewest quirks. For production, there could be many factors to push you to one or the other: performance, capacity (# of concurrent users), scalability, ease of monitoring/support, security, etc. You have to decide which factors are important for YOU and then compare the containers. -Original Message- From: ext Haddad, Bayan M [mailto:[EMAIL PROTECTED] Sent: Sunday, January 18, 2004 6:07 AM To: [EMAIL PROTECTED] Subject: Tomcat I would like to learn more about Tomcat for Unix Solaris. Where can I find information on it, documentation, download the software, installation procedure, Tomcat V.S Jrun ?. Who support it?. Your help is greatly appreciated. Bayan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[JSP] use of quotes inside expressions inside attributes
Hello all. I have a question concerning the correct way to use quotes inside of expressions, when those expressions are inside attributes. What is the correct syntax? I've looked in the JSP specification and I can't find a clear answer. Below I've listed three different ways that I can create attribute values using a combination of static strings and method returns. All three are accepted by Tomcat. However, my IDE doesn't accept all of them. Which of these three are acceptable by the JSP specs? Mixed Double-Quotes This is where double quotes inside the expression are not interpreted as the end of the attribute: " /> Alternative Quotes This is where all quotes inside the attribute are single quotes, preventing the interpreter/compiler complaining about a premature completion of the attribute: Escaped Double-Quotes This is where all quotes inside the attribute are escaped (this is probably the hardest of the three to read): " /> Thanks -- Jay Glanville - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC5 won't start on Xeon | some progress
As you hinted, I installed SDK 1.4.0 and things changed. With the modified startup.bat, DOS windows does not close now, and reports that the %tomcathome%\lib directory is missing. With the original startup.bat, no complains about \lib, but the new Tomcat window which normaly opens, closes immediately. Tomcat on my machine (which works fine) does not have a \lib. > Rename the files to txt, else a lot of people can't see them. > Sorry about that. @echo off if "%OS%" == "Windows_NT" setlocal rem --- rem Start script for the CATALINA Server rem rem $Id: startup.bat,v 1.4 2002/08/04 18:19:43 patrickl Exp $ rem --- rem Guess CATALINA_HOME if not defined if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=. if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome set CATALINA_HOME=.. :gotHome if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome echo The CATALINA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program goto end :okHome set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat rem Check that target executable exists if exist "%EXECUTABLE%" goto okExec echo Cannot find %EXECUTABLE% echo This file is needed to run this program goto end :okExec rem Get remaining unshifted command line arguments and save them in the set CMD_LINE_ARGS= :setArgs if ""%1""== goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs call "%EXECUTABLE%" start %CMD_LINE_ARGS% :end factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\Administrator\Application Data CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 5.0 CLASSPATH=. CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=ORA9IAS ComSpec=C:\WINNT\system32\cmd.exe EM_OC4J_OPTS=-Doc4j.developer.useCTSPathInfo=FALSE HOMEDRIVE=C: HOMEPATH=\Documents and Settings\Administrator JAVA_HOME=C:\j2sdk1.4.0 LOGONSERVER=\\ORA9IAS NUMBER_OF_PROCESSORS=2 OS=Windows_NT Os2LibPath=C:\WINNT\system32\os2\dll; Path=C:\ora9ias9.0.2\bin;C:\ora9ias9.0.2\jlib;C:\ora9ias\bin;C:\ora9ias\jlib;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.0\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0207 ProgramFiles=C:\Program Files PROMPT=$P$G SystemDrive=C: SystemRoot=C:\WINNT TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp USERDOMAIN=ORA9IAS USERNAME=Administrator USERPROFILE=C:\Documents and Settings\Administrator windir=C:\WINNT @echo off if "%OS%" == "Windows_NT" setlocal rem --- rem Start/Stop Script for the CATALINA Server rem rem Environment Variable Prequisites rem rem CATALINA_HOME May point at your Catalina "build" directory. rem rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions rem of a Catalina installation. If not present, resolves to rem the same directory that CATALINA_HOME points to. rem rem CATALINA_OPTS (Optional) Java runtime options used when the "start", rem "stop", or "run" command is executed. rem rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory rem the JVM should use (java.io.tmpdir). Defaults to rem %CATALINA_BASE%\temp. rem rem JAVA_HOME Must point at your Java Development Kit installation. rem rem JAVA_OPTS (Optional) Java runtime options used when the "start", rem "stop", or "run" command is executed. rem rem JSSE_HOME (Optional) May point at your Java Secure Sockets Extension rem (JSSE) installation, whose JAR files will be added to the rem system class path used to start Tomcat. rem rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" rem command is executed. The default is "dt_shmem". rem rem JPDA_ADDRESS(Optional) Java runtime options used when the "jpda start" rem