interrupting a multipart post request?
Hello, I'm not sure if this is tomcat or general servlet issue. I hope you can help me anyway. I want to interrupt a multipart post request (e.g. if the content-length exceeds a given limit). The problem is, that the client seems to continue sending the data to the server and gets no response from the server until the whole data is send. Please see the following doPost method. On the console the exception appears immediately, but a takes much longer until I can see the response in the browser. public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getContentLength() 100) { throw new ServletException(request limit exceeded.); } } The same thing if I try to forward the request via the RequestDispatcher: the request is forwarded when the whole data is sent to the server and not immediately. I am using Tomcat 6.0.16 with jdk 1.6.0_04 on windows xp. Regards, Christian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
%t in access log valve?
Hi all, Just a quick one; It's not clear from the docs. is %t in the accessLogValve the request datetime or the response datetime? It makes a difference to us! thanks, Dan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk or mod_proxy_ajp - encryption benefits?
James, You could put the stunnel into a while loop that makes it. perhaps you could send yourself an email each time it closed ? stunnel is probably the easiest to setup. I had written a secure version of mod_ajp for apache 1.3 (ie years ago) which did the whole ssl encryption of the traffic with 2 way authentication it wasn't added to the tomcat source as well no one wanted it :( D On Thu, 2008-03-06 at 17:54 -0500, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Ellis wrote: | I have done some goog'ling on IPSec and VPN and I have found three | possibilities: | | 1) OpenSSH and Port Forwarding | | 2) OpenVPN | | 3) Stunnel (thanks little voice) | | What concerns me about all three options is error handling. If my | OpenSSH or OpenVPN or Stunnel connection failed/timed out, the whole | site would go down. There would have to be a VERY good and almost | instant reconnection taking place. | | I am also concerned about performance. | | Any comments? If you want encryption, you have to sacrifice performance, so just forget about that concern right off the bat. Your concerns about robustness are certainly reasonable. You should be able to find information about restarting connections for each of these products by searching their forums, help, etc. Any good VPN should have options for restarting them when a failure is detected (but nothing is ever foolproof). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfQdjIACgkQ9CaO5/Lv0PCfxwCfTDsfjFquhx2Yibw8hKZyTh28 m8sAoJ8eHlCR5KI/br4KeMwKMDNEXPRH =wwmj -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why is this java.lang.IllegalStateException occuring, and what can be done about it?
I routinely find this exception occuring with Tomcat 6, with virtually every web app I develop. Since I tend to be paranoid about errors, I want to know more even though Tomcat's output says this exception has no functional impact. As far as I can see, none of the code I developed is involved in this. Does that mean Tomcat 6 is broken? What debugging purpose could this have? What can be done to prevent it? The stack trace follows: INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/FinanceWebApp' 6-Mar-2008 11:28:07 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.lang.Object. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at com.sun.faces.application.ConverterPropertyEditorFactory$DisposableClassLoader.loadClass(ConverterPropertyEditorFactory.java:447) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:79) at com.sun.faces.application.ApplicationImpl.addPropertyEditorIfNecessary(ApplicationImpl.java:652) at com.sun.faces.application.ApplicationImpl.addConverter(ApplicationImpl.java:623) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:754) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:505) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:402) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:511) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1458) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:820) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) -- View this message in context: http://www.nabble.com/Why-is-this-java.lang.IllegalStateException-occuring%2C-and-what-can-be-done-about-it--tp15891188p15891188.html Sent from the Tomcat - User mailing list archive at
Re: sym link to serve documents within web application.
Christopher Schultz wrote: David, Maffitt, David wrote: | We have a different problem with this. Tomcat will follow the link | and delete the contents of the linked-to directory when the app is | redeployed. We have to be sure that the link is deleted before | redeploying. Not a problem if one always deploys from a script but a | potential disaster if someone just drops the new war in webapps. | This is not the behavior we were expecting. Is this a bug or a | feature? :- I would file it as a bug, though you're likely to get a response like if it's not part of the webapp, what is it doing in there and your webapp should be completely self-contained, etc. Yep, that is exactly the response you'll get ;) Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: %t in access log valve?
Dan Keeley wrote: Hi all, Just a quick one; It's not clear from the docs. is %t in the accessLogValve the request datetime or the response datetime? It makes a difference to us! thanks, Dan When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. This is known as thread hijacking and to many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Thanks, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
%t in access log valve?
Hi all, Just a quick one; It's not clear from the docs. is %t in the accessLogValve the request datetime or the response datetime? It makes a difference to us! thanks, Dan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Simultate Tomcat JNDI
Hi everyone, I'm trying to simulate tomcat's jndi mechanism, in order to test my DAO objects with junit. Does anybody knows how to do that? It seems to me that I need to bind the name java:/comp/env to a Context object and then bind my jdbc name to this context. Is this the way tomcat put things together? A Context object inside another and then the jdbc itself inside this one? Thnaks in advance! Marcus Milanez - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sym link to serve documents within web application.
I agree that that is the most likely response and that there are good reasons why links are a bad idea. To counter that though, if that were strictly true, the allowLinking attribute should not be provided. Given that links are allowed, the principle of least astonishment dictates that tomcat should treat soft links like the OS does and just delete the link. Perhaps another attribute like 'deleteLinksRecursively' is needed. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 06:48 AM To: Tomcat Users List Subject: Re: sym link to serve documents within web application. Christopher Schultz wrote: David, Maffitt, David wrote: | We have a different problem with this. Tomcat will follow the link | and delete the contents of the linked-to directory when the app is | redeployed. We have to be sure that the link is deleted before | redeploying. Not a problem if one always deploys from a script but a | potential disaster if someone just drops the new war in webapps. | This is not the behavior we were expecting. Is this a bug or a | feature? :- I would file it as a bug, though you're likely to get a response like if it's not part of the webapp, what is it doing in there and your webapp should be completely self-contained, etc. Yep, that is exactly the response you'll get ;) Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The materials in this message are private and may contain Protected Healthcare Information. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Simultate Tomcat JNDI
Martin, Thanks for you reply. In fact I need to simulate tomcat's jndi mechanism. My class will be invoked by jUnit and not by tomcat. I'm trying to bind a datasource to a jndi name outside tomcat, but with exactaly the same names... Thank you! -Mensagem original- De: Martin Gainty [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 7 de março de 2008 11:43 Para: Milanez, Marcus Cc: Tomcat Users List Assunto: Re: Simultate Tomcat JNDI Marcus-http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howt o.html//assume you have this Oracle Datasource definition in your web.xmlresource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref//I can now access the predefined DataSource using jdbc/myoracle lookup mechanism e.g.Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection();HTHMartin- - Original Message - From: Milanez, Marcus [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, March 07, 2008 9:08 AM Subject: Simultate Tomcat JNDI Hi everyone, I'm trying to simulate tomcat's jndi mechanism, in order to test my DAO objects with junit. Does anybody knows how to do that? It seems to me that I need to bind the name java:/comp/env to a Context object and then bind my jdbc name to this context. Is this the way tomcat put things together? A Context object inside another and then the jdbc itself inside this one? Thnaks in advance! Marcus Milanez - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sym link to serve documents within web application.
You should probably create a servlet that serves external files... Yuval Perlov www.r-u-on.com On Mar 7, 2008, at 4:32 PM, Maffitt, David wrote: I agree that that is the most likely response and that there are good reasons why links are a bad idea. To counter that though, if that were strictly true, the allowLinking attribute should not be provided. Given that links are allowed, the principle of least astonishment dictates that tomcat should treat soft links like the OS does and just delete the link. Perhaps another attribute like 'deleteLinksRecursively' is needed. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 06:48 AM To: Tomcat Users List Subject: Re: sym link to serve documents within web application. Christopher Schultz wrote: David, Maffitt, David wrote: | We have a different problem with this. Tomcat will follow the link | and delete the contents of the linked-to directory when the app is | redeployed. We have to be sure that the link is deleted before | redeploying. Not a problem if one always deploys from a script but a | potential disaster if someone just drops the new war in webapps. | This is not the behavior we were expecting. Is this a bug or a | feature? :- I would file it as a bug, though you're likely to get a response like if it's not part of the webapp, what is it doing in there and your webapp should be completely self-contained, etc. Yep, that is exactly the response you'll get ;) Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The materials in this message are private and may contain Protected Healthcare Information. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Status Metrics: RRDTool Graph: Analysis
Thanks, Chris. I'll do some load testing. I was thinking of using siege or apache bench. _Tomcat: The Definitive Guide_ is my guide. Do you know of a better way of getting heap numbers out of Java? Right now I've got three metrics: jvm_mem_free; jvm_mem_max; jvm_mem_total. Examining the graphs, I see that 'free' and 'total' are not exact opposites. 'max' doesn't change and I believe this is set with the option -Xmx2048m. These are the java options relating to the heap: -Xmx2048m -Xms1024m -XX:MaxPermSize=256m -XX:+UseParallelGC __/ __/ Jvm_mem_total creeps up to the max over time (about 2 days): __/ During that time, jvm_mem_free fluctuates regularly, like this: /\/\/\/\/\ -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 11:54 AM To: Tomcat Users List Subject: Re: Tomcat Status Metrics: RRDTool Graph: Analysis -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smithson wrote: | Hi, Christopher. Thanks for your reply. This is a typical hour on | any given day. What other things should I be looking at in Tomcat | and Java? I've got plenty of metrics from other parts of the | operating system. Typically, I look at heap activity (in Java, not just free memory from the OS's perspective) and CPU utilization. The cleaner your heap, the faster everything will run. | I've got my on the JVM memory metrics that come from the Tomcat | status page as well. If I'm not mistaken, these numbers represent | JVM memory fluctuations and relate to garbage collection routines. Probably. Look for heap activity that looks like this: /\/\/\/\/\/\ ~ __/ ~ ___/ ~ ___/ When you start seeing this: __/ You have a problem! Just because your threads are not being used too much doesn't mean there aren't other problems lurking. Even with low thread utilization, a bad heap graph can mean that you're just waiting around for an OOME. Consider performing load tests and watching the numbers instead of just watching a typical hour of a typical day. You need to plan for peak load, not for average load. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfQIYoACgkQ9CaO5/Lv0PAcQwCfcXMtpU3JklRx074q8y2d1cn5 6mAAoLiPX9LMAAOjk31uAiQRFu1Uot+q =Yfxr -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on Window XP Pro 64-bit on Intel quad Xenon
I've been trying to find out how to run it as a service, and the only solution I can find is relevant to AMD processors (yes, I tried it anyway). The 32-bit versions of tomcat5.exe doesn't run under 64-bit Windows. Thanks in advance. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
On 7 Mar 2008 at 11:31, David Kramer wrote: I've been trying to find out how to run it as a service, and the only solution I can find is relevant to AMD processors (yes, I tried it anyway). The 32-bit versions of tomcat5.exe doesn't run under 64-bit Windows. From what I've read the AMD 64bit versions will run just fine on the intel xeon (xenon is a gas btw.) Thanks in advance. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pls unsubscribe my name from tomcat users group
pls unsubscribe [EMAIL PROTECTED] from tomcat uers group - Share files, take polls, and discuss your passions - all under one roof. Click here.
Re: %t in access log valve?
Dan Keeley wrote: Hi all, Just a quick one; It's not clear from the docs. is %t in the accessLogValve the request datetime or the response datetime? It makes a difference to us! thanks, Dan End of response (logging time). Caution: for Apache httpd 2.x it's start of request. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
David Kramer wrote: I've been trying to find out how to run it as a service, and the only solution I can find is relevant to AMD processors (yes, I tried it anyway). The 32-bit versions of tomcat5.exe doesn't run under 64-bit Windows. The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ I think you want the ia64 ones. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Simultate Tomcat JNDI
Hi everyone, I came accross a solution for that. I've created my own helper class that provides the same JNDI hierarchy tomcat does to my datasources. Now I can test my DAOs using jUnit outside tomcat! Thank you all! Marcus Milanez -Mensagem original- De: Milanez, Marcus [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 7 de março de 2008 11:50 Para: Tomcat Users List Assunto: RES: Simultate Tomcat JNDI Martin, Thanks for you reply. In fact I need to simulate tomcat's jndi mechanism. My class will be invoked by jUnit and not by tomcat. I'm trying to bind a datasource to a jndi name outside tomcat, but with exactaly the same names... Thank you! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pls unsubscribe my name from tomcat users group
Please use a mail client that you can read email headers in. The unsubscribe address is in your email header from the listgroup. List-Unsubscribe: mailto:[EMAIL PROTECTED] Cheers! At 12:19 PM 3/7/2008, you wrote: pls unsubscribe [EMAIL PROTECTED] from tomcat uers group - Share files, take polls, and discuss your passions - all under one roof. Click here. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.6/1316 - Release Date: 3/6/2008 6:58 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.6/1316 - Release Date: 3/6/2008 6:58 PM -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
404 returned trying to find Perl script
I have a form that sends its data to a Perl script under Tomcat 6.0.16. I get an error message The requested resource (/perlTest/WEB-INF/cgi-bin/form.pl) is not available. The form.pl file is, in fact, in that folder. I'm running Windows XP. Permissions have been set properly (using Cygwin chmod) to 0755. I just upgraded to Tomcat 6.0.16. I used to have my perl scripts in the cgi-bin folder under the root context. I see now the cgi-bin folder has been moved to 'WEB-INF'. This is reflected in %CATALINA_HOME%/conf/web.xml in an init-param element as follows: init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param in the cgi servlet definition. The servlet-mapping element appears as follows: servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping I tried the old method of putting the script in cgi-bin under the root context, but that also failed. Any ideas? Doug - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. Chuck - as ever thank you. I wasn't aware of that history at all. Just to complete the info, where does ia64 fit in to this picture? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 404 returned trying to find Perl script
[EMAIL PROTECTED] wrote: I have a form that sends its data to a Perl script under Tomcat 6.0.16. I get an error message The requested resource (/perlTest/WEB-INF/cgi-bin/form.pl) is not available. The form.pl file is, in fact, in that folder. I'm running Windows XP. Permissions have been set properly (using Cygwin chmod) to 0755. I just upgraded to Tomcat 6.0.16. I used to have my perl scripts in the cgi-bin folder under the root context. I see now the cgi-bin folder has been moved to 'WEB-INF'. This is reflected in %CATALINA_HOME%/conf/web.xml in an init-param element as follows: init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param in the cgi servlet definition. Your script should therefore be in /perlTest/WEB-INF/cgi/form.pl The servlet-mapping element appears as follows: servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping And you should request it using: cgi-bin/form.pl Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
On Fri, Mar 7, 2008 at 8:31 AM, David Kramer [EMAIL PROTECTED] wrote: I've been trying to find out how to run it as a service, and the only solution I can find is relevant to AMD processors (yes, I tried it anyway). The 32-bit versions of tomcat5.exe doesn't run under 64-bit Windows. I've also been trying to get tomcat to run as a service on 64-bit Windows. But it's my experience that the tomcat5.exe does run, it just won't allow large heap sizes (since it's 32-bit). Am I wrong? (I followed the instructions from Richard Mundell on Mini HOW-TO: Tomcat as a service on Windows Server 2003 64-bit edition (possibly viewable here: http://marc.info/?l=tomcat-userm=114951978732081w=2), but have run into different problems when I try to start the service. More details in the separate post with subject trouble starting 64-bit Tomcat as a service. I'd *really* appreciate any help with this problem!) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
Mark Thomas wrote: Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. Chuck - as ever thank you. I wasn't aware of that history at all. Just to complete the info, where does ia64 fit in to this picture? It doesn't. It was a dead-end architecture, and I don't believe it's being produced any more. Certainly not in any significant quantity. D - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 404 returned trying to find Perl script
That worked. Thanks! -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 1:33 PM To: Tomcat Users List Subject: Re: 404 returned trying to find Perl script [EMAIL PROTECTED] wrote: I have a form that sends its data to a Perl script under Tomcat 6.0.16. I get an error message The requested resource (/perlTest/WEB-INF/cgi-bin/form.pl) is not available. The form.pl file is, in fact, in that folder. I'm running Windows XP. Permissions have been set properly (using Cygwin chmod) to 0755. I just upgraded to Tomcat 6.0.16. I used to have my perl scripts in the cgi-bin folder under the root context. I see now the cgi-bin folder has been moved to 'WEB-INF'. This is reflected in %CATALINA_HOME%/conf/web.xml in an init-param element as follows: init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param in the cgi servlet definition. Your script should therefore be in /perlTest/WEB-INF/cgi/form.pl The servlet-mapping element appears as follows: servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping And you should request it using: cgi-bin/form.pl Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon Just to complete the info, where does ia64 fit in to this picture? IA64 is a RISC-like 64-bit architecture, developed by Intel with considerable input from HP. It's completely different than IA32, rather than being the extension of IA32 that AMD64 is. The IA64 designers pushed the pipeline performance issues onto the software code generators, meaning that you must have an extremely clever compiler (or JIT) in order to make it run at all well. There are a few vendors still making IA64-based systems, but they are steadily (and thankfully) dwindling. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. Excellent info. Thank you. However, I'm still stuck. I downloaded the amd64 executables, but when I run them from a DOS window, I get: [2008-03-07 13:25:28] [420 prunsrv.c] [error] The system cannot find the file specified. [2008-03-07 13:25:28] [1327 prunsrv.c] [error] Load configuration failed When I try to start the service from the Services admin tool, I get Error 1053: Service did not respond to the start or control request in a timely fashion. Who knew that Windows took off points for tardiness? I did some Googling around that convinced me this is a registry value problem. The only references to fixing this, though, are to Richard Mundell's Mini-HOWTO for Windows 2003 from 2006. I am hesitant to start plugging in registry values from a four-year-old version of Windows into my precious WinXPPro box. I also noticed that the registry keys mentioned in that HOWTO are different than mine. Thanks again. I hope this new information will trigger something. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
this is the same error i'm getting, except i also did the registry hacking (which turned out not to be hard). - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
David Kramer wrote: Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. Excellent info. Thank you. However, I'm still stuck. I downloaded the amd64 executables, but when I run them from a DOS window, I get: [2008-03-07 13:25:28] [420 prunsrv.c] [error] The system cannot find the file specified. [2008-03-07 13:25:28] [1327 prunsrv.c] [error] Load configuration failed When I try to start the service from the Services admin tool, I get Error 1053: Service did not respond to the start or control request in a timely fashion. Who knew that Windows took off points for tardiness? I did some Googling around that convinced me this is a registry value problem. The only references to fixing this, though, are to Richard Mundell's Mini-HOWTO for Windows 2003 from 2006. I am hesitant to start plugging in registry values from a four-year-old version of Windows into my precious WinXPPro box. Win 2k3 is the Server version of XP, so you're probably safe there, especially if you make sure which key you're working in. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Defining JDBC Data source
Sushil, As it turns out, this is really a Spring question... I encountered a similar problem (see http://preview.tinyurl.com/2gge34) all you need to do is, set the reference-ref property of JndiObjectFactoryBean to true: bean id=the_dataSource class=org.springframework.jndi.JndiObjectFactoryBean property name=jndiName value=myJDBC / property name=resourceRef valuetrue/value /property /bean The explanation can be found in Spring JavaDoc: http://static.springframework.org/spring/docs/2.5.x/api/org/springframew ork/jndi/JndiObjectFactoryBean.html then you should be able to use the same configuration in WL and Tomcat. I hope this helps. Florian -Original Message- From: Sureka, Sushil [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 6:33 PM To: Tomcat Users List Subject: Defining JDBC Data source We are trying to port an application from Weblogic to Tomcat. Our JDBC entry looks like this bean id=the_dataSource class=org.springframework.jndi.JndiObjectFactoryBean property name=jndiName value=myJDBC / /bean The weblogic works fine with setup. The jdbc datasource is setup through weblogic console. On Tomcat, we noticed that we would have to modify the above entry like this bean id=the_dataSource class=org.springframework.jndi.JndiObjectFactoryBean property name=jndiName value=java:/comp/env/myJDBC / /bean But the above setup won't work for Weblogic. Any way we can reconcile the difference. The Tomcat context.xml file contains an entry llike Context Resource name=myJDBC auth=container ./ /context Sushil This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
On 7 Mar 2008 at 13:54, David Kramer wrote: Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin / I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. Excellent info. Thank you. However, I'm still stuck. I downloaded the amd64 executables, but when I run them from a DOS window, I get: [2008-03-07 13:25:28] [420 prunsrv.c] [error] The system cannot find the file specified. [2008-03-07 13:25:28] [1327 prunsrv.c] [error] Load configuration failed When I try to start the service from the Services admin tool, I get Error 1053: Service did not respond to the start or control request in a timely fashion. Who knew that Windows took off points for tardiness? I did some Googling around that convinced me this is a registry value problem. The only references to fixing this, though, are to Richard Mundell's Mini-HOWTO for Windows 2003 from 2006. I am hesitant to start plugging in registry values from a four-year-old version of Windows into my precious WinXPPro box. I also noticed that the registry keys mentioned in that HOWTO are different than mine. The other reason for this error could be that the Microsoft C runtime library is not installed. This has been mentioned on this list before, and here: http://blog.granilus.com/2007/12/tomcat-wont-boot-due-to-prunsrvc.html Microsoft C runtime library http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99- 220b62a191eedisplaylang=en -Steve O. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Class cast exception thrown from jsp servlet
Hello all, I'm running a JSF application in Netbeans 6.0. OS: Windows XP pro DB: SQL Server 2000 I'm running into the following problem (the name of my jsp is ResumeList.jsp). The same application is being run on our production server and it works! Any thoughts on this would be greatly appreciated. Many thanks! Bob java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1078) at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:884) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:316) at org.apache.jsp.admin.AdminSecure.ResumeList_jsp._jspx_meth_h_005foutputText_ 005f6(ResumeList_jsp.java:711) at org.apache.jsp.admin.AdminSecure.ResumeList_jsp._jspService(ResumeList_jsp.j ava:220) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 93) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter .java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis patcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:292) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl etExternalContextImpl.java:419) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand lerImpl.java:211) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx ecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter. java:100) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter. java:100) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter. java:147) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter .java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http 11Protocol.java:584) at
RE: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
From: David kerber [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon where does ia64 fit in to this picture? It doesn't. It was a dead-end architecture, and I don't believe it's being produced any more. Certainly not in any significant quantity. Not as dead as some of us would like, unfortunately :-( Intel is still updating the IA64 chips, but with nowhere near the rate of change as Xeon and its offspring. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting the URL of a DataSource
Phil, I switched over to using BasicDataSource instead of DataSource and I'm able to get everything I need. I've tested it against 10 different Data Bases and everything seems to work wonderfully. Thank you for your response and help. I hope some day I can also help you! Regards, jfk. -Original Message- From: Phil Steitz [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2008 10:41 PM To: Tomcat Users List Subject: Re: Getting the URL of a DataSource On Mon, Mar 3, 2008 at 2:08 PM, Katilie, John [EMAIL PROTECTED] wrote: All, this may be a dumb question but I've exhausted my research and just wondering what other users out there are doing. I would like to get the URL for a DataSource to display for debugging and/or Informational reasons. I know I can get the URL after I get the DataSource and get a connection from the connection metadata. My problem is what if the Connection fails? It seems without the connection I can not get the URL for the DataSource. This is an application running under Tomcat 6.0.14. I guess I could get the URL from the JMX DataSource objects created by Tomcat (I can see them with jconsole). But is there another way? Am I missing something? I hope this question makes sense... I may get flamed for condoning hacking here, but there is a too-fragile-to-depend-on way to do this for debugging / testing. If the DataSource implementation that you are using exposes a getUrl method, and you really want to get this (or any other extended property) in application code, you can get the URL by specializing the cast on your JNDI lookup and then invoking that method. For example, if you are using the tomcat-provided DBCP DataSource, org.apache.tomcat.dbcp.dbcp.BasicDataSource ds = (org.apache.tomcat.dbcp.dbcp.BasicDataSource) initContext.lookup(java:/comp/env/jdbc/yourDB); String urlString = ds.getUrl(); That obiously only works if you are using BasicDataSource bundled with Tomcat or if whatever datasource you use supports something like this (If you are using Commons DBCP directly, just change tomcat.dbcp to commons). It is not something you want to depend on, though, as all Tomcat or your DS provider really promises you is a javax.sql.DataSource. In particular, there is no guarantee that code such as the above will not start generating ClassCastExceptions or ClassNotFound when the container (Tomcat) or datasource provider release new versions. Phil Thanks for any and all comments. Regards, John. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Class cast exception thrown from jsp servlet
On 7 Mar 2008 at 14:00, Bob Riaz wrote: Hello all, I'm running a JSF application in Netbeans 6.0. OS: Windows XP pro DB: SQL Server 2000 I'm running into the following problem (the name of my jsp is ResumeList.jsp). The same application is being run on our production server and it works! Any thoughts on this would be greatly appreciated. Many thanks! Bob java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean Well, are you trying to cast a String to a boolean in your code? at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.jav a:1078) at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:8 84) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:316 ) at org.apache.jsp.admin.AdminSecure.ResumeList_jsp._jspx_meth_h_005fout putText_ 005f6(ResumeList_jsp.java:711) at org.apache.jsp.admin.AdminSecure.ResumeList_jsp._jspService(ResumeLi st_jsp.j ava:220) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrappe r.java:3 93) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(Monit orFilter .java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDis patcher. java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applic ationDis patcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(Application Dispatch er.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDi spatcher .java:292) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispat ch(Servl etExternalContextImpl.java:419) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(Jsp ViewHand lerImpl.java:211) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderRe sponseEx ecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java :132) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extension sFilter. java:100) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extension sFilter. java:100) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extension sFilter. java:147) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(Monit orFilter .java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App lication FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterCh ain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper Valve.ja va:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContext Valve.ja va:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve. java:128 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. java:102 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
Re: NIO connector source code
neil davudo wrote: Where? I downloaded the entire Tomcat source code. Can you point me to the directories? Did you even try searching for files with nio in the name? I really don't see why you expect me to do this for you. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is this java.lang.IllegalStateException occuring, and what can be done about it?
TedByers wrote: I routinely find this exception occuring with Tomcat 6, with virtually every web app I develop. Since I tend to be paranoid about errors, I want to know more even though Tomcat's output says this exception has no functional impact. As far as I can see, none of the code I developed is involved in this. Does that mean Tomcat 6 is broken? What debugging purpose could this have? What can be done to prevent it? Might be a similar cause to https://issues.apache.org/bugzilla/show_bug.cgi?id=42950 If the cause is the same, then the same fix should work. If it doesn't create a new bug report and upload the smallest war (inc source) that demonstrates the issue. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is this java.lang.IllegalStateException occuring, and what can be done about it?
what happens when you start TC and pass in the disable clear references parameter-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFEREN CES=false?M-- Original Message - Wrom: IYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEP To: Tomcat Users List users@tomcat.apache.org Sent: Friday, March 07, 2008 3:33 PM Subject: Re: Why is this java.lang.IllegalStateException occuring, and what can be done about it? TedByers wrote: I routinely find this exception occuring with Tomcat 6, with virtually every web app I develop. Since I tend to be paranoid about errors, I want to know more even though Tomcat's output says this exception has no functional impact. As far as I can see, none of the code I developed is involved in this. Does that mean Tomcat 6 is broken? What debugging purpose could this have? What can be done to prevent it? Might be a similar cause to https://issues.apache.org/bugzilla/show_bug.cgi?id=42950 If the cause is the same, then the same fix should work. If it doesn't create a new bug report and upload the smallest war (inc source) that demonstrates the issue. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
On Fri, Mar 7, 2008 at 11:53 AM, Steve Ochani [EMAIL PROTECTED] wrote: On 7 Mar 2008 at 13:54, David Kramer wrote: Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon The 64bit binaries are here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin / I think you want the ia64 ones. No, you definitely do not want the IA64 ones - that's a completely different, dead-end architecture. Intel included the AMD64 extensions in current Xeon processors, at the time calling it em64t. It's now referred to as just Intel 64, which makes it very easy to confuse with IA64 (thank you, Intel). Many downloads still refer to the architecture as AMD64, giving credit to the company that invented it. Many Linux downloads use x86-64 to differentiate it from IA64; sun refers to it as x64 rather than either AMD64 or x86-64. Excellent info. Thank you. However, I'm still stuck. I downloaded the amd64 executables, but when I run them from a DOS window, I get: [2008-03-07 13:25:28] [420 prunsrv.c] [error] The system cannot find the file specified. [2008-03-07 13:25:28] [1327 prunsrv.c] [error] Load configuration failed When I try to start the service from the Services admin tool, I get Error 1053: Service did not respond to the start or control request in a timely fashion. Who knew that Windows took off points for tardiness? I did some Googling around that convinced me this is a registry value problem. The only references to fixing this, though, are to Richard Mundell's Mini-HOWTO for Windows 2003 from 2006. I am hesitant to start plugging in registry values from a four-year-old version of Windows into my precious WinXPPro box. I also noticed that the registry keys mentioned in that HOWTO are different than mine. The other reason for this error could be that the Microsoft C runtime library is not installed. This has been mentioned on this list before, and here: http://blog.granilus.com/2007/12/tomcat-wont-boot-due-to-prunsrvc.html Microsoft C runtime library http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99- 220b62a191eedisplaylang=en although perhaps for this case we'd need the x64 lib: http://www.microsoft.com/downloads/details.aspx?familyid=90548130-4468-4BBC-9673-D6ACABD5D13Bdisplaylang=en David Kramer, please let me know if that solves your problem. I'll try this also and post results asap. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Window XP Pro 64-bit on Intel quad Xenon
Srinivasan Rangaswamy wrote: On Fri, Mar 7, 2008 at 11:53 AM, Steve Ochani [EMAIL PROTECTED] wrote: The other reason for this error could be that the Microsoft C runtime library is not installed. This has been mentioned on this list before, and here: http://blog.granilus.com/2007/12/tomcat-wont-boot-due-to-prunsrvc.html Microsoft C runtime library http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99- 220b62a191eedisplaylang=en although perhaps for this case we'd need the x64 lib: http://www.microsoft.com/downloads/details.aspx?familyid=90548130-4468-4BBC-9673-D6ACABD5D13Bdisplaylang=en David Kramer, please let me know if that solves your problem. I'll try this also and post results asap. I won't be able to try this out until Monday, but I'll certainly report back my results. To be honest, I'm more of a Linux guy and editing the registry gives me hives. The directions in the mini-HOWTO don't make sense to me, so I'm hoping to pawn that part off onto someone else. I will probably try installing that runtime file first. Thanks all of you for your wonderful help so far. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 6.0.16 regression?
Hi, I am running tomcat-6.0.16 on centos5. I deployed the following simple servlet. When I tried to post more than 8192 chars to the server, I got ava.lang.ArrayIndexOutOfBoundsException: 8192 org.apache.tomcat.util.buf.CharChunk.substract(CharChunk.java:388) org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:368) org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:93) test.ReadChar.doPost(ReadChar.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402) org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) /pre/ppnote uThe full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs. trying the same servlet on tomcat-6.0.14, I got the correct result. Is this a bug in 6.0.16? thanks, Peter simple servlet code: package test; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ReadChar extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { BufferedReader requestReader = request.getReader(); response.setContentType(text/html); int count = 0; while (requestReader.read()=0) { ++count; } PrintWriter writer = response.getWriter(); writer.println(chars read= + count); } } -- View this message in context: http://www.nabble.com/tomcat-6.0.16-regression--tp15907206p15907206.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 6.0.16 regression?
peter360 wrote: Hi, I am running tomcat-6.0.16 on centos5. I deployed the following simple servlet. When I tried to post more than 8192 chars to the server, I got Yep, it is a known issue. Discussions on the best way to fix it are ongoing. https://issues.apache.org/bugzilla/show_bug.cgi?id=44494 Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
connection pool maxActive = 0 != unlimited in new version
Hi, After some painful research and code digging, I found that in commons-pool versions 1.2 (ie 1.3 and 1.4), the logic for maxActive changed for unlimited. 0 no longer means unlimited as it did in 1.2 and previous versions. This looks to be contradictory to commons-pool and tomcat documentation however (e.g. http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html ). This seems to effect tomcat versions 5.5.24-26. Are there plans to update said documentation, or is this an issue with commons-pool? Thanks, Will
Getting Tomcat server to discriminate between domains
Hi, I have Apache Tomcat 5.5 installed on my box and serving requests from mydomainname.com I run several applications on this server, each with its own Context The URL http://mydomainname.com/A/ takes the user to application A The URL http://mydomainname.com/B/ takes the user to application B and so on. mydomainname.com is currently at IP address 68.50.139.219 Now what I would like to do is have people accessing any URL that starts with http://68.50.139.219/ (or, better yet, any URL that starts with either http://68.50.139.219/ or https://68.50.139.219/) to be directed to application K which I can place anywhere on the server (not important). So, any URL that matches http://68.50.139.219/* would take the user to the application K on my server. In other words, I want people accessing my web site through my IP address (rather than through the domain name) to always end up on a certain web page (application K) which I serve locally. Is there a way to do this through Tomcat configuration? Thanks!
Reloading an application when threads are running
This is sort of a general question, but I couldn't find any information on the subject. In short: should I expect running threads to finish processing their requests, when I reload an application? Long story: we use tomcat as an application server, and a request can take up to several minutes to finish. We would like to be able to reload the application, and have any running thread finish its work, while new threads can be spawned using the new versions of the classes. This seems to mostly work, except that upon reload, all static class members of old class instances are set to Null! So old requests try to finish but quickly die as soon as the code tries to access the private members. New requests are fine, the freshly-loaded classes have their static members initialized correctly. Is that expected behavior? I can post a small example that demonstrates what I'm talking about. Thanks, Eric Daniel - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RequestDispatcher, wrapper, and file upload
Hello, I have a nagging problem with a wrapper-filter for file upload requests. The core of the problem is that request.getRequestDispatcher(String aPath) is not behaving as expected. I am passing *query params* in 'aPath'. When I use a file upload wrapper on the request, these query params are not visible to the target JSP. Attached is a minimal harness to demonstrate the problem. It uses a Controller that traps all '*.test' requests, and does a hard-coded forward to 'test.jsp?x=1', using RequestDispatcher. The test.jsp displays all request params that it can see. It also does double duty by POSTing data to the Controller. When (and only when) the FileUploadWrapper is used, the hard-coded x=1 param is no longer visible in test.jsp - that is the issue. Am I missing something? For reference : The docs for ServletRequestWrapper: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequestWrapper.html#getRequestDispatcher(java.lang.String) The wrapper I am using (FileUploadWrapper): - extends HttpsServletRequestWrapper - does not override getRequestDispatcher(String) Hence : - the default impl in ServletRequestWrapper is used for getRequestDispatcher(String) - that impl does a call-forward to the underlying request (right?) Given that, why does it fail? Is there something different about file upload requests that makes this fail? Why? It's not that the forward fails entirely - only that the *params* are not passed along.Using Tomcat 5.5.23 on Win XP.Thanks in advance,John O'Hanleyweb-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.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 display-nameTest/display-name descriptionTest/description filter filter-nameTestFilter/filter-name display-nameTestFilter/display-name filter-classhirondelle.fish.exercise.fileupload.TestFilter/filter-class /filter filter-mapping filter-nameTestFilter/filter-name servlet-nameTestController/servlet-name /filter-mapping !-- Required by file upload tool. -- listener listener-classorg.apache.commons.fileupload.servlet.FileCleanerCleanup/listener-class /listener servlet servlet-nameTestController/servlet-name servlet-classhirondelle.fish.exercise.fileupload.TestController/servlet-class /servlet servlet-mapping servlet-nameTestController/servlet-name url-pattern*.test/url-pattern /servlet-mapping session-config session-timeout15/session-timeout /session-config taglib taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri taglib-location/WEB-INF/tlds/c.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jsp/jstl/fmt/taglib-uri taglib-location/WEB-INF/tlds/fmt.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jsp/jstl/functions/taglib-uri taglib-location/WEB-INF/tlds/fn.tld/taglib-location /taglib /web-app - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RequestDispatcher, wrapper, and file upload
[Resending - attachments not accepted.] Hello, I have a nagging problem with a wrapper-filter for file upload requests. The core of the problem is that request.getRequestDispatcher(String aPath) is not behaving as expected. I am passing *query params* in 'aPath'. When I use a file upload wrapper on the request, these query params are not visible to the target JSP. Attached is a minimal harness to demonstrate the problem. It uses a Controller that traps all '*.test' requests, and does a hard-coded forward to 'test.jsp?x=1', using RequestDispatcher. The test.jsp displays all request params that it can see. It also does double duty by POSTing data to the Controller. When (and only when) the FileUploadWrapper is used, the hard-coded x=1 param is no longer visible in test.jsp - that is the issue. Am I missing something? For reference : The docs for ServletRequestWrapper: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequestWrapper.html#getRequestDispatcher(java.lang.String) The wrapper I am using (FileUploadWrapper): - extends HttpsServletRequestWrapper - does not override getRequestDispatcher(String) Hence : - the default impl in ServletRequestWrapper is used for getRequestDispatcher(String) - that impl does a call-forward to the underlying request (right?) Given that, why does it fail? Is there something different about file upload requests that makes this fail? Why? It's not that the forward fails entirely - only that the *params* are not passed along.Using Tomcat 5.5.23 on Win XP.Thanks in advance,John O'Hanley---(Sorry if the formatting is crappy...)CONTROLLER :package hirondelle.fish.exercise.fileupload;import java.io.IOException;import javax.servlet.*;import javax.servlet.http.*;public final class TestController extends HttpServlet { @Override protected void doGet(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletException, IOException { RequestDispatcher dispatcher = aRequest.getRequestDispatcher(test.jsp?x=1); dispatcher.forward(aRequest, aResponse); } @Override protected void doPost(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletException, IOException { RequestDispatcher dispatcher = aRequest.getRequestDispatcher(test.jsp?x=1); dispatcher.forward(aRequest, aResponse); }---TEST FILTER :package hirondelle.fish.exercise.fileupload;import java.io.IOException;import javax.servlet.*;import javax.servlet.http.HttpServletRequest;public final class TestFilter implements Filter {public void init(FilterConfig aConfig) throws ServletException { }public void destroy() { }public void doFilter(ServletRequest aRequest, ServletResponse aResponse, FilterChain aChain) throws IOException, ServletException { //doNothing(aRequest, aResponse, aChain); useDoNothingWrapper(aRequest, aResponse, aChain); //useFileUploadWrapper(aRequest, aResponse, aChain);}/** Behaves as expected : params OK */private void doNothing(ServletRequest aRequest, ServletResponse aResponse, FilterChain aChain) throws IOException, ServletException { aChain.doFilter(aRequest, aResponse);}/** * Behaves as expected : params OK.* * Params seen in destination page :* - form controls : yes* - x=1 : yes*/private void useDoNothingWrapper(ServletRequest aRequest, ServletResponse aResponse, FilterChain aChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) aRequest; TestWrapper wrapper = new TestWrapper(request); aChain.doFilter(wrapper, aResponse);}/*** Does not behave as expected. The 'x=1' param seen in other styles is not seen here.* * PParams seen in destination page :* - form controls : yes (the form contains a file upload control)* - x=1 : NO*/private void useFileUploadWrapper(ServletRequest aRequest, ServletResponse aResponse, FilterChain aChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) aRequest; FileUploadWrapper wrapper = new FileUploadWrapper(request); aChain.doFilter(wrapper, aResponse);}}--TEST WRAPPER :package hirondelle.fish.exercise.fileupload;import javax.servlet.http.HttpServletRequestWrapper;import javax.servlet.http.HttpServletRequest;public final class TestWrapper extends HttpServletRequestWrapper { public TestWrapper(HttpServletRequest aRequest){ super(aRequest); }}---FILE UPLOAD WRAPPER:package hirondelle.fish.exercise.fileupload;import java.util.*;import java.io.*;import java.util.logging.*;import javax.servlet.http.HttpServletRequestWrapper;import javax.servlet.http.HttpServletRequest;import org.apache.commons.fileupload.FileUploadException;import org.apache.commons.fileupload.servlet.ServletFileUpload;import
Re: Tomcat Status Metrics: RRDTool Graph: Analysis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smithson wrote: | Do you know of a better way of getting heap numbers out of Java? | Right now I've got three metrics: jvm_mem_free; jvm_mem_max; | jvm_mem_total. Java has multiple heaps (okay, one heap segmented into several generations), so you might want to find a tool that will give you more detailed information. Search the archives for names of such tools. | Examining the graphs, I see that 'free' and 'total' | are not exact opposites. That's an odd way of expressing their relative inverse relationship. | 'max' doesn't change and I believe this is | set with the option -Xmx2048m. Yes. Max = -Xmx setting while total = the current max (which should be = Max). | These are the java options relating to the heap: | | -Xmx2048m | -Xms1024m Save yourself some confusion and set -Xmx = -Xms. Admin lore suggests that it's easier on the GC since it will never have to resize the entire heap (and I tend to agree). | -XX:MaxPermSize=256m I've found that unless you are having problems, you probably don't need to set the -X:MaxPermSize setting. | -XX:+UseParallelGC Same here. | Jvm_mem_total creeps up to the max over time (about 2 days): During | that time, jvm_mem_free fluctuates regularly, like this [nice graph]. Sounds just about right: the JVM is allowing the heap to grow from 1GB to the max 2GB you gave it. The free memory fluctuates nicely. I would watch it for a week to make sure you aren't observing a slow memory leak. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfR/OQACgkQ9CaO5/Lv0PDV7gCgiFj1T9zNd1SItJ7nSqAy6ia/ cUMAn3OdM4s1SasVlYYh4KWOnYAnyitD =AAvT -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: interrupting a multipart post request?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christian, Christian Kindler wrote: | I want to interrupt a multipart post request (e.g. if the content-length | exceeds a given limit). The problem is, that the client seems to | continue sending the data to the server and gets no response from the | server until the whole data is send. [snip] | public void doPost(HttpServletRequest request, HttpServletResponse | response) | throws ServletException, IOException { | if (request.getContentLength() 100) { | throw new ServletException(request limit exceeded.); | } | } Maybe try this: ~ if (request.getContentLength() 100) { ~request.getInputStream().close(); ~ throw new ServletException(request limit exceeded.); ~ } ...or some variant thereof. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfR/X0ACgkQ9CaO5/Lv0PBJygCguQsz7f87pxZwKsdY+wloQMCi zaQAn1jn6Wuxrvzt4WV5skm4F8+OS6D6 =WHLf -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading an application when threads are running
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric, Eric Daniel wrote: | In short: should I expect running threads to finish processing their | requests, when I reload an application? Yes. Check the servlet specification which, well, specifies this behavior. | Long story: we use tomcat as an application server, and a request can | take up to several minutes to finish. We would like to be able to reload | the application, and have any running thread finish its work, while new | threads can be spawned using the new versions of the classes. | | This seems to mostly work, except that upon reload, all static class | members of old class instances are set to Null! So old requests try to | finish but quickly die as soon as the code tries to access the private | members. New requests are fine, the freshly-loaded classes have their | static members initialized correctly. Hmm... I would not have predicted that behavior. Are you doing anything strange like creating your own threads to handle these long-running requests? The container is supposed to finish all requests before taking the webapp out of service. I'm pretty sure that the old webapp should be taken out of service before the new one takes its place. That would indicate that you are either monkeying with your own threads (which keep references to the old webapps) or there is a bug in Tomcat, or Tomcat cheats a little during reloads to gain some sort of performance benefit (which I doubt). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfR/xQACgkQ9CaO5/Lv0PBoOgCffQVjbhuBDx1zj+0fRd9PWBnm mf8An0/WJuorhg+E86WTpUHtDV8eCgcM =oQxE -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reloading an application when threads are running
From: Eric Daniel [mailto:[EMAIL PROTECTED] Subject: Reloading an application when threads are running This seems to mostly work, except that upon reload, all static class members of old class instances are set to Null! This may be the same issued discussed earlier today in this mailing list. Look here for Mark T's comments: http://marc.info/?l=tomcat-userm=120492204906663w=2 especially the suggestion at the bottom of the bugzilla link. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting Tomcat server to discriminate between domains
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Getting Tomcat server to discriminate between domains In other words, I want people accessing my web site through my IP address (rather than through the domain name) to always end up on a certain web page (application K) which I serve locally. Create another Host element in server.xml with the attribute name=68.50.139.219 and an appBase attribute pointing to some directory other than the default Host's appBase (typically webapps). For testing, I used altWebapps, so that's what will appear in the following. Place your application K in altWebapps/ROOT; create a web.xml in altWebapps/ROOT/WEB-INF with a servlet mapping url-pattern of /* for the app's one and only servlet. Code that servlet to display whatever you want to chide your users into using the correct URL and put its class file in altWebapps/ROOT/WEB-INF/classes. Note that all of the above is case-sensitive, regardless of platform. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]