Enable SSL stack trace within Apache Tomcat service
Hi all, I am trying to log the handshaking process of SSL. I have added in the Java debug options (-Djavax.net.debug=all) in the Apache Tomcat Service configuration window; however i can't see any SSL handshaking msg in the log files. I am running Tomcat as services. My tomcat version is 5.5.7, JRE 1.5, Window 2000 NT. i have startup tomcat server using command prompt and i also enable the SSL debug option. Using this way, i am able to see the SSL handshaking msg. Do somebody know how to do it in order to have the SSL exchanging msg in the log files if i run the tomcat as services ? Thanks for your help yang
load on startup
Hi all, I need an object to be instanciated on the startup of my tomcat. So I did a servlet the creates an instance of it and put my servlet in the web.xml of a webapp with the loadOnStartup parameter. The constructor of my object is called twice so there must be 2 instances of it ... which is a problem. (when I call the url of the servlet that creates the instance, only one is created) Could someone explain me why the constructor is called twice (why do I have 2 instances ?) and/or could someone give me another solution to have one and only one instance of the object created on the tomcat startup ? Thanks, Nicolas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: anonymising Tomcat
From: Paul Singleton [mailto:[EMAIL PROTECTED] Is it possible to configure Tomcat (5.5.9) so that a moderately able hacker couldn't figure out what is serving up our web apps? It's possible to add the 'server' attribute to the connector definition for the HTTP connector; server=BogoMAX v0.1 testing should anonymise the single most obvious piece of information, but pick your own string so that when the hacker searches Google for the string they don't find this post. See http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for details. It's possible that a more able hacker could also gain information from the usual range of specially-crafted invalid TCP packets [so use a decent firewall in front of the app server that detects and drops these], from traffic analysis of the way in which the app server returns data in the case of buffered and unbuffered pages, and likely from other techniques that I've not considered. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
frames and mod_jk on Windows
Hi all, Is anyone aware of a problem with using frames and mod_jk on windows? I'm using Apache 1.3.33 - mod_jk 1.2.14 and I've got the folowing problem: I'm trying to access an HTML page with frames in it. Only the first frame is correctly displayed; the other says Internal Server Error My HTML page is called toto.html, the first frame is bonjour.jsp and the second is bonjour2.jsp (the two jsps are identical) If anyone could tell me if I'm doing something wrong :( Thanks... On the apache side (in the mod_jk.log file) I get the following traces: [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/myapp/toto.html' from 8 maps [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/myapp/*' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (475): Found a wildchar match bonita_worker - /myapp/* [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_worker.c (111): found a worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_worker.c (301): Maintaining worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] mod_jk.c (488): Service protocol=HTTP/1.1 method=GET host=(null) addrr=129.185.75.10 name=biguine.frcl.bull.fr port=8000 auth=(null) user=(null) laddr=129.182.22.21 raddr=129.185.75.10 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (2131): acquired connection cache slot=0 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (566): ajp marshaling done [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1670): processing with 3 retries [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (909): sending to ajp13 pos=4 len=273 max=8192 . [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1261): request body to send 0 - request body to resend 0 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1037): received from ajp13 pos=0 len=139 max=8192 . [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (621): status = 200 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (628): Number of headers is = 4 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[0] [ETag] = [W/546-1123233762561] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[1] [Last-Modified] = [Fri, 05 Aug 2005 09:22:42 GMT] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[2] [Content-Type] = [text/html] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[3] [Content-Length] = [546] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1037): received from ajp13 pos=0 len=550 max=8192 . [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1037): received from ajp13 pos=0 len=2 max=8192 ... [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (2074): recycling connection cache slot=0 for worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] mod_jk.c (1828): Service finished with status=200 for worker=bonita_worker [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/myapp/bonjour.jsp' from 8 maps [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/myapp/*' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (475): Found a wildchar match bonita_worker - /myapp/* [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_worker.c (111): found a worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] mod_jk.c (488): Service protocol=HTTP/1.1 method=GET host=(null) addrr=129.185.75.10 name=biguine.frcl.bull.fr port=8000 auth=(null) user=(null) laddr=129.182.22.21 raddr=129.185.75.10 [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_ajp_common.c (2131): acquired connection cache slot=0 [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_ajp_common.c (566): ajp marshaling
RE: load on startup
Hi, You could have two instances of your object because of an improper mapping in web.xml. For example if in your servlet mapping the url-pattern for your servlet is /*, any access to your app will access this servlet thus resulting in two instantiations. You should initialize your object in the init method of the servlet instead of the service/doPost/doGet methods. Regards, Marius -Original Message- From: Nicolas Schwartz [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:23 AM To: tomcat-user@jakarta.apache.org Subject: load on startup Hi all, I need an object to be instanciated on the startup of my tomcat. So I did a servlet the creates an instance of it and put my servlet in the web.xml of a webapp with the loadOnStartup parameter. The constructor of my object is called twice so there must be 2 instances of it ... which is a problem. (when I call the url of the servlet that creates the instance, only one is created) Could someone explain me why the constructor is called twice (why do I have 2 instances ?) and/or could someone give me another solution to have one and only one instance of the object created on the tomcat startup ? Thanks, Nicolas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to turn off perssitent sessions in Tomcat 4.1?
Can any one help me out in this issue? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 04, 2005 11:27 AM To: tomcat-user@jakarta.apache.org Subject: RE: How to turn off perssitent sessions in Tomcat 4.1? I am waiting for a good response. Can any body help me out in this? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 6:01 PM To: tomcat-user@jakarta.apache.org Subject: RE: How to turn off perssitent sessions in Tomcat 4.1? Hi Edgar, Thanks for the reply. But I am using Tomcat 4.1.29 and I tried this option (I mean, pathname= in Manager element of server.xml) in Tomcat 4.1.29, which is not successful. Is there any way to turn off session persistence in Tomcat 4.1 itself or I need to upgrade to Tomcat 5.0. In order to avoid the exception we have to make all the objects that is put in session to be serializable, right no?. I am using struts framework. So by default all form beans are serializable and all primitive data types are also serializable. Why Tomcat complains about CoyoteRequestFacade is not serializable? Please clarify my doubts. Advance thanks to all of u !!! -Original Message- From: Edgar Alves [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 5:00 PM To: Tomcat Users List Subject: Re: How to turn off perssitent sessions in Tomcat 4.1? Hi, On Tomcat 5.5 you can turn persistent session loading off by setting the SessionManager pathname attribute to . Hope that helps. -- Edgar Alves [EMAIL PROTECTED] wrote: Hi, I am using Apache+Tomcat 4.1.29 for running my application. When I am restarting Tomcat I am getting persistent session loading exception like this: 2004-03-11 13:52:18 StandardManager[] IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.coyote.tomcat4.CoyoteRequestFacade java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.coyote.tomcat4.CoyoteRequestFacade at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:164 6 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:164 6 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.session.StandardSession.readObject(StandardSession. j ava:1369) I am not using clustering. I want to turn off the session persistence in Tomcat 4.1.29? I have tried so many options with StandardManager in server.xml. But I was not successful. Please help me out in this? Regards AK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
Http Keep-Alive
Does anyone know the property in the server.xml file on Tomcat for switching off http keep-alives? I'm using version 3.2.1. I can't find a listing for this deprecated version - Thanks, Jamie. ** Disclaimer: This message may contain privileged or confidential information. If you are not the intended recipient, please notify the sender and delete this message. Please be advised that any disclosure, copying, distribution or use of this information is strictly prohibited. Views expressed in this message are those of the individual sender and are not necessarily the views of Streamdoor Ltd, unless otherwise stated. Although Streamdoor Ltd has taken precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage caused arising from the use of this email or attachment. www.streamdoor.com **
Re: load on startup
Use a ServletContextListener, they were added to the Servlet 2.3 spec for this very purpose. You set up your object in the contextInitialized(...) method of your implementation and tear it down in contextDestroyed(...). For it to be used you need to add it to your web.xml. The container is free to init and destroy servlets as it sees fit after complying with load-on-startup directives. That's why use of load-on-startup for initialization of application scope objects is prone to error and unforeseen circumstances. my $0.02 and HTH, Jon Nicolas Schwartz wrote: Hi all, I need an object to be instanciated on the startup of my tomcat. So I did a servlet the creates an instance of it and put my servlet in the web.xml of a webapp with the loadOnStartup parameter. The constructor of my object is called twice so there must be 2 instances of it ... which is a problem. (when I call the url of the servlet that creates the instance, only one is created) Could someone explain me why the constructor is called twice (why do I have 2 instances ?) and/or could someone give me another solution to have one and only one instance of the object created on the tomcat startup ? Thanks, Nicolas - 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]
Directory Listing using JSP
Dear Users, I am using Tomcat 5.0.28. For a web application called testweb, I have made DirectoryListing true so that I can view the directory contents of this webapp. I am able to see the Directory Listing for testweb. My qustion is : how to achieve the same in JSP ? Is there any method to do so in JSP ? For example when I use JSP 'include' directive or 'include' action, I am not able to see the Directory Listing for testweb. Rakesh Kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: frames and mod_jk on Windows
Frédéric Viollet a écrit : Hi all, Is anyone aware of a problem with using frames and mod_jk on windows? I'm using Apache 1.3.33 - mod_jk 1.2.14 and I've got the folowing problem: I'm trying to access an HTML page with frames in it. Only the first frame is correctly displayed; the other says Internal Server Error My HTML page is called toto.html, the first frame is bonjour.jsp and the second is bonjour2.jsp (the two jsps are identical) If anyone could tell me if I'm doing something wrong :( Thanks... On the apache side (in the mod_jk.log file) I get the following traces: [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/myapp/toto.html' from 8 maps [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/myapp/*' [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_uri_worker_map.c (475): Found a wildchar match bonita_worker - /myapp/* [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_worker.c (111): found a worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_worker.c (301): Maintaining worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] mod_jk.c (488): Service protocol=HTTP/1.1 method=GET host=(null) addrr=129.185.75.10 name=biguine.frcl.bull.fr port=8000 auth=(null) user=(null) laddr=129.182.22.21 raddr=129.185.75.10 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (2131): acquired connection cache slot=0 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (566): ajp marshaling done [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1670): processing with 3 retries [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (909): sending to ajp13 pos=4 len=273 max=8192 . [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1261): request body to send 0 - request body to resend 0 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1037): received from ajp13 pos=0 len=139 max=8192 . [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (621): status = 200 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (628): Number of headers is = 4 [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[0] [ETag] = [W/546-1123233762561] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[1] [Last-Modified] = [Fri, 05 Aug 2005 09:22:42 GMT] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[2] [Content-Type] = [text/html] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (684): Header[3] [Content-Length] = [546] [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1037): received from ajp13 pos=0 len=550 max=8192 . [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (1037): received from ajp13 pos=0 len=2 max=8192 ... [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] jk_ajp_common.c (2074): recycling connection cache slot=0 for worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:5584] [debug] mod_jk.c (1828): Service finished with status=200 for worker=bonita_worker [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/myapp/bonjour.jsp' from 8 maps [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin/*' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jonasAdmin' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/jiapAdmin' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/myapp/*' [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_uri_worker_map.c (475): Found a wildchar match bonita_worker - /myapp/* [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_worker.c (111): found a worker bonita_worker [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] mod_jk.c (488): Service protocol=HTTP/1.1 method=GET host=(null) addrr=129.185.75.10 name=biguine.frcl.bull.fr port=8000 auth=(null) user=(null) laddr=129.182.22.21 raddr=129.185.75.10 [Fri Aug 05 11:24:22 2005] [5172:2684] [debug] jk_ajp_common.c (2131): acquired connection cache slot=0 [Fri Aug 05 11:24:22 2005] [5172:2684] [debug]
Re: anonymising Tomcat
Peter Crowther wrote: From: Paul Singleton [mailto:[EMAIL PROTECTED] Is it possible to configure Tomcat (5.5.9) so that a moderately able hacker couldn't figure out what is serving up our web apps? It's possible to add the 'server' attribute to the connector definition for the HTTP connector; server=BogoMAX v0.1 testing should anonymise the single most obvious piece of information, but pick your own string so that when the hacker searches Google for the string they don't find this post. See http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for details. It's possible that a more able hacker could also gain information from the usual range of specially-crafted invalid TCP packets [so use a decent firewall in front of the app server that detects and drops these], from traffic analysis of the way in which the app server returns data in the case of buffered and unbuffered pages, and likely from other techniques that I've not considered. OK, thanks for this. My standalone 5.5.9 setup sends (according to LiveHTTPHeaders) Server: Apache-Coyote/1.1 (?) but there's another giveaway: request a non-existent page and you get HTTP Status 404 - /myapp/nonexistent type Status report message /myapp/nonexistent description The requested resource (/myapp/nonexistent) is not available. Apache Tomcat/5.5.9 so I'm searching the docs for a clue about auppressing this (nothing in Server Configuration Reference so far). But I'm worried that there might be other telltales, e.g. buried in the code which responds to bad HTTP requests or whatever? I'm not paranoid, but some of our customers are :-) and we have to be prepared to be reasonably diligent about these things. So I was hoping that someone, somewhere had already delved into this? Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.1/64 - Release Date: 4/Aug/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help: IndexOutOfBoundsException using JMX management
Hi, I want to monitore and manage my tomcat instance using JMX. I use tomcat-5.4.4 and a JDK-1.5 under suse linux. I do the actions specified in the official documentation (Monitoning and managing tomcat). ~/bin/startup.sd export CATALINA_OPTS=-Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=8789\ -Dcom.sun.management.jmxremote.ssl=false\ -Dcom.sun.management.jmxremote.authenticate=false ~/conf/server.xml Connector port=8790 handler.list=mx mx.enabled=true mx.httpHost=Linux2 mx.httpPort=8789 protocol=AJP/1.3 / I don't use passwords, I am just testing the JMX funcionality. In a near future, I will activate passwords with a better security. When I start tomcat, the JMX service is activated. I can see the ports related to JMX in the netstat output. Linux2:/home/ctomcat # netstat -nap | grep tcp tcp0 0 0.0.0.0:111 0.0.0.0:* LISTEN 760/ tcp0 0 0.0.0.0:60000.0.0.0:* LISTEN 1689/X tcp0 0 127.0.0.1:250.0.0.0:* LISTEN 1133/ tcp0 0 127.0.0.1:8005 :::* LISTEN 6483/java tcp0 0 :::33128:::* LISTEN 6483/java tcp0 0 :::8009 :::* LISTEN 6483/java tcp0 0 :::8080 :::* LISTEN 6483/java tcp0 0 :::8789 :::* LISTEN 6483/java --- JMX port tcp0 0 :::8790 :::* LISTEN 6483/java --- JMX connector port tcp0 0 :::22 :::* LISTEN 955/sshd The problem arises when I do a JMX request with any web broser. For example: [EMAIL PROTECTED]:~ wget http://localhost:8790 --14:04:07-- http://localhost:8790/ = `index.html' Resolving localhost... done. Connecting to localhost[::1]:8790... connected. HTTP request sent, awaiting response... 14:04:07 ERROR -1: No data received. In the ~/logs/catalina.log appears: 05-ago-2005 14:03:07 org.apache.jk.common.MsgAjp processHeader GRAVE: BAD packet signature 18245 05-ago-2005 14:03:07 org.apache.jk.common.ChannelSocket processConnection GRAVE: Error, processing connection java.lang.IndexOutOfBoundsException at java.io.BufferedInputStream.read(BufferedInputStream.java:306) at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:598) at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:554) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:663) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) How can I solve this problem? I must upgrade to a newer tomcat version. I consult the changelogs between 5.4.4 and the last Tomcat and I don't see any references about this problem. Is this problem solved or it is an erroniuos configuration. Thanks a lot for your attention. Regards, Xevi. __ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to turn off perssitent sessions in Tomcat 4.1?
Only put objects into the session that are serializable. This is a best practice anyway. Tomcat complains about CoyoteRequestFacade not being serializable because it isn't. If you need data from the request (parameter, attributes etc.) in your session then extract them and put them alone into the session. Or you could simply ignore the error messages at startup. [EMAIL PROTECTED] wrote: Can any one help me out in this issue? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 04, 2005 11:27 AM To: tomcat-user@jakarta.apache.org Subject: RE: How to turn off perssitent sessions in Tomcat 4.1? I am waiting for a good response. Can any body help me out in this? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 6:01 PM To: tomcat-user@jakarta.apache.org Subject: RE: How to turn off perssitent sessions in Tomcat 4.1? Hi Edgar, Thanks for the reply. But I am using Tomcat 4.1.29 and I tried this option (I mean, pathname= in Manager element of server.xml) in Tomcat 4.1.29, which is not successful. Is there any way to turn off session persistence in Tomcat 4.1 itself or I need to upgrade to Tomcat 5.0. In order to avoid the exception we have to make all the objects that is put in session to be serializable, right no?. I am using struts framework. So by default all form beans are serializable and all primitive data types are also serializable. Why Tomcat complains about CoyoteRequestFacade is not serializable? Please clarify my doubts. Advance thanks to all of u !!! -Original Message- From: Edgar Alves [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 5:00 PM To: Tomcat Users List Subject: Re: How to turn off perssitent sessions in Tomcat 4.1? Hi, On Tomcat 5.5 you can turn persistent session loading off by setting the SessionManager pathname attribute to . Hope that helps. -- Edgar Alves [EMAIL PROTECTED] wrote: Hi, I am using Apache+Tomcat 4.1.29 for running my application. When I am restarting Tomcat I am getting persistent session loading exception like this: 2004-03-11 13:52:18 StandardManager[] IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.coyote.tomcat4.CoyoteRequestFacade java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.coyote.tomcat4.CoyoteRequestFacade at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:164 6 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:164 6 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.session.StandardSession.readObject(StandardSession. j ava:1369) I am not using clustering. I want to turn off the session persistence in Tomcat 4.1.29? I have tried so many options with StandardManager in server.xml. But I was not successful. Please help me out in this? Regards AK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.X Apache 2.X
Anyone know where I can get an howto to configure Tomcat 5.X and Apache 2.X using mod_jk on Debian. Thanks in advance, -- Rodrigo Andrade Pádua M.I. Montreal Informática Ltda (31) 3280-7649 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jakarta - taglibs
hi , Can we use jakarta Tag Libs to connecting to a database via JNDI and select an images from BLOB data field ? and aslo can we use that tags to having Links for each images ? That Links also stored in the database ? Can we display images randomly with the appropriate links ? if it is possible , can somebody give me some examples ? Thanx Kane. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: anonymising Tomcat
Servlet spec 2.4 describes what you're looking for in section SRV 9.9.2 with more info in SRV.13.4 on how to configure it. Essentially you're looking for this in web.xml: error-page error-code404/error-code location/some/error/page.jsp/location /error-page There's also a version for dealing with exceptions: error-page exception-typejava.io.IOException/exception-type location/some/error/page.jsp/location /error-page Just make sure you use this at the top of you web.xml file to insure you get spec 2.4 processing: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3c.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 --David Paul Singleton wrote: Peter Crowther wrote: From: Paul Singleton [mailto:[EMAIL PROTECTED] Is it possible to configure Tomcat (5.5.9) so that a moderately able hacker couldn't figure out what is serving up our web apps? It's possible to add the 'server' attribute to the connector definition for the HTTP connector; server=BogoMAX v0.1 testing should anonymise the single most obvious piece of information, but pick your own string so that when the hacker searches Google for the string they don't find this post. See http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for details. It's possible that a more able hacker could also gain information from the usual range of specially-crafted invalid TCP packets [so use a decent firewall in front of the app server that detects and drops these], from traffic analysis of the way in which the app server returns data in the case of buffered and unbuffered pages, and likely from other techniques that I've not considered. OK, thanks for this. My standalone 5.5.9 setup sends (according to LiveHTTPHeaders) Server: Apache-Coyote/1.1 (?) but there's another giveaway: request a non-existent page and you get HTTP Status 404 - /myapp/nonexistent type Status report message /myapp/nonexistent description The requested resource (/myapp/nonexistent) is not available. Apache Tomcat/5.5.9 so I'm searching the docs for a clue about auppressing this (nothing in Server Configuration Reference so far). But I'm worried that there might be other telltales, e.g. buried in the code which responds to bad HTTP requests or whatever? I'm not paranoid, but some of our customers are :-) and we have to be prepared to be reasonably diligent about these things. So I was hoping that someone, somewhere had already delved into this? Paul Singleton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.X Apache 2.X
Anyone know where I can get an howto to configure Tomcat 5.X and Apache 2.X using mod_jk on Debian. Thanks in advance, -- Rodrigo Andrade Pádua M.I. Montreal Informática Ltda (31) 3280-7649 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Install from Source File.zip is bad
I'm trying to install Tomcat 5.5.9 from the source distribution on Win XP. The build fails because the following file can't be expanded \usr\share\java\file.zip When I try to unzip it manually I get an error that it's not a valid archive file. Anyone know where I can get a proper copy of this file? BTW I'm using ant 1.6.5. -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Install from Source File.zip is bad
More info on this: The ant command that downloads the file that can't be unzipped is antcall target=downloadzip param name=sourcefile value=${junit.loc}/ param name=destfile value=${junit.jar}/ param name=destdir value=${base.path}/ /antcall There's no value defined for junit.loc anywhere in the script, so I'm not sure how the location of the downloaded file is specified. This is the case with all the files downloaded in the build script, so I'm sure it's just my ignorance of how the ant script gets the files form CVS. Can someone please enlighten me as to how I can determine the source of this file that's failing to be unzipped, and what might be causing that? -Mark Mark Leone wrote: I'm trying to install Tomcat 5.5.9 from the source distribution on Win XP. The build fails because the following file can't be expanded \usr\share\java\file.zip When I try to unzip it manually I get an error that it's not a valid archive file. Anyone know where I can get a proper copy of this file? BTW I'm using ant 1.6.5. -Mark - 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 Install from Source File.zip is bad
I believe the problem is that the mirror the ant script defaults to does not have all the correct files for some reason. This is just my assumption. I solved this problem by changing the Sourceforge location in jakarta-tomcat-5.5.9-src/Jakarta-tomcat-5/build.properties.default Look for the section: # - Sourceforge files base location - base-sf.loc=http://unc.dl.sourceforge.net/sourceforge We changed to use the EasyNews mirror: base-sf.loc=http://easynews.dl.sourceforge.net/sourceforge Good luck. Jeff Spors Winona State University -Original Message- From: Mark Leone [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:19 AM To: Tomcat Users List Subject: Re: Tomcat Install from Source File.zip is bad More info on this: The ant command that downloads the file that can't be unzipped is antcall target=downloadzip param name=sourcefile value=${junit.loc}/ param name=destfile value=${junit.jar}/ param name=destdir value=${base.path}/ /antcall There's no value defined for junit.loc anywhere in the script, so I'm not sure how the location of the downloaded file is specified. This is the case with all the files downloaded in the build script, so I'm sure it's just my ignorance of how the ant script gets the files form CVS. Can someone please enlighten me as to how I can determine the source of this file that's failing to be unzipped, and what might be causing that? -Mark Mark Leone wrote: I'm trying to install Tomcat 5.5.9 from the source distribution on Win XP. The build fails because the following file can't be expanded \usr\share\java\file.zip When I try to unzip it manually I get an error that it's not a valid archive file. Anyone know where I can get a proper copy of this file? BTW I'm using ant 1.6.5. -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Install from Source File.zip is bad
Okay, I faked it out by getting my own copy of JUnit and putting it in the \usr\java\share directory. But now it's choking on jaxen, saying the file is not in gzip format. I downloaded a copy of jaxen and placed it in teh directory, but this time it didn't work. Am I missing something here, or is it just hit or miss whether the files in the cvs repository are actually what the ant script is expecting? -Mark Mark Leone wrote: More info on this: The ant command that downloads the file that can't be unzipped is antcall target=downloadzip param name=sourcefile value=${junit.loc}/ param name=destfile value=${junit.jar}/ param name=destdir value=${base.path}/ /antcall There's no value defined for junit.loc anywhere in the script, so I'm not sure how the location of the downloaded file is specified. This is the case with all the files downloaded in the build script, so I'm sure it's just my ignorance of how the ant script gets the files form CVS. Can someone please enlighten me as to how I can determine the source of this file that's failing to be unzipped, and what might be causing that? -Mark Mark Leone wrote: I'm trying to install Tomcat 5.5.9 from the source distribution on Win XP. The build fails because the following file can't be expanded \usr\share\java\file.zip When I try to unzip it manually I get an error that it's not a valid archive file. Anyone know where I can get a proper copy of this file? BTW I'm using ant 1.6.5. -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Install from Source File.zip is bad
Thanks, that solved it. -Mark Spors, Jeffrey R wrote: I believe the problem is that the mirror the ant script defaults to does not have all the correct files for some reason. This is just my assumption. I solved this problem by changing the Sourceforge location in jakarta-tomcat-5.5.9-src/Jakarta-tomcat-5/build.properties.default Look for the section: # - Sourceforge files base location - base-sf.loc=http://unc.dl.sourceforge.net/sourceforge We changed to use the EasyNews mirror: base-sf.loc=http://easynews.dl.sourceforge.net/sourceforge Good luck. Jeff Spors Winona State University -Original Message- From: Mark Leone [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:19 AM To: Tomcat Users List Subject: Re: Tomcat Install from Source File.zip is bad More info on this: The ant command that downloads the file that can't be unzipped is antcall target=downloadzip param name=sourcefile value=${junit.loc}/ param name=destfile value=${junit.jar}/ param name=destdir value=${base.path}/ /antcall There's no value defined for junit.loc anywhere in the script, so I'm not sure how the location of the downloaded file is specified. This is the case with all the files downloaded in the build script, so I'm sure it's just my ignorance of how the ant script gets the files form CVS. Can someone please enlighten me as to how I can determine the source of this file that's failing to be unzipped, and what might be causing that? -Mark Mark Leone wrote: I'm trying to install Tomcat 5.5.9 from the source distribution on Win XP. The build fails because the following file can't be expanded \usr\share\java\file.zip When I try to unzip it manually I get an error that it's not a valid archive file. Anyone know where I can get a proper copy of this file? BTW I'm using ant 1.6.5. -Mark - 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]
Major fopaw
I have made a major mistake and need some help from the group. I have my system setup to run Jboss and Tomcat applications simultaneously. I am having problems with one of my Tomcat programs and need to access the manager section of Tomcat. Unfortunately, I cannot remember my username and password. Is there a way to determine what that information is without reinstalling Tomcat? Or, perhaps, reset the username and password? I believe I know the username. Please say yes, Embarrassingly, Jef Sullivan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Major fopaw
Go to tomcat\conf\tomcat-users.xml -Original Message- From: Jef Sullivan [mailto:[EMAIL PROTECTED] Sent: 05 August 2005 17:10 To: 'Tomcat Users List' Subject: Major fopaw I have made a major mistake and need some help from the group. I have my system setup to run Jboss and Tomcat applications simultaneously. I am having problems with one of my Tomcat programs and need to access the manager section of Tomcat. Unfortunately, I cannot remember my username and password. Is there a way to determine what that information is without reinstalling Tomcat? Or, perhaps, reset the username and password? I believe I know the username. Please say yes, Embarrassingly, Jef Sullivan - 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: Major fopaw
You mean Faux pas http://en.wikipedia.org/wiki/Faux_pas George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Jef Sullivan [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:10 AM To: 'Tomcat Users List' Subject: Major fopaw I have made a major mistake and need some help from the group. I have my system setup to run Jboss and Tomcat applications simultaneously. I am having problems with one of my Tomcat programs and need to access the manager section of Tomcat. Unfortunately, I cannot remember my username and password. Is there a way to determine what that information is without reinstalling Tomcat? Or, perhaps, reset the username and password? I believe I know the username. Please say yes, Embarrassingly, Jef Sullivan - 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: Major fopaw
I cannot see how you set it up and are in this dilemma. That sounds odd. How'd that happen? On 8/5/05, Jef Sullivan [EMAIL PROTECTED] wrote: I have made a major mistake and need some help from the group. I have my system setup to run Jboss and Tomcat applications simultaneously. I am having problems with one of my Tomcat programs and need to access the manager section of Tomcat. Unfortunately, I cannot remember my username and password. Is there a way to determine what that information is without reinstalling Tomcat? Or, perhaps, reset the username and password? I believe I know the username. Please say yes, Embarrassingly, Jef Sullivan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError
From: Steve Sheerin Sent: Thursday, August 04, 2005 2:29 PM To: '[EMAIL PROTECTED]' Subject: OutOfMemoryError I have a new Tomcat based server that is coming up with this error when communicating with the server. Most of the time it works great, but every now and then we get this message. In checking the server, it's memory looks fine - base is 1 gig, with 600 meg avail. Any ideas Steve Sheerin Clark Public Utilities 360-992-3243
loading resources from the servlet.
I have a class X which needs to load a .properties file. Here is a code snippet: ClassLoader cl = this.getClass().getClassLoader(); InputStream stream = cl.getResourceAsStream(/data/x.properties); It works just fine from my JUnit test for X. Now, I would like this class to be called from the servlet, which would run inside Tomcat 5.5.9. The only way to get that to work is to place my x.properties file inside the package the class X lives in. Well, I'd rather not to mix properties with classfiles. Another way, I can load that file, is to use servlets getServletContext() method. However, that would mean I need to pass the InputStream from the servlets to my class X. Well, I'd rather not to change X to use its caller to get X's properties file. I guess, what I need to do is to add the WEB-INF or ROOT dir of my webapp to the classpath, so the classloader can find it. Or is there some other way of accomplishing it? I think I am missing something fundamental ... cos that doesn't seem to be too strange of a requirement ... Any ideas? Thanks, maciek
Re: loading resources from the servlet.
http://wiki.apache.org/jakarta-tomcat/HowTo#head-45c3314139cb900ddd43dde2ff671532e6e844bc HTH, Jon Maciej Stoszko wrote: I have a class X which needs to load a .properties file. Here is a code snippet: ClassLoader cl = this.getClass().getClassLoader(); InputStream stream = cl.getResourceAsStream(/data/x.properties); It works just fine from my JUnit test for X. Now, I would like this class to be called from the servlet, which would run inside Tomcat 5.5.9. The only way to get that to work is to place my x.properties file inside the package the class X lives in. Well, I'd rather not to mix properties with classfiles. Another way, I can load that file, is to use servlets getServletContext() method. However, that would mean I need to pass the InputStream from the servlets to my class X. Well, I'd rather not to change X to use its caller to get X's properties file. I guess, what I need to do is to add the WEB-INF or ROOT dir of my webapp to the classpath, so the classloader can find it. Or is there some other way of accomplishing it? I think I am missing something fundamental ... cos that doesn't seem to be too strange of a requirement ... Any ideas? Thanks, maciek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError
Hi Steve, We're probably going to need a little more context in order to give you any help. Approximately how often does this happen? Have you been able to isolate a particular page or servlet that causes it consistently? What shows up in the log file/console window when it happens? Does it kill just the request, or the app, or the entire server? I'll give you a couple possibilities to consider (I'm sure smarter people than I will provide others): - A JSP or Servlet with an infinite loop may exhaust the memory and cause the issue, either on that page or (possibly) on other pages while that one is in the process of dying. - You may have a memory leak in one of your apps of a driver (yes, they're possible in java); you can check for symptoms of this by watching the memory usage after a clean start and seeing if it continually goes up by small amounts over time. Even though you have 600 free megs of physical memory I don't believe the JVM will consume all of that by default. Anyway, let us know details. ~PST On 8/5/05, Steve Sheerin [EMAIL PROTECTED] wrote: From: Steve Sheerin Sent: Thursday, August 04, 2005 2:29 PM To: '[EMAIL PROTECTED]' Subject: OutOfMemoryError I have a new Tomcat based server that is coming up with this error when communicating with the server. Most of the time it works great, but every now and then we get this message. In checking the server, it's memory looks fine - base is 1 gig, with 600 meg avail. Any ideas Steve Sheerin Clark Public Utilities 360-992-3243 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Major fopaw
I have been working in Jboss for the most part and simply forgot. The username/password that I wrote down is not correct. As it turns out it isn't even in the tomcat-users.xml file That I was referred to by Mr. Raghupathy. That has resolved my problem by the way, thanks. Jef Sullivan Programmer IKANO Communications, Inc. -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:34 AM To: Tomcat Users List Subject: Re: Major fopaw I cannot see how you set it up and are in this dilemma. That sounds odd. How'd that happen? On 8/5/05, Jef Sullivan [EMAIL PROTECTED] wrote: I have made a major mistake and need some help from the group. I have my system setup to run Jboss and Tomcat applications simultaneously. I am having problems with one of my Tomcat programs and need to access the manager section of Tomcat. Unfortunately, I cannot remember my username and password. Is there a way to determine what that information is without reinstalling Tomcat? Or, perhaps, reset the username and password? I believe I know the username. Please say yes, Embarrassingly, Jef Sullivan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ - 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: Major fopaw
KEWL!!! (I mean cool) Thanks for the spelling lesson. :-) Jef Sullivan Programmer IKANO Communications, Inc. -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:32 AM To: 'Tomcat Users List' Subject: RE: Major fopaw You mean Faux pas http://en.wikipedia.org/wiki/Faux_pas George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Jef Sullivan [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 10:10 AM To: 'Tomcat Users List' Subject: Major fopaw I have made a major mistake and need some help from the group. I have my system setup to run Jboss and Tomcat applications simultaneously. I am having problems with one of my Tomcat programs and need to access the manager section of Tomcat. Unfortunately, I cannot remember my username and password. Is there a way to determine what that information is without reinstalling Tomcat? Or, perhaps, reset the username and password? I believe I know the username. Please say yes, Embarrassingly, Jef Sullivan - 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: loading resources from the servlet.
Thx Jon, I had already looked at the wiki entry you graciously pointed me to. I need a bit more. The class X, I mentioned, is already packaged and I am looking for a way of using it without changing it (unless there is no other way.) It makes the assumption that the ../data folder is in the classpath. In eclipse or via ant I can easily set my classpath 'right', is there a way to do it for the webapp inside Tomcat? Regards, maciek PS. What does HTH stand for? -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 12:28 PM To: Tomcat Users List Subject: Re: loading resources from the servlet. http://wiki.apache.org/jakarta-tomcat/HowTo#head-45c3314139cb900ddd43dde2ff6 71532e6e844bc HTH, Jon Maciej Stoszko wrote: I have a class X which needs to load a .properties file. Here is a code snippet: ClassLoader cl = this.getClass().getClassLoader(); InputStream stream = cl.getResourceAsStream(/data/x.properties); It works just fine from my JUnit test for X. Now, I would like this class to be called from the servlet, which would run inside Tomcat 5.5.9. The only way to get that to work is to place my x.properties file inside the package the class X lives in. Well, I'd rather not to mix properties with classfiles. Another way, I can load that file, is to use servlets getServletContext() method. However, that would mean I need to pass the InputStream from the servlets to my class X. Well, I'd rather not to change X to use its caller to get X's properties file. I guess, what I need to do is to add the WEB-INF or ROOT dir of my webapp to the classpath, so the classloader can find it. Or is there some other way of accomplishing it? I think I am missing something fundamental ... cos that doesn't seem to be too strange of a requirement ... Any ideas? Thanks, maciek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using more than one SSL cert in keystore?
Can keytool be used to make a wildcard SSL Key for similar URLs? I know it can be done using apache. Jef Sullivan Programmer IKANO Communications, Inc. -Original Message- From: Paul Singleton [mailto:[EMAIL PROTECTED] Sent: Thursday, August 04, 2005 8:21 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Using more than one SSL cert in keystore? Justin Jaynes wrote: ...But now I would like to put up a new site that is completely independant of the others. It needs its own SSL cert and it needs four host names to all point to the same place and redirect to just one of the domain names so that the SSL cert will be valid, regardless of how the users chose to get to my site. An SSL cert is for a specific domain name. If you want your users to be able to make HTTPS requests to all four domains without warnings from the browser, I reckon you need four certificates. But if they make non-SSL requests, and you respond with a client-side redirect to your one true certificated site using HTTPS, that may work OK? Is it possible to do Virtual Hosting using IP's on a Tomcat standalone installation? Yes, I'm doing this now with 5.5.9 You need e.g. this server.xml stuff for each host: Service Connector (HTTP) Connector (HTTPS) Engine Host Context You can use the default keystore for all hosts, and use the (undocumented) keyAlias=myalias Connector attribute to offer the appropriate certificate for each host, e.g. Connector address=288.104.197.211 port=8443 scheme=https secure=true sslProtocol=TLS keyAlias=mrk2 / (in 5.5.9 you also need sslProtocol=TLS explicitly, fixed in later versions) Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.0/63 - Release Date: 3/Aug/2005 - 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: Which Oracle JDBC Drive for JDK 1.5?
Like Paul said, it shouldn't be problem unless you're using specific Oracle 10 features or if you have synonyms or views linked to older Oracle databases. I've had a few synonyms that were linked to Oracle 7 and 8 tables that required using an older driver. If you run into problems, Oracle may only support you on 'certified' databases. I'd try it. If it works great, if doesn't then I patch to 10.1.0.4. I've also only used the thin client JDBC drivers, so I can't say much about the other drivers. HTH, Jeff Paul Singleton wrote: I noticed there are JDBC drivers for 10.1.0.2 and . Which should I use? I've always found that Oracle JDBC drivers are backwards compatible (not that I've driven them very hard) so I'd use the .4 (or should I patch to 10.1.0.4) not if it ain't broke :-) Paul S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat application won't start with MySQL Connection Pooling
I have tried adding connection pooling for a MySQL database in Tomcat 5.5 by following the steps described [URL=http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html]here[/URL]. Now when I start Tomcat my application fails to load. The only message I can find in any of the logs is Aug 5, 2005 12:40:44 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Aug 5, 2005 12:40:44 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/ioifocus] startup failed due to previous errors Where can I look for further information on what is causing the error? I'm pretty sure that I have followed the Tomcat Connection Pooling example faithfully (I added the commons libraries to Tomcat's lib directory, I modified my server.xml and web.xml as shown, etc.), and the XML I added to the server.xml appears to be valid. In any event I will include the XML which I added to Tomcat's server.xml just in case anyone can see a mistake (the following is included under the Host element which defines localhost): Context path=/ioifocus docBase=ioifocus debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_ioifocus_log. suffix=.txt timestamp=true/ Resource name=jdbc/MySqlDataSource auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/MySqlDataSource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to -1 for no limit. See also the DBCP documentation on this and the minEvictableIdleTimeMillis configuration parameter. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL username and password for database connections -- parameter nameusername/name valueadmin/value /parameter parameter namepassword/name valueadminpassword/value /parameter !-- Class name for the official MySQL Connector/J driver -- parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter !-- The JDBC connection url for connecting to the MySQL database -- parameter nameurl/name valuejdbc:mysql://localhost:3306/ioifocus/value /parameter !-- Insure that databse connections are removed and recycled if they become abandoned by a web application which doesn't close resources such as ResultSets, Statements, or Connections -- parameter nameremoveAbandoned/name valuetrue/value /parameter /ResourceParams /Context Thanks in advance for any help with this! --James __ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat application won't start with MySQL Connection Pooling
From: James Adams [mailto:[EMAIL PROTECTED] Subject: Tomcat application won't start with MySQL Connection Pooling I have tried adding connection pooling for a MySQL database in Tomcat 5.5 by following the steps described [URL=http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-data source-examples-howto.html]here[/URL]. I'm curious: why are you using the documentation for an older level to configure the current version? Things have changed in this area (among others) between 5.0 and 5.5. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat application won't start with MySQL Connection Pooling
I'm curious: why are you using the documentation for an older level to configure the current version? Things have changed in this area (among others) between 5.0 and 5.5. You bring up a very good point, thanks for spotting that for me. I have now created a context.xml according to the example in the Tomcat 5.5 documentation and this time I've placed it my application's META-INF directory in the WAR (since it was pointed out to me that this approach is preferable to modifying the server.xml file). Unfortunately I still get the same errors as before, with no more information in the log files other than the cryptic SEVERE: Error listenerStart message. Below are the contents of my META-INF/context.xml file. Does anything look amiss now? Perhaps I need to enclose this Context entry with a Server, Service, or Host entry? --- META-INF/context.xml - Context path=/ioifocus docBase=ioifocus debug=5 reloadable=true crossContext=true Resource name=jdbc/MySqlDataSource auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=admin password=XXX driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/ioifocus removeAbandoned=true / /Context Thanks in advance for any further help/insight... --James __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logon with SSL
Hello, I would like to make a login process SLL protecred. I am using a Tomcat authentication with FORM method. I know how to protect my service using security-constraint but I have no idea how to connect it with Tomcat build-in login bacause it is not mapped in security-constraint's. I wish to emphasise that I want only the login page to be protected, not entire site. How would you handle such task? P.S. Could you give me a link to the complete web.xml configuration documentation? I have found documentation about almost all aspects of Tomcat while I am unable to find this one. Best regards, Konrad Billewicz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: load on startup
You can also use the Singleton pattern, so no matter what happens, you'll only have a single instance of your object. - Behi On 8/5/05, Jon Wingfield [EMAIL PROTECTED] wrote: Use a ServletContextListener, they were added to the Servlet 2.3 spec for this very purpose. You set up your object in the contextInitialized(...) method of your implementation and tear it down in contextDestroyed(...). For it to be used you need to add it to your web.xml. The container is free to init and destroy servlets as it sees fit after complying with load-on-startup directives. That's why use of load-on-startup for initialization of application scope objects is prone to error and unforeseen circumstances. my $0.02 and HTH, Jon Nicolas Schwartz wrote: Hi all, I need an object to be instanciated on the startup of my tomcat. So I did a servlet the creates an instance of it and put my servlet in the web.xml of a webapp with the loadOnStartup parameter. The constructor of my object is called twice so there must be 2 instances of it ... which is a problem. (when I call the url of the servlet that creates the instance, only one is created) Could someone explain me why the constructor is called twice (why do I have 2 instances ?) and/or could someone give me another solution to have one and only one instance of the object created on the tomcat startup ? Thanks, Nicolas - 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] -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Http Keep-Alive
As I recall, TC 3.2.x only has a HTTP/1.0 Connector. In particular, it never respects HTTP keep-alives. Jamie Spurr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anyone know the property in the server.xml file on Tomcat for switching off http keep-alives? I'm using version 3.2.1. I can't find a listing for this deprecated version - Thanks, Jamie. ** Disclaimer: This message may contain privileged or confidential information. If you are not the intended recipient, please notify the sender and delete this message. Please be advised that any disclosure, copying, distribution or use of this information is strictly prohibited. Views expressed in this message are those of the individual sender and are not necessarily the views of Streamdoor Ltd, unless otherwise stated. Although Streamdoor Ltd has taken precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage caused arising from the use of this email or attachment. www.streamdoor.com ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: load on startup
You can use Singleton pattern, but care must be taken. For example if ( singleton == null ) { singleton = new SingletonObj(); } There might be a case where few thread running concurrently on the null checking, then multiple singleton object will be created more than one. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]