RE: How can i configure tomcat to avoid threads error in tomcat
Do as it says and increase the max threads parameter or manage your threads better. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Prashant Thakkar [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 7:25 AM To: users@tomcat.apache.org Subject: How can i configure tomcat to avoid threads error in tomcat Hi All, I am frequently getting this error in tomcat which stops my tomcat service. Pl help me its urgent and costing my service as well: I am getting bellow error in my catalina logs: Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool logFull SEVERE: All threads (250) are currently busy, waiting. Increase maxThreads (250) or check the servlet status Thanks in advance - Prashant Thakkar - 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: maximum length of form parameter
What if you were to assign some form of record ID that associated with a gene name so you could pass the ID's and not a descriptive name. This would reduce the number of characters in the stream. You might look at some other way to pass the information. You might be trying to bite off more than is reasonable to chew. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: kaustubh shinde [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 12, 2007 12:48 PM To: Tomcat Users List Subject: Re: maximum length of form parameter Thanks for the response Hassan, I am already using POST. Kaustubh On 6/12/07, Hassan Schroeder [EMAIL PROTECTED] wrote: On 6/12/07, kaustubh shinde [EMAIL PROTECTED] wrote: I submit a form from a jsp to another. Some parameters of the form can get really big. When a certain parameter, say genelists, has a huge number of genes, it wouldn't work. There isn't a consistent limit on URL length across different browsers and servers, but if you're hitting that limit, switch from GET to POST. HTH, -- Hassan Schroeder [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: Programmatically Determine JVM Version used by Tomcat
One problem with this is that you have to know where the JRE for 1.5 was installed. There is nothing that guarantees that the install path is the default. You might try to get the version information from the binary that is running if the OS version supports it. It might be more appropriate to try to load a required class and report the error when you encounter it. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: bachuba [mailto:[EMAIL PROTECTED] Sent: Thursday, June 07, 2007 2:48 PM To: users@tomcat.apache.org Subject: Re: Programmatically Determine JVM Version used by Tomcat I believe the suggested solutions will only poll the java version installed on the computer, correct? I probably should have provided a little more detail on what is needed. Tomcat is being installed with JAVA_HOME pointed toward a 1.4 version of java. Later, JAVA 1.5 is installed and JAVA_HOME updated, but the Tomcat service is still using 1.4 (verified by running tomcat5w.exe and clicking on the Java tab). This value either needs to be updated or the Tomcat service uninstalled and reinstalled with the new JAVA_HOME. Sometimes this doesn't happen causing issues with our application, so I'd like to write a program that detects when this situation occurs (JAVA_HOME set to 1.5, Tomcat using 1.4). Thanks. -- View this message in context: http://www.nabble.com/Programmatically-Determine-JVM-Version-used-by-Tomcat- tf3884522.html#a11015926 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] - 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: java.util.ConcurrentModificationException
Try jar -h at the command line or WinZip will know how to extract it. You should have access to jar.exe if you installed a JDK. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Jayson Enriquez [mailto:[EMAIL PROTECTED] Sent: Friday, April 20, 2007 11:09 AM To: users@tomcat.apache.org Subject: java.util.ConcurrentModificationException In regards to Bug#: 29056 http://issues.apache.org/bugzilla/show_bug.cgi?id=29056 WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:160 3) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:153 7) at org.apache.catalina.core.StandardService.start(StandardService.java:489) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) It doesn't show me how to extract jmxri.jar in a Windows environment. Can anyone direct me to how I can extract this file over the old one? I occasionally, receive an error message from my stdout.log file and my https site is down. I have already extracted the jmri file, I just don't know where to put it. Your assistance will be appreciated. Thank you Thank you Jayson Enriquez CHDP - 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: java.util.ConcurrentModificationException
[quote] Download the news mx4j 2.1.1 http://mx4j.sourceforge.net/ and copy mx4j.jar to your catalina.home/bin. Then delete existing jmx.jar and move mx4j.jar to jmx.jar. [/quote] In my case Catalina.home = C:\Program Files\Apache\Tomcat5.0. So I would apply the patch to C:\Program Files\Apache\Tomcat5.0\bin If you have your environment set up, you can do this from the command line by Copy [source_folder]\mx4j.jar %catalina_home%\bin\jmx.jar. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Jayson Enriquez [mailto:[EMAIL PROTECTED] Sent: Friday, April 20, 2007 11:20 AM To: Tomcat Users List Subject: RE: java.util.ConcurrentModificationException I have already extracted the files. Now, where do I place these files (folders)? -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Friday, April 20, 2007 10:16 AM To: 'Tomcat Users List' Subject: RE: java.util.ConcurrentModificationException Try jar -h at the command line or WinZip will know how to extract it. You should have access to jar.exe if you installed a JDK. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Jayson Enriquez [mailto:[EMAIL PROTECTED] Sent: Friday, April 20, 2007 11:09 AM To: users@tomcat.apache.org Subject: java.util.ConcurrentModificationException In regards to Bug#: 29056 http://issues.apache.org/bugzilla/show_bug.cgi?id=29056 WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:160 3) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:153 7) at org.apache.catalina.core.StandardService.start(StandardService.java:489) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) It doesn't show me how to extract jmxri.jar in a Windows environment. Can anyone direct me to how I can extract this file over the old one? I occasionally, receive an error message from my stdout.log file and my https site is down. I have already extracted the jmri file, I just don't know where to put it. Your assistance will be appreciated. Thank you Thank you Jayson Enriquez CHDP - 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: NullPointerException with Parameters.getParameterValues(String)
Try username. I'm surprised the compiler doesn't complain that username is being used without being initialized. If it didn't, the compiler probably set username to be null. You need to pass a valid string to the method getParameter(); Try something more like: String username = null; Username = pageContext().getRequest().getParameter( username ); Robert S. Harper Senior Engineer Information Access Technology, Inc. - 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: Version of Java being used by Tomcat
That would show the version that is default for that console. You might do better to look at the configuration for the Tomcat server to see where it looks for the JRE. That would let you know for sure. If you are running on a WinXXX platform and as a service, you could look at the settings for the environment there as well. An easy way would be to use log( System.getProperties().getProperty( java.version ); or something like that. If you want to see all of the environment properties you are running in, this should work. . . . Properties p = System.getProperties(); Enumeration e = p.keys(); while( e.hasMoreElements() ) { String s = (String)e.nextElement(); System.out.println( s + = + p.getProperty( s ) ); } . . . Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Richard Dunne [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 04, 2007 12:49 PM To: Tomcat Users List Subject: Re: Version of Java being used by Tomcat Aneez, Try typing echo -version %JAVA% at the prompt. works in dos anyway, not sure if tomcat has its own specific syntax. Richard. - Original Message From: Aneez Backer [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, April 4, 2007 7:37:59 PM Subject: Version of Java being used by Tomcat Hi I have two versions of JAVA installed on my terminal. Is there any possible way to know which version of JAVA is being used by Tomcat 5.0.28 ??? Aneez - Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - 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: Version of Java being used by Tomcat
Also remember that he said he had multiple versions of Java installed on his machine and it is possible that what Tomcat runs under may very well be different from what a console window would get. This is the case for me as well. I have three or four different versions of the JRE and what version is active in a process is dependent on the environment I set for that process. If you are coding a servlet, you can use System.out.println( System.getProperty( java.version ) ); and that will show you the version that is active for that process. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Andrew Pliszka [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 04, 2007 2:06 PM To: Tomcat Users List Subject: Re: Version of Java being used by Tomcat There is one more thing related to java version and JSPs, there is a configuration setting for the version used to compile jsps. So even if you have 1.5 your JSPs still might compile in 1.4 mode. This is setup in the tomcat xml config file. Andrew Gurdeep Kaur (gurdeep) wrote: java -version Should give you what is the default java version used Gurdeep -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 04, 2007 1:00 PM To: Tomcat Users List Subject: Re: Version of Java being used by Tomcat -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard Dunne wrote: Aneez, Try typing echo -version %JAVA% at the prompt. works in dos anyway, not sure if tomcat has its own specific syntax. Never heard of that one before. As far as I know, echo on DOS does not accept any arguments other than ON, OFF or a message to display. %JAVA% expands to the value of the environment variable JAVA, which is not guaranteed to contain anything. For instance, I have Java installed on my win32 box and the command interpreter blankly gives me: C:\Documents and Settings\Chris echo -version %JAVA% - -version %JAVA% C:\Documents and Settings\Chris Not very helpful :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGFAPc9CaO5/Lv0PARApXGAKCMj1GJCeTxV7cEI/2yrVoFs15iVQCgtaO4 Dxs/dfqjdMg1utzoASO4CfA= =L662 -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] - 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: Issue #39631 in Tomcat 5.5.23?
This looks like it might have more to do with a malformed XML file. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 27, 2007 1:38 PM To: users@tomcat.apache.org Subject: Issue #39631 in Tomcat 5.5.23? I am running Tomcat 5.5.23 on a Windows XP machine with JDK6. I have only one webapp (others are standard webapps packaged with Tomcat). During Catalina bootstrap, I see the null pointer exception (trace below) that looks quite like #39631 (SEE http://issues.apache.org/bugzilla/show_bug.cgi?id=39631). I do not have any libraries in endorsed or shared directories. I am using ver 1.2.14 of Log4j, ver 1.0.4 of commons logging and commons logging API (commons-logging-1.0.4.jar, log4j-1.2.14.jar, commons-logging-api-1.0.4.jar). Is this caused by incompatible jar versions? I am not sure how to troubleshoot this further. Pl help, Thanks, /U SEVERE: Context [/MASKED] startup failed due to previous errors Mar 26, 2007 9:08:38 PM org.apache.catalina.core.StandardContext processTlds SEVERE: Error reading tld listeners java.lang.NullPointerException java.lang.NullPointerException at org.apache.log4j.Category.isEnabledFor(Category.java:746) at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogge r.java:327) at org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig. java:582) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:283) at org.apache.catalina.core.StandardContext.processTlds(StandardContext. java:4307) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 144) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:74 0) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja va:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j ava:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 48) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Mar 26, 2007 9:08:38 PM org.apache.catalina.startup.ContextConfig processDefault WebConfig SEVERE: Parse error in default web.xml - 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: HTTP PUT - HOW TO CONFIG?
-Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Monday, January 29, 2007 3:20 PM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi Robert, Thanks for your help. After I added that readonly into web.xml, I can put files into /webapps/incoming. Right now it is ok for me. Because user ONLY can put files under /webapps/incoming dir. Also, in this way, tomcat does not require userID and password. Now there are three questions: 1. How to config to force using userID and password? I add putusero1 into tomcat-users.xml, it's useless. [Robert Harper] Look at the documents. You'll have to set up the security and determine what kind of authentication you want. This may be version dependent so I won't go into too much detail here. I am using 5.0 because that was the newest version when I developed my app and I don't see a big reason to change right now. 2. How to config another servlet to handle PUT in web.xml? servlet servlet-namePUT/servlet-name servlet-classorg.apache.jasper.servlet.???/servlet-class init-param param-name1/param-name param-value1/param-value /init-param init-param param-name2/param-name param-value2/param-value /init-param load-on-startup?/load-on-startup /servlet [Robert Harper] Create your servlet extending the HttpServlet and set the servlet-class value to the package_path.ClassName for your servlet. Use the security-constraint area in the web.xml file to set what you will and won't handle and other options. See the Tomcat documentation for your version on where and how to do this. servlet-mapping servlet-namePUT/servlet-name url-pattern/MyPUT/PUT-Handler/url-pattern /servlet-mapping 3. How to turn on client request log in tomcat side? [Robert Harper] I used log() method inherited from HttpServlet to log my messages. I created a little wrapper method so I could easily force certain patterns to the messages. Where they land is in the logger specification in your web.xml configuration in the servlet's context. The easiest way to configure the logging directory, file names, and other settings is with the admin app. What version are you using? Thanks Jimmy -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 12:07 PM To: 'Tomcat Users List' Subject: RE: HTTP PUT - HOW TO CONFIG? The problem is that the default servlet is handling the request(s) unless you have some other servlet do it. By default, the doPut() will check to see if the readonly property has been changed to false. If it has not, default behavior, it will return the forbidden error. If you change this to false, then you loose control of security and anything sent via a PUT will be allowed. You may want this but it also leaves you open to easy attacks. If you are sure you want to do this, try adding the following to the default servlet's configuration in the web.xml file. Where this is could vary based on the version of Tomcat you are running. init-param param-namereadonly/param-name param-valuefalse/param-value /init-param Most would prefer not to do this and would prefer to either write a filter or servlet to track the PUTs and have something to protect your system. You will not see anything in a log file because the default servlet does not write anything to the logs when it refuses the request. For Tomcat 5.0 the document to read on what the default servlet does and doesn't do would be found here. http://tomcat.apache.org/tomcat-5.0-doc/default-servlet.html Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 10:48 AM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi, I got some progress. I used a Python program to send a HTTP PUT request to my tomcat server. The Python allow my pick any local file to upload to tomcat server box. And I got response back from tomcat with error code 403(Forbidden). I'm thing, tomcat can handler the HTTP PUT, but need do something about config. Hope someone can help out of this config crabe. I have the client side log to look at, but I don't see any log in tomcat server side. Could anyone tell me how to turn on tomcat tracing log? I have 8 default log files there, but none tracing this test. They are: admin.2007-01-26.log, catalina.2007-01-26.log, host-manager.2007-01-26.log, jakarta_service_20070126.log, locahost.2007-01-26.log, manager.2007-01-26.log, stderr_20070126.log, stdout_20070126.log
RE: HTTP PUT - HOW TO CONFIG?
The problem is that the default servlet is handling the request(s) unless you have some other servlet do it. By default, the doPut() will check to see if the readonly property has been changed to false. If it has not, default behavior, it will return the forbidden error. If you change this to false, then you loose control of security and anything sent via a PUT will be allowed. You may want this but it also leaves you open to easy attacks. If you are sure you want to do this, try adding the following to the default servlet's configuration in the web.xml file. Where this is could vary based on the version of Tomcat you are running. init-param param-namereadonly/param-name param-valuefalse/param-value /init-param Most would prefer not to do this and would prefer to either write a filter or servlet to track the PUTs and have something to protect your system. You will not see anything in a log file because the default servlet does not write anything to the logs when it refuses the request. For Tomcat 5.0 the document to read on what the default servlet does and doesn't do would be found here. http://tomcat.apache.org/tomcat-5.0-doc/default-servlet.html Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 10:48 AM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi, I got some progress. I used a Python program to send a HTTP PUT request to my tomcat server. The Python allow my pick any local file to upload to tomcat server box. And I got response back from tomcat with error code 403(Forbidden). I'm thing, tomcat can handler the HTTP PUT, but need do something about config. Hope someone can help out of this config crabe. I have the client side log to look at, but I don't see any log in tomcat server side. Could anyone tell me how to turn on tomcat tracing log? I have 8 default log files there, but none tracing this test. They are: admin.2007-01-26.log, catalina.2007-01-26.log, host-manager.2007-01-26.log, jakarta_service_20070126.log, locahost.2007-01-26.log, manager.2007-01-26.log, stderr_20070126.log, stdout_20070126.log. Here is my test client side tracing: -- Command line command C:\Python25Python QuickPut.py -v C:\Python25\put.txt http://localhost:8080/incomming/put_test1.txt myUserID myPasswd Tracing: Sending HEAD request to: http://localhost:8080/incomming/put_test1.txt Auth: {'uname': 'myUserID', 'pswd': 'myPasswd'} HEAD response code: 404 Response headers: Server: Apache-Coyote/1.1 Content-Type: text/html;charset=utf-8 Content-Length: 1024 Date: Fri, 26 Jan 2007 16:49:26 GMT Connection: keep-alive HEAD response code: 404 Response headers: Server: Apache-Coyote/1.1 Content-Type: text/html;charset=utf-8 Content-Length: 1024 Date: Fri, 26 Jan 2007 16:49:26 GMT Connection: keep-alive PUTing to: http://localhost:8080/incomming/put_test1.txt Data: Content-Length: 29, Snippet: This is a HTTP PUT test file. Getting reply... Got reply Done: 403: Forbidden Server: Apache-Coyote/1.1 Content-Type: text/html;charset=utf-8 Content-Length: 964 Date: Fri, 26 Jan 2007 16:49:26 GMT Connection: keep-alive - 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: XML Parse problem in a webapp context.xml
There are probably required elements that are not present. The DTD/XLS could specify elements as being required and you can get an error during validation in processing the Resource tag. You may not be able to create an empty resource element or there are attributes that are required. Try modifying your resource to something more like: Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase / My simple guess would be that it is trying to invoce a method on a class defined in the type attribute. You are not providing one so it would be a null argument. I'd have to dig in code to see for sure but it may not protect against that because a resource without a class to manage it, makes no sense at all. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Pete [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 12:05 PM To: users@tomcat.apache.org Subject: XML Parse problem in a webapp context.xml Hello all, I've searched high and low before posting tried every test I could think of before posting here... This problem seems too simple to be a bug, but can't find a method of resolving it. I decided to skip the port of our application (ran fine on WAS 6 - JVM 1.5) that was that originated the problem and boiled it down to a WAR with 1 servlet that attempts to do a JNDI lookup to get a datasource. (This test web app works in WAS) Condensed details below. I hope someone can shed light on what is going on, thanks! -Pete The details: -Tomcat 6 - JVM 1.5 -WAR file created in Rational 6 -App does DB2 lookups (not even concerned about the code itsel yet) -Resources defined correctly in WEB-INF/web.xml (auto generated by Rational 6) -Added META-INF/context.xml -Added WatchedResourceMETA-INF/context.xml/WatchedResource in conf/context.xml -Automatic loading of app generates: conf/Catalina/localhost/TestWeb.xml - It looks like the parsing problem is in web.xml (from below error), but I could not find anything wrong there. I did not modify conf/web.xml and WEB-INF/web.xml is auto generated. So I started looking in TestWeb.xml and simplified it. Seems anything that I put in that file fails other than just: (no more errors in log file) Context /Context These even fail: -ContextResource //Context -ContextResource name=test//Context - Also had all details in the Context tag for the app and Resource tag as described in the documentation for DataSources (incl. DB2 datasources) I also tried putting the Resource definition in: -GlobalResources block of server.xml -The error generated is: (from catalina*.log) FINE: Processing context [/TestWeb] configuration file C:\Program Files\Apache Software Foundation\T omcat 6.0\conf\Catalina\localhost\TestWeb.xml null Jan 26, 2007 12:13:17 PM org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception java.lang.reflect.InvocationTargetException ... at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.jav a:899) at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:98) at org.apache.tomcat.util.digester.Rule.end(Rule.java:229) ... at org.apache.catalina.deploy.NamingResources.addResource(NamingResources.java: 275) ... 47 more Jan 26, 2007 12:13:17 PM org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in default web.xml java.lang.NullPointerException at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:27 26) ... It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/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]
RE: HTTP PUT - HOW TO CONFIG?
If I understand your question correctly and you are using servlets to handle web requests, just override the HTTPServlet.doPost() method. Put your code to handle the put in there. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 12:38 PM To: users@tomcat.apache.org Subject: HTTP PUT - HOW TO CONFIG? Hi, Is there any directive to handle HTTP PUT, like in the apache for tomcat (5.5)? In Apache I can using a directive such as: # A CGI PUT handler Script PUT /cgi-bin/put.cgi Questions: 1. If I have a put.pl ready to use, how to config in tomcat to let put.pl handle all request of HTTP/HTTPS PUT? (HTTPS is ready to be used). 2. I want to put all upload files under directory of $CATALINA_HOME/wepalls/incoming/, how to config? 3. Is there any sample put.pl perl program can be learned? Thanks Jimmy Zhan Cash America - 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: HTTP PUT - HOW TO CONFIG?
Bad day for me, you are very correct. It should be the doPut() method. From another post, I am very confused why he is trying to use Tomcat. He seems to want to redirect everything to PL script so why not just use a web server to redirect. It doesn't seem to be a good use for a Java servlet/JSP container. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 2:11 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: If I understand your question correctly and you are using servlets to handle web requests, just override the HTTPServlet.doPost() method. Uhh doPut(), maybe? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuRzt9CaO5/Lv0PARAqJ+AJ41G/xY7b1Un+5x1sTrMVMUlfzsrACgjmzI a7FG9mjPG7YJK3gogGUxivY= =kHW1 -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]
RE: HTTP PUT - HOW TO CONFIG?
Maybe the TC mailing list has a good reputation. ;) Very good point. - 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: HTTP PUT - HOW TO CONFIG?
I don't know if Tomcat would be able to do this without some code. It is not intended to replace Apache, IIS, or some other web server. It is intended to be a Java Servlet/JSP container. You might try creating a servlet that does something like this public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String buf = req.getRequestURL().replace( my_context_path, /cgi-bin/put.pl); resp.sendRedirect( buf ); } So let's say you have a URL like http://www.myserver.com/realitycheck, then replace to req.getRequestURL().replace( /realitycheck, /cgi-bin/put.pl ) Then use that in the redirect. Someone else might/will have a better idea but it seems to me you are trying to kill a fly with a water cannon where a fly swatter would be more efficient. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:53 PM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi, Thanks for your responses! I don't know tomcat how handle HTTP PUT requests. But I want tomcat transfers all PUT requests to my handler /cgi-bin/put.pl as apache does. How to config in tomcat to do this? Thanks Jimmy Zhan - 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: HTTP PUT - HOW TO CONFIG?
I don't know if it can or can not. I never tried because I wanted to write Java code to handle by web requests rather than learn PL script. If you don't want to write Java script, then why not just use Apache since you seem to know how to configure it just fine. Tomcat can do some simple web server functions as long as you don't turn off some features. Tomcat is more like a playground with a manager that will set what servlet gets to play were and when and who gets what request. The Tomcat Mailing list is primarily for questions and answers on configuration, running, and coding for Java servlets in the Tomcat servlet container. Some people are bright, much more so than me, and are willing to answer questions that don't really have much to do with the Tomcat servlet container. -Original Message- From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 4:03 PM To: Tomcat Users List Subject: RE: HTTP PUT - HOW TO CONFIG? Hi Robert and chris, Do you mean tomcat can NOT transfer PUT request to my handler Just apache does thru config? I'm new here. What's the TC mailing list? Thanks Jimmy -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 3:40 PM To: Tomcat Users List Subject: Re: HTTP PUT - HOW TO CONFIG? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: From another post, I am very confused why he is trying to use Tomcat. He seems to want to redirect everything to PL script so why not just use a web server to redirect. It doesn't seem to be a good use for a Java servlet/JSP container. Maybe the TC mailing list has a good reputation. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFuSO+9CaO5/Lv0PARAunWAJsGHJVorP+XejRBagReMfzQAVjtzACgibv4 kBu4zBdEUk69HWFJAj2nvFY= =6dRZ -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] - 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: Configurable Errors
It looks like it is looking for it in the root of either the machine or CATALINA_HOME. Resolve the path correctly and you'll probably find your problem. You didn't provide the path so the loader assumes the root. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: James Dekker [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 16, 2007 3:33 PM To: Tomcat Users List Subject: Configurable Errors Hello there, I am creating a configurable errors file which gets loaded as a properties file from an init servlet: import java.io.IOException; import java.util.Properties; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; public class ErrorInitServlet extends HttpServlet { static Properties errorProps = new Properties(); public void init() throws ServletException { Properties props = new Properties(); try { props.load(this.getClass().getClassLoader().getResourceAsStream( /error.properties)); } catch (IOException e) { e.printStackTrace(); } } public static Properties getErrorProperties() { return errorProps; } } The error.properties file looks like this: error.required.field=Required %s error.invalid.entry=Invalid %s error.unknown.entry=Unknown %s I created an ActionErrors.java file: package org.coffeebreak.wrapper; import java.util.Formatter; import java.util.ResourceBundle; /** * @author jdekker */ public class ActionError { private final ResourceBundle m_resource; public ActionError() { m_resource = ResourceBundle.getBundle(error.properties); } public String getMessage(String id, Object... parameters) { String value = m_resource.getString(id); if (null != value) { StringBuilder builder = new StringBuilder(); Formatter f = new Formatter(builder); f.format(value, parameters); f.flush(); return builder.toString(); } return value; } } I had my ant build script move the error.properties to: TOMCAT_HOME/WEB-INF/classes/org/coffeebreak/wrapper/ Now, when I invoke this class, through a client, this is the error that I get: INFO: Deploying web application archive coffeebreak.war 2007-01-16 13:55:41,753 WARN [org.coffeebreak.model.AttributeBeanXmlConfigHelper] - commons digester rules location: file:/C:/DevTools/tomcat/jakarta-tomcat-5.5.9/webapps/coffeebreak/WEB-INF/cl asses/org/coffeebreak/model/attribute-rules.xml 2007-01-16 13:55:42,128 WARN [org.coffeebreak.config.XmlConfigInitServlet] - Finished parsing the attribute XML config file. 2007-01-16 13:55:42,128 WARN [org.coffeebreak.config.LoadErrorProperties] - Loaded error.properties file. 2007-01-16 13:56:16,421 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/coffeebreak ].[CoffeebreakAppServlet]] - Servlet.service() for servlet CoffeebreakAppServlet threw exception java.util.MissingResourceException: Can't find bundle for base name /error.properties, locale en_US at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:8 36) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805) at java.util.ResourceBundle.getBundle(ResourceBundle.java:549) at org.coffeebreak.wrapper.ActionError.init(ActionError.java:21) at org.coffeebreak.views.EditUserPane.validateFields(EditUserPane.java:159) at org.coffeebreak.views.EditUserPane.processSave(EditUserPane.java:148) at org.coffeebreak.views.EditUserPane.actionPerformed(EditUserPane.java:141) Why is ActionError having trouble finding the error.properties file? Is there a way to use my InitServlet's getter to set the resource bundle? Am I going about this the wrong way? Sincerely, James - 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:
RE: Configurable Errors
In my servlet, I load a properties file that is in my [context_path]/classes directory with the following line of code m_resource = ResourceBundle.getBundle( ctimpact, Locale.getDefault() ); This works fine for me. You could try removing the .properties part of the file name. The API may be adding it by default. Also maybe move your properties file to the classes directory. I hope that helps. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -Original Message- From: James Dekker [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 16, 2007 3:53 PM To: Tomcat Users List Subject: Re: Configurable Errors Dear Mr. Harper, Thank you for the response! I set the path inside the ActionError constructor as follows: public ActionError() { m_resource = ResourceBundle.getBundle(/error.properties); } I thought the / meant the root directory inside CATALINA_HOME/WEB-INF/classes/. Since, my error.properties file is going inside the CATALINA_HOME/WEB-INF/classes/org/coffeebreak/wrapper/ directory via my Ant build script, I rewrote the code inside the constructor as: public ActionError() { // I removed the slash m_resource = ResourceBundle.getBundle(error.properties); } And then it gave me that Missing exception... What am I possibly doing wrong? Sincerely, James Dekker - 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: Standards Complaint Browser Campaign
Robert S. Harper Information Access Technology, Inc. -Original Message- From: EDMOND KEMOKAI [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 9:51 AM To: Tomcat Users List Subject: Re: Standards Complaint Browser Campaign Web developers aren't suppose to be supporting browsers!! That may be true but to ignore the behavior differences especially when the target audience is using something other than you are is poor practice. One way to avoid most problems is to stay away from browser specific features and rely on standard markups and extensions as much as possible. You'll be looked upon with much more favor if you test in the most popular browsers and ensure they work and look good than if you start putting requirements on what browser the end user must use. - 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: Having trouble making Tomcat available from outside the network
Did you check the logs on the server running Tomcat to see if the request was making the trip to the server? The other thing is the server's IP exposed to the outside world and, if it is, is it the same IP? Often this is not the case. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Simon Renshaw [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 13, 2006 11:19 AM To: users@tomcat.apache.org Subject: Having trouble making Tomcat available from outside the network Hi, I installed Tomcat 5.5.12 on a CentOS 4.4 server. I used port 9090. Then I installed Luntbuild on it. I can access it internally without problems. I created a rule in the firewall to forward port 9090 request to the Linux server. Unfortunately, when trying to access the site from the outside, I get a page not found error. Since that didn't work, I tried with Tomcat 5.5.20 on Windows 2003. I used port 9191 this time. Also added a rule for 9191. And I got the same results. As far as I know, the ports are open on each machine and there are no software firewalls running. Is there something I missed when I installed Tomcat? Thanks! Simon - 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: Having trouble making Tomcat available from outside the network
I usually look in the logs I set up for my contexts or in the stdout.log. You should see some logging from requests having hit filters, if you are using them. The other thing you could do is start the network monitoring tool that comes with Win 2003 server, or some similar tool, and watch activity on the ports in question. If the requests aren't making it to the server, then the problem is further up the chain. Do you see the request hitting the firewall? Robert S. Harper Information Access Technology, Inc. -Original Message- From: Simon Renshaw [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 13, 2006 11:43 AM To: Tomcat Users List Subject: RE: Having trouble making Tomcat available from outside the network There are a lot of log types in /logs. Which one should I check? The server is behind a firewall and we use NAT. Think this could be the cause? I use the firewall to forward HTTP, SMTP, FTP etc request to other servers and I'm only having troubles with Tomcat. I'm really stumped there. Simon [Robert Harper] snip - 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: Having trouble making Tomcat available from outside the network
What is the weird stuff? Have you tried port 8080 that is a normal testing port for 80? This sounds like a fun one to track down and may be more related to network than Tomcat. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Simon Renshaw [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 13, 2006 1:24 PM To: Tomcat Users List Subject: RE: Having trouble making Tomcat available from outside the network I looked in catalina.out since there is no stdout.log. There are nothing (0 bytes) in the admin, host-manager and manager logs. The Catalina.date logs contain startup info. Some weird stuff in the localhost.date ones. Talking about the Linux version here. I asked a friend to go to www.domain.com:9090 and there was nothing in the logs of the firewall. Damnit! Not looking good. Simon [Robert Harper] snip - 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: Client request times out
I think the bigger question is why does it take that long to run? I can't think of too many people that are willing to wait that long for information. Personally I'd give you 30 seconds and then I'll never use something that slow again. If you are accessing data, try adding indexes or a data redesign to speed things up. A simple index based on key data can speed up searches exponentially. Just a thought. Most of my problems have been my problems not something Tomcat was doing wrong. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Richard Doust [mailto:[EMAIL PROTECTED] Sent: Friday, December 08, 2006 8:23 AM To: Tomcat Users List Subject: Client request times out I have a problem with a servlet running longer than 5 minutes. The client's browser is delivered an error response from somewhere on the server in an Apache/JBoss/Tomcat stack at the 5 minute mark. Does anyone know what properties/attributes in what configuration files might allow the servlet to run for longer than 5 minutes? I have tried: TimeOut (in apache config) disableUploadTimeout (in Connector attribute settings, server.xml for Tomcat 5.5) socket_timeout (in workers.properties) None seem to have the desired effect. Any help would be appreciated. Thanks. - 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: How do I print out line of code that caused the error?
The problem is that the JSP is not compiled on the browser. Even if it was, you would be bound on functionality provided by the particular browser. The servlet container might send an error in the response but that would be up to the container provider as well. Because these behaviors are not bound by standards, you can't count on them to always be there if you once had what you want. There should be server side logs that will show your problem. Robert S. Harper Information Access Technology, Inc. -Original Message- From: D. Alvarado [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 12:32 PM To: Tomcat Users List Subject: Re: How do I print out line of code that caused the error? Thanks. So there's absolutely no way within the web browser to print out the line of code that caused the error? In the example, the line i would've liked to see in the web browser would have been: String v1 = session.getAttribute(attr); Thanks, - Dave On 11/28/06, Edoardo Panfili [EMAIL PROTECTED] wrote: D. Alvarado ha scritto: Hi, I'm using Tomcat 5.5 with Apache 2. Upon getting jsp compilation errors, I'm not told any inofrmation about the code the causaed the error and the line printed is incorrect. What do I need to configure to correct this? For example, this page below: %@ page import=java.util.* % % Object v = new String(b); session.setAttribute(a, v); Enumeration e = session.getAttributeNames(); while (e.hasMoreElements()) { String attr = (String) e.nextElement(); String v1 = session.getAttribute(attr); session.getAttribute(String) returns an Object try: String v1 = (String) session.getAttribute(attr); String v2 = session.getValue(attr); out.println(attr: + attr + v1: + v1 + v2: + v2 + BR\n); } // while % causes this error. You can eventually figure out the problem, but line 2 is not right. =begin error type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 2 in the jsp file: /session_vars.jsp Generated servlet error: Type mismatch: cannot convert from Object to String An error occurred at line: 2 in the jsp file: /session_vars.jsp Generated servlet error: Type mismatch: cannot convert from Object to String org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra pper.java:512) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 77) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ===end error== If you need to see the generated code for the JSP take a look at $tomcat_install_dir$/work/Catalina/ Edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - 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]
Serving up applets
This has probably been covered before but I'm having a hard time getting an applet on a servlet generated page to load. I keep getting a ClassNotFound exception even though the class is in several possible areas for it to load. It is a package that is like com.company.service.MyApplet.class. If Tomcat can provide the images, why can't it find and send the applet class? Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists.
RE: Serving up applets
The browser is. The Java console and an error box is displayed by IE when it tries to load the applet. I see nothing in the Tomcat logs. Either for security problems or not finding the class. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 12:33 PM To: Tomcat Users List Subject: Re: Serving up applets Hi Robert Which class is throwing the ClassNotFoundException? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: Robert Harper To: Tomcat Users Sent: Thursday, November 16, 2006 12:45 PM Subject: Serving up applets This has probably been covered before but I'm having a hard time getting an applet on a servlet generated page to load. I keep getting a ClassNotFound exception even though the class is in several possible areas for it to load. It is a package that is like com.company.service.MyApplet.class. If Tomcat can provide the images, why can't it find and send the applet class? Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. - 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: Serving up applets
Snippet of the HTML applet code=com.iat.ctimpact.CTImpactStatisticsApplet.class height=300 width=584 param name=Link value='https://127.0.0.1:8443/ctimpact/servlet/CTImpact/?User=001TESTList=C 001MAIN' param name=Timer value=5000 /applet Snippet from Java Console network: Connecting https://localhost/ctimpact/servlet/com/iat/ctimpact/CTImpactStatisticsApplet /class.class with proxy=DIRECT load: class com.iat.ctimpact.CTImpactStatisticsApplet.class not found. java.lang.ClassNotFoundException: com.iat.ctimpact.CTImpactStatisticsApplet.class at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadCode(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed. at sun.applet.AppletClassLoader.getBytes(Unknown Source) at sun.applet.AppletClassLoader.access$100(Unknown Source) at sun.applet.AppletClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 10 more basic: Exception: java.lang.ClassNotFoundException: com.iat.ctimpact.CTImpactStatisticsApplet.class java.lang.ClassNotFoundException: com.iat.ctimpact.CTImpactStatisticsApplet.class at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadCode(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed. at sun.applet.AppletClassLoader.getBytes(Unknown Source) at sun.applet.AppletClassLoader.access$100(Unknown Source) at sun.applet.AppletClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 10 more basic: Modality pushed I have plastered the class all over the place with the full path from the app root out. I started with it landing in the same location as the servlet code and then added it to the application root. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 1:20 PM To: Tomcat Users List Subject: Re: Serving up applets -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: This has probably been covered before but I'm having a hard time getting an applet on a servlet generated page to load. I keep getting a ClassNotFound exception even though the class is in several possible areas for it to load. It is a package that is like com.company.service.MyApplet.class. If Tomcat can provide the images, why can't it find and send the applet class? Give us the relevant code from your HTML page that shows the applet. We'll start from there. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFXMfc9CaO5/Lv0PARAijYAKCjd37G5zEuEFj0ASfG1K/TT3fHswCfeHrM 82Ap2/TYmjaPwlSVQMvtA1k= =Y7GR -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]
RE: Serving up applets
I'm not trying to do any extra work with Swing or such. I want to keep this as dumb as possible so I don't have to require the latest and greatest or test in every browser. This is very minimalist. I have tried playing with the codebase attribute in other testing and IE just got even more confused. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 2:21 PM To: Tomcat Users List Subject: Re: Serving up applets Not to mention security permissions one must grant thru either updates to policy files OR running your bundled code thru SecurityManager PlugIn http://java.sun.com/developer/technicalArticles/Security/applets/ Be mindful that this will have to work in every browser and every JVM your client supports so I would opt to install Sun Java Security Manager plugin http://java.sun.com/products/plugin/1.3/plugin-install.html OR RSA Security Manager plugin http://www.rsasecurity.com/blog/entry.asp?id=1003 and configure the jar to execute/read/write within the plugin environment- HTH, M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: David Smith [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, November 16, 2006 3:17 PM Subject: Re: Serving up applets Where are you putting the applet class? It can't be in WEB-INF because that isn't available to the client. --David Robert Harper wrote: The browser is. The Java console and an error box is displayed by IE when it tries to load the applet. I see nothing in the Tomcat logs. Either for security problems or not finding the class. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 12:33 PM To: Tomcat Users List Subject: Re: Serving up applets Hi Robert Which class is throwing the ClassNotFoundException? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: Robert Harper To: Tomcat Users Sent: Thursday, November 16, 2006 12:45 PM Subject: Serving up applets This has probably been covered before but I'm having a hard time getting an applet on a servlet generated page to load. I keep getting a ClassNotFound exception even though the class is in several possible areas for it to load. It is a package that is like com.company.service.MyApplet.class. If Tomcat can provide the images, why can't it find and send the applet class? Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === David Smith Network Operations Supervisor Department of Entomology College of Agriculture Life Sciences Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: 607.255.9571 Fax: 607.255.0939 - 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: Serving up applets
It looks like the codebase attribute helped. Now I'll see what I can do from there. Thanks. Just don't let preliminary testing dictate what you don't try later I guess. Robert S. Harper Information Access Technology, Inc. - 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: Is Tomcat a good solution for me?
If your content is static pages, the Apache might be a better option. If you are using Java Servlets for dynamic content, then Tomcat would work fine. You may have to adjust some of your code to match changes in the runtimes. If you are using ASP, I don't think Tomcat is for you. You should be able to run PWS and Tomcat at the same time on different ports. Remember that Tomcat is a Java centric servlet container. It can serve up static content but is primarily suited to run and control your Java Servlets. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Gary Kuznitz [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 07, 2006 2:47 PM To: Tomcat Users List Subject: Is Tomcat a good solution for me? Hi, I'd like some help in figuring out if Tomcat is right for me. I currently have PWS running in '98se with ASP pages. I have very little traffic. I'd like to use the same web pages I currently have. I'd like to move towards XP Pro. My first question is should I use Tomcat to replace PWS? Should I install Apache at the same time or will Tomcat suffice my needs. I don't expect to expand the web pages. Can I install Tomcat on the same PC PWS is currently running and use a different port for Tomcat while I am testing/configuring the same web pages. After I know it works I would want to swap ports between PWS and Tomcat. After I know Tomcat is fully functional I could remove PWS. I don't currently have the XP Pro box. I'd like to migrate everything to Tomcat on '98 if I could. Any and all suggestions are welcome. If I haven't given enough information to advise me please let me know. Thank you, Gary Kuznitz - 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: Communication with a standalone java program from servlets (embedded tomcat). RMI?
I don't know of anything that requires you to embed Tomcat in your app. They should be able to communicate just find as separate entities. You could also maybe wrapper some OS specific IPC with JNI. We use RMI both internal to a machine and externally to other machines just fine and you don't have to have anything embedded. Your servlet can communicate to another process/machine with no change in code except logic of where to connect. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Igor Borovkov [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 12:20 PM To: users@tomcat.apache.org Subject: Communication with a standalone java program from servlets (embedded tomcat). RMI? Hello! I have a standalone java program permanently running on a server. I need to communicate with that java program from servlets. Could you suggest me a simplest solution how to do that. I think I should use RMI. But there is one requirement - apache tomcat should be embedded to that program. Will this requirement bring difficulties or not? Thanks in advance. - 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: Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?
The big thing is scalability. If you leave them separate, you can put Tomcat in one system and have your app running in another. This will help with loading if either process ends up using a lot of CPU. Using RMI you can make it loosely coupled where only the interface is known. As long as the interface is not changed, you don't have to worry about changes in one affecting the other. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Igor Borovkov [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 1:08 PM To: Robert Harper Cc: 'Tomcat Users List' Subject: Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI? I don't know of anything that requires you to embed Tomcat in your app. They should be able to communicate just find as separate entities. You could also Thanks for your reply. We thought about embedding tomcat (to startup it from the java program) to simplify whole application and improve its portability, cause it is more convient for us and our system to have all logic both of the java program and the servlets in one place. But perhaps it is not really good idea. - 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: log question and lambda probe
I think you can specify a full path but Tomcat must have full access to the other directory. Logger className=org.apache.catalina.logger.FileLogger debug=9 directory=[your_path]/logs prefix=localhost_log. suffix=.txt timestamp=true verbosity=4 / Set in the [Catalina_home]/conf/server.xml file. As for hiding the tomcat-users data from being browsed, you will have to turn off directory listings init-param param-namelistings/param-name param-valuefalse/param-value /init-param For the default servlet. Not a big deal. Tomcat can still read it to load the users but will not allow browsing under the http(s)://[tomcat_host] URL. This is set in the [Catalina_home]/conf/web.xml file. Robert S. Harper Information Access Technology, Inc. -Original Message- From: mast [mailto:[EMAIL PROTECTED] Sent: Thursday, November 02, 2006 10:33 AM To: Tomcat Users List Subject: Re: log question and lambda probe Nobody has ideas ? - Original Message - From: mast To: Tomcat Users List Sent: Wednesday, November 01, 2006 12:27 AM Subject: log question and lambda probe Hi again, i have download the lambda probe to see how it was and i have notice some things with log, in their context.xml file there is : Logger className=org.apache.catalina.logger.FileLogger prefix=probe. suffix=.out timestamp=true/ well that work wells but put the log under the logs directory of tomcat i wonder if there is no way to put it elsewhere ? (like in the same webapps that want the log) i have try with : Logger className=org.apache.catalina.logger.FileLogger directory=/usr/local/tomcat5/webapps/users3/ROOT/ prefix=probe. suffix=.out timestamp=true/ without any succes, is it possible or must i forget this ? one other problem i have with this application (the same problem that i talk two days ago about permission) is that we need to put the user/password under the tomcat-users.xml file, and like Chuck said this file must be readable by tomcat user. so the server that will serve the probe application (or any other of my context) is user tomcat and so any jsp script that a user that has an access to the server can read the tomcat-users.xml file because that s the same owner (don t know if i explain well) i have heard about the security manager maybe it s the solution (but not sure because when i run in security mode many webapps doesn't work anymore) well if someone has an advice about that that question may seem silly but i am concerned with security and doesn t find any answer that i could really use until now. Thx - 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 memory usage questions
The memory should peak at some point and the go up and down with need. There are a few things you have to be aware of though. The garbage collector is a very low priority thread so if your server never has a dull moment, you end up exhausting memory just because the garbage collector does not get a chance to run. Care in development should be taken with respect to use of objects and having circular references. You can cause memory leaks with circular references because you might leave free and object from the servlet but then have two objects referring to each other and the GC will not see them as having gone out of scope. Another thing to think about is if you are doing a lot of string concatenation the StringBuffer object is much better to use than the String object. StringBuffer will be easier on memory and more efficient. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Rizwan Merchant [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 7:41 AM To: tomcat Subject: tomcat memory usage questions Hi, We recently developed and deployed a web based application using the following technologies... Struts Spring Hibernate 3.0 Mysql 5.0 tomcat 5.5 Linux Fedora Core 4 After the system went live, I have been monitoring the CPU and memory usages. I dread the outOfMemory errors and am a little paranoid about it. There are 2 main processes I am monitoring, tomcat and mysqld. The tomcat process memory usage is slowly creeping up...after 8 hours of application usage it is at 13.3% and the mysqld memory usage is at 1.3%. I am wondering what kind of pattern I should be observing for the memory usages. Should it go up and then down again (like the CPU usage)? Or is it ok for it to slowly go up (the way it is doing right now)? The swap memory is not being used, so I am guessing thats a good thing. Also, someone told me that hibernate and spring will try and cache everything it can, which could be the cause of the memory creeping up slowly. Is this true? and if it is, will this be a problem when the memory gets to a high number like 80 or 90% ? Also, is there a way to tell if there are any processes spawned by tomcat that are hanging around uselessly? Any help, ideas, tips would be appreciated. I am just concerned about having any memory issues with this LIVE application. Thanks, -Riz. http://forum.springframework.org/newreply.php?do=newreplyp=79473 - 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: Help please
Check your definition of the servlet in the [app_root]/WEB-INF/web.xml file. There is a reference to where the filters are located. You probably need to either create this class or remove the reference from the web.xml file. Robert S. Harper Information Access Technology, Inc. _ From: Kevin Mullin [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 9:27 AM To: users@tomcat.apache.org Subject: Help please I've just downloaded Tomcat 5.5.17 and am trying to run it on our mainframe system that is running z/OS 1.7 operating system. I am getting a failure in Tomcat that says: java.lang.ClassNotFoundException: compressionFilters.CompressionFilter Does anyone know what is causing this, and what I can do to correct it? Kevin Mullin Sr. Analyst IBM Corporation (206) 345-7068 [EMAIL PROTECTED] http://www.ibm.com/ibm/values/
RE: Help please
I think the problem has more to do with Tomcat on a mainframe and conversion from ASCII to EBCDIC. The XML parser is having problems translating the XML records in the configuration files. Does anyone have experience with Tomcat on a mainframe? Robert S. Harper Information Access Technology, Inc. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 11:54 AM To: Tomcat Users List Subject: Re: Help please Kevin- To use CompressionFilter you 1)override doFilter method to provide filtering response via previously defined 'FilterChain' 2)wrap your regular response as a CompressionServletResponse before sending back to client (as in this example from Kief Morris) public void doFilter(ServletRequest request ServletResponse response, FilterChain chain) throws IOException, ServletException { long startTime = System.currentTimeMillis(); chain.doFilter(request, response); long stopTime = System.currentTimeMillis(); System.out.println(Time to execute request: + (stopTime - startTime) + milliseconds); } Later on in the service() doGet() or doPut() methods check the response to build the appropriate CompressionServletResponseWrapper if (response instanceof HttpServletResponse) { CompressionServletResponseWrapper wrappedResponse = new CompressionServletResponseWrapper((HttpServletResponse)response); wrappedResponse.setCompressionThreshold(compressionThreshold); if (debug 0) { System.out.println(doFilter gets called with compression); } } Make SURE the actual class (which is displayed from your web.xml) is on your classpath or your class is located in $TOMCAT_HOME/webapps/NameOfYourWebApp/WEB-INF/classes) The example $TOMCAT_HOME\webapps\servlets-examples\WEB-INF\web.xml displays filter filter-nameCompression Filter/filter-name filter-classcompressionFilters.CompressionFilter/filter-class /filter HTH Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Kevin Mullin To: users@tomcat.apache.org Sent: Friday, September 15, 2006 11:27 AM Subject: Help please I've just downloaded Tomcat 5.5.17 and am trying to run it on our mainframe system that is running z/OS 1.7 operating system. I am getting a failure in Tomcat that says: java.lang.ClassNotFoundException: compressionFilters.CompressionFilter Does anyone know what is causing this, and what I can do to correct it? Kevin Mullin Sr. Analyst IBM Corporation (206) 345-7068 [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: Handling huge amount data
I've seen the memory rise and fall so if the GC releases memory, it should be returned to the OS. It would be my guess that you may not be handling removing all references to an object the way you think you are. You can test this out by adding a log in the finalize() method of your object and see if it ever gets called. You could have a reference somewhere in a static class or some other class that you have not released as well. As long as there is more than one reference to an object, the GC will not free it. I had found this to be the case in something I was working on. It is hard to find at times but you should be able to find it. The other thing to remember is that the GC is a very low priority thread and if the system is very busy, it may not run as often as you would like. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 9:44 AM To: Tomcat Users List Subject: Re: Handling huge amount data José, Looking Windows Task Manager I perceived the natural memory increase. I noticed that when I call my logout method (It calls session.invalidate()) or my user session expieres the memory is still in use, in other words, the memory is not cleaned. Windows only reports the size of the application in memory. Once Java requests memory from the OS, I don't believe that it ever returns it. So, the memory size reported by Windows Task Manager will only increase, never decrease. You need to look at the memory behavior /inside/ the JVM, which is much more complicated than what Windows Task Manager displays. There are some tools that will help you see into a JVM, including simply using the verbose GC settings when starting your JVM, as well as some other 3rd-party tools that can give you a lot of information about the JVM upon which Tomcat is running (LabmdaProbe comes to mind: http://www.lambdaprobe.org/d/index.htm). Hope that helps, -chris - 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: 2 tomcat on the same PC
Set up a command file for each version that sets the CATALINA_HOME to the correct location. Also have the batch files set other needed environment values as well. If you want both of them to run as a service, create a service for both versions and set the command line. You could also set up a user for each of them where the user specifies a different environment. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Yan Bai [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 10:31 AM To: Tomcat Users List Subject: Re: 2 tomcat on the same PC It doesn't work in my case. even after changed the port numbers in one server.xml. I have both T4.1 and T5.5 installed on win XP. becoz CATALINA_HOME point to where T5 is, even explicitly call T4 'startup' script, T5 server is started. Any other tricks to make both work? On 8/18/06, Peter Crowther [EMAIL PROTECTED] wrote: From: tamri [mailto:[EMAIL PROTECTED] I have installed tomcat1.5 on the same PC on the 2 other directory(c:\\tomcat1.5 and d:\tomcat1.5) .I can't run two tomcat together. I want to run theese two tomcats together, can I do this? how it to do? Pick one Tomcat. Edit its conf/server.xml. Find *all* the port numbers that are in use (usually the shutdown port and the default connector port) and change each of them them to new values that are not already in use on your computer. Save server.xml. Start your two Tomcats. - Peter - 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]
Using Tomcat's internal bean server.
Ive tried this before so let me rephrase this. I am using Tomcat to perform the authentication and I have an app that is adding new users to the tomcat-users database just fine. The problem is that Id like to get the role and group attributes back. I would rather not keep the information in another database and just use the existing MBean. The Users:type=UserDatabase,database=UserDatabase bean only has methods for finding users and getting their full names. Is there some way to do this or can I change the mbeans-descriptors.xml file to add methods I need that wrap the UserDatabase.getGroups() and UserDatabase.getRoles() methods? Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists.
User database and user attributes
I am using the Tomcat user database to hold information for users. What I need to do is retrieve the group a user is in from the database. My problem comes when I have a servlet add a new user, assign it to a roll and a group, then try to access the user from another servlet running in the same context. I often get exceptions thrown when I call the save() method on the user object stating that Tomcat cannot rename the tomcat-users.xml to tomcat-users.xml.old. The user info is still in memory and if enough time passes or the server is stopped, the data eventually gets flushed to disk. There are methods for finding the user, finding a roll, and finding a group, but I dont see a method for finding a group for a given user using the MBeanServer(). I had been using the XML libraries to load the database and then search through it finding the user then getting the assigned roll but it only works when the new user information is flushed to disk. What would be the best way to do this? Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists.
RE: User database and user attributes
Robert S. Harper Information Access Technology, Inc. -Original Message- From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 3:25 PM To: Tomcat Users List Subject: Re: User database and user attributes [snip] Use some kind of a database related realm: * http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JDBCRealm * http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#DataSourceRealm Memory realm (tomcat-users.xml file) is a very simple one, following documentation: *MemoryRealm* is a simple demonstration implementation of the Tomcat 5 |Realm| interface. It is not designed for production use. -- Mikolaj Rydzewski [EMAIL PROTECTED]http://ceti.pl/~miki/ PGP KeyID: 8b12ab02 There are three kinds of people: men, women and unix. [Robert Harper] I've been using the MBeanServer to access the tomcat-users database but there are not methods for retrieving the group or role for a user. I have been adding users and adding roles and groups to users just fine. The problem is when I have a user and I want to get the group assigned to that user, there is not a method exposed for that. - 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: Response time banding
One thing to consider is that the times may not be totally in synch. Some threads pending a write to the log might get interrupted while another thread runs. You may see log entries out of order. I have seen this myself and have added System.out.flush() to my logger. It helps but still does not ensure exact order. Make sure you go over the time stamps carefully before you pass too much judgment. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 2:35 PM To: Tomcat Users List Subject: Re: Response time banding I would measure at all layers during the request processing to determine whether irregularities occur somewhere. Leon P.S. the response times as measured by the access log - don't you have the proper tools for that? JMeter? On 7/26/06, Edward Hibbert [EMAIL PROTECTED] wrote: Odd one, this. I'm posting looking for off the wall suggestions. Though not too off the wall, please. We have an application running under Tomcat. If we analyse the response times as measured by the access log, then we see that for the same GET operation there is a distribution of response times. Well, you'd expect that. But while the bulk of response times are below about 0.25 seconds (in most cases considerably below), there is a banding effect where we get a cluster of response times around 2 seconds, and another cluster around 5 seconds, with little or no values in between. We've looked at garbage collection as the most likely source of this, and ruled it out. Has anyone seen anything similar, or got any bright ideas? Regards, Edward. - 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: BOOBIES!
Get a life. I know it was not a nice thing to do but there is more time being spent on complaining about this than things that matter. If you see a title you don't like, delete it. Unless the question is so totally lame that a five year-old could figure it out, stop responding with RTFM. Some of the manuals are so hard to read and information is so scattered that it is hard to get answers. Remember that if you don't want to read it, you don't have to. Just keep responses respectful and informative. Robert S. Harper Information Access Technology, Inc. - 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: sort an array
If you need to keep one array in a certain order, why not add the references to another sorted array. Then you could have a primary array and a sorted array. They would both hold references to the same objects. The down side is that when you remove an element from one array, you will have to also remove it from the other array. Robert S. Harper Information Access Technology, Inc. -Original Message- From: password password [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 8:57 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: sort an array Hi, Arrays.sort(astrName); I can not use the sort method because I have the arrays have an relation. I mean, the first element of astrName have relation with first element of adblBackground1, adblBackground2, adblItensity1 and adblItensity2. Then I can sort each array independently, if I sort an element of astrName I have to sort the rest of arrays. Can you tell me a way to do this? Thanks. - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.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 just died on our Production Server
It looks like the socket closed for some reason. You might want to try catching the exception and doing some clean up so that your app doesn't die. The connection is lost but you may be able to recover so that you can keep servicing requests from other connections. One way to test this would be to use your development server to service the same requests and while it is busy servicing a request, disconnect the network and see what happens to you app. The connection will be dead of course but your app should be coded so that it can recover and not need a restart so that when the connection is back, your app is ready to service more requests. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Pete Alvin [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 10:08 AM To: users@tomcat.apache.org Subject: Tomcat just died on our Production Server Any idea what this means? At 1:52 our Tomcat just stopped serving pages. Help.. my boss is *pissed* and I have no idea how to address this. I re-started Tomcat and I'm back in service... but WHY DID IT HAPPEN? Thanks in advance. Pete Mar 9, 2006 1:52:12 AM org.apache.jk.core.MsgContext action WARNING: Error sending end packet java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:508) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112) at org.apache.jk.core.MsgContext.action(MsgContext.java:293) at org.apache.coyote.Response.action(Response.java:182) at org.apache.coyote.Response.finish(Response.java:304) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.jav a:674) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocke t.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo ol.java:684) at java.lang.Thread.run(Thread.java:534) Mar 9, 2006 1:52:12 AM org.apache.jk.common.ChannelSocket processConnection WARNING: processCallbacks status 2 - 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 just died on our Production Server
You are probably right and if that is the case, it should be easy to reproduce in your testing area and you can work on making your servlet more bullet proof. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 10:52 AM To: 'Tomcat Users List' Subject: RE: Tomcat just died on our Production Server Can't this exception be the result of the user hitting the STOP button, or simply closing the browser? I.e., this can happen all the time. Are you certain this is the exact cause of death? From the stack trace (unless you've filtered it) it appears your code is complete, and the response is committed, and that Tomcat is now forwarding back through JK to Apache. So, I'm not sure your application can catch it. I.e., you've got no code on the stack which could even have a catch { ... } block. Or am I missing something? Tim -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 12:19 PM To: 'Tomcat Users List' Subject: RE: Tomcat just died on our Production Server It looks like the socket closed for some reason. You might want to try catching the exception and doing some clean up so that your app doesn't die. The connection is lost but you may be able to recover so that you can keep servicing requests from other connections. One way to test this would be to use your development server to service the same requests and while it is busy servicing a request, disconnect the network and see what happens to you app. The connection will be dead of course but your app should be coded so that it can recover and not need a restart so that when the connection is back, your app is ready to service more requests. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Pete Alvin [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 10:08 AM To: users@tomcat.apache.org Subject: Tomcat just died on our Production Server Any idea what this means? At 1:52 our Tomcat just stopped serving pages. Help.. my boss is *pissed* and I have no idea how to address this. I re-started Tomcat and I'm back in service... but WHY DID IT HAPPEN? Thanks in advance. Pete Mar 9, 2006 1:52:12 AM org.apache.jk.core.MsgContext action WARNING: Error sending end packet java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:508) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112) at org.apache.jk.core.MsgContext.action(MsgContext.java:293) at org.apache.coyote.Response.action(Response.java:182) at org.apache.coyote.Response.finish(Response.java:304) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.jav a:674) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocke t.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo ol.java:684) at java.lang.Thread.run(Thread.java:534) Mar 9, 2006 1:52:12 AM org.apache.jk.common.ChannelSocket processConnection WARNING: processCallbacks status 2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.0.28 memory leak
I have a similar problem with 1.4.2_07-b05. My app runs with very little traffic but as time goes on, the system runs out of memory even though there is plenty of idle time for the gc to do it's thing. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 12:26 PM To: Tomcat Users List Subject: RE: Tomcat 5.0.28 memory leak From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5.0.28 memory leak I am using jdk1.4.0_04 and tomcat 5.0.28. You really need to get off that level ASAP. Use 1.4.2, which fixes many, many bugs compared to 1.4.0. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.0.28 memory leak
OK so when all objects have only have method scope and none are static. How is it that I am holding onto them? Robert S. Harper Information Access Technology, Inc. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 12:38 PM To: Tomcat Users List Subject: RE: Tomcat 5.0.28 memory leak From: Robert Harper [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat 5.0.28 memory leak I have a similar problem with 1.4.2_07-b05. My app runs with very little traffic but as time goes on, the system runs out of memory even though there is plenty of idle time for the gc to do it's thing. That's a classic description of a Java application memory leak - something in your webapps is hanging on to object references that are no longer needed. Forgetting to remove dead entries from hash maps is one common example. You need to run a heap profiler. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.0.28 memory leak
I am not using Struts. The logger is the default logger from the servlet. I am only calling the log() function from the HttpServlet.log() method for logging. The logging is context based on the Tomcat configuration. The way I know I am running out of memory is that when I attempt to create a new object an out of memory exception is thrown and my customers cannot access the site until the container is stopped and restarted. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 5.0.28 memory leak From: Robert Harper [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat 5.0.28 memory leak OK so when all objects have only have method scope and none are static. Is that what the profiler says, or is that your assessment of your applications? What about loggers, Struts, or other frameworks you might be using? Are you certain you're running out of heap memory? Have you turned on -XX:+PrintGCDetails? Are you perhaps exhausting PermGen space, which by default is much too small for a server environment? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Question
If the files in question are in an archive, then there must be something that is extracting them. You can use the jar tool to view the contents of the .ear files. jar tvf something.ear Or jar tvf something.jar If you are on a windows system you may use WinZip. I am not familiar with tar if you are on a ?inux system. If you find the offending files, you can update the archives with the new version. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Andrew English [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 22, 2006 8:42 AM To: Tomcat Users List Subject: RE: Java Question I have looked for the filenames.* on all the servers including the linux ones and not come up with anything except for what's on the two servers. I have not had a chance to check all the jar files, are ear files like jar files if so what's a good tool for opening both Jar and Ear files? Thanks Andrew -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 22, 2006 10:10 AM To: 'Tomcat Users List' Subject: RE: Java Question Are the pages static or is there some process, servlet, script, or something else that creates these? There could also be another system somewhere that is allowed access to the areas that hold the HTML files and is creating them in some nightly process. I don't know that this is a Java question. Almost anything is possible as long as the access rights and permissions are set. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Andrew English [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 22, 2006 8:12 AM To: Tomcat Users List Subject: Java Question Does anyone know of a mailing list were I can ask some java related questions? The number one question I have is if it's possible to write code within Java that changes all your HTML files back to their original default? A client of mine runs, dare I say it here JBoss 2.4 and I found two copies of JBoss running, one on their production server, the other on a Test server. Anyhow I had to go and make changes to the HTML files within the JBoss, removed the previous CTO's name, fixed spelling errors, removed some dates, etc. Anyhow initially without taking the Test server into account when I made changes to the HTML files, at around 12:38AM the files are modified back to their original state. So I searched all the servers HIGH and LOW for these files and only came across the Test server having them too.. So I put the modified copies on the Test server and the production server yesterday, now they are back to the original copies again.. BIGH SIGH I have looked through all the scheduled tasks and not found anything, my thought is it could be embedded somewhere in the Jave?? Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ordering apps startups
This one has been addressed several times before. The short answer is NO. Tomcat being multithreaded does not guarantee order of start or access of a page. It would be better to change your apps so that they are not dependent on each other's state or order of starting. Think more in terms of event driven application development rather than developing a single user GUI. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 10:36 AM To: users@tomcat.apache.org Subject: ordering apps startups Hi Folks. Is it possible to order apps startups. For example. I have app1, app2 and app3. I need that app3 starts up first of all. and app2 in second and so on. Is it possible ? Thanks in advance. Rogerio. -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.4/175 - Release Date: 18/11/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]