[Tomcat Wiki] Update of FAQ/Bugs by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs The comment on the change is: FAQ Migration - Issue 20 - GHOP Contest New page: == Bugs == === Preface === If you think you found a bug, [http://tomcat.apache.org/bugreport.html read this page]. === Questions === * '''I have a bug, what do I do?''' Unless you have the source code reference in Tomcat which is wrong, it may not be a bug. E-mail the [http://tomcat.apache.org/faq/tomcatuser.html user list] and confirm its a bug. Also [http://tomcat.apache.org/bugreport.html read this] first from the tomcat site about reporting a bug. * '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' There could be a good chance that the other servlet container could be implementing the spec wrong. * '''I submitted a bug, why is it ignored?''' Any of the following may affect someone acting on a bug: * Is it a bug? * Is your description good? * Is your description complete? * Can a developer '''easily''' reproduce the bug in their own environment? * Have you provided a patch? Is it against cvs? Using the correct file? Using cvs diff -u * Is your patch coded well? * Is your solution good? Some developers are uncomfortable submitting patches to code they are unfamiliar with. The committers are not experts in all areas of Tomcat. It may be that the developer who has the ability to adequately review the patch may be too busy or unable to review the bug. That is the bad news, the good news is Tomcat is Open Source and you can build and use your own release until the fix gets back into the official release. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs -- - == Bugs == - - === Preface === + == Preface == If you think you found a bug, [http://tomcat.apache.org/bugreport.html read this page]. - === Questions === + == Questions == * '''I have a bug, what do I do?''' Unless you have the source code reference in Tomcat which is wrong, it may not be a bug. E-mail the [http://tomcat.apache.org/faq/tomcatuser.html user list] and confirm its a bug. Also [http://tomcat.apache.org/bugreport.html read this] first from the tomcat site about reporting a bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found The comment on the change is: FAQ Migration - Issue 20 - GHOP Contest New page: == Class Not Found Issues == === Preface === This page discusses the various ways you see Class Not Found errors or very similar errors. It is strongly advised you read the following topics: * Classloader HOWTO pages: [http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html Tomcat 4.1], [http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html Tomcat 5.0], [http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Tomcat 5.5]. * [http://marc.theaimsgroup.com/?t=10431752924r=1w=2 Don't] [http://marc.theaimsgroup.com/?t=10438044013r=1w=2 use] [http://marc.theaimsgroup.com/?t=9694765692r=1w=2 packageless] [http://marc.theaimsgroup.com/?t=10449102012r=1w=2 classes] [http://marc.theaimsgroup.com/?t=10426557623r=1w=2 and] [http://marc.theaimsgroup.com/?t=10424974831r=1w=2 declare] [http://marc.theaimsgroup.com/?t=10299695013r=1w=2 all] [http://marc.theaimsgroup.com/?t=10292218941r=1w=2 imported classes]! * [http://marc.theaimsgroup.com/?l=tomcat-userm=103843452413727w=2 Another answer to a classloader issue] If you get a NoClassDefFoundError exception, the root cause might be the same as for a ClassNotFound exception. === Questions === * '''Why is jsp:useBean is not working?''' Make sure: * Your bean is packaged in a class. * You have fully qualified your class name (eg:com.bar.package.MyClass) OR * You have imported your class into your jsp (eg: %@ pageimport=com.bar.package.MyClass%) * '''Why do I get java.lang.NoClassDefFoundError: javax/servlet/Filter?''' You probably have servlet.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet.jar should only be found only once in $CATALINA_HOME/common/lib. * '''Why do I get java.lang.NoClassDefFoundError: org/xml/sax/InputSource?''' You have conflicting XML api jar files in your classpath. Read the README or RELEASE-NOTES for more information. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found -- - == Class Not Found Issues == + = Class Not Found Issues = - === Preface === + == Preface == This page discusses the various ways you see Class Not Found errors or very similar errors. It is strongly advised you read the following topics: - * Classloader HOWTO pages: [http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html Tomcat 4.1], [http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html Tomcat 5.0], [http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Tomcat 5.5]. + * Classloader HOWTO pages: [http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html Tomcat 4.1], [http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html Tomcat 5.0], [http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Tomcat 5.5]. - * [http://marc.theaimsgroup.com/?t=10431752924r=1w=2 Don't] [http://marc.theaimsgroup.com/?t=10438044013r=1w=2 use] [http://marc.theaimsgroup.com/?t=9694765692r=1w=2 packageless] [http://marc.theaimsgroup.com/?t=10449102012r=1w=2 classes] [http://marc.theaimsgroup.com/?t=10426557623r=1w=2 and] [http://marc.theaimsgroup.com/?t=10424974831r=1w=2 declare] [http://marc.theaimsgroup.com/?t=10299695013r=1w=2 all] [http://marc.theaimsgroup.com/?t=10292218941r=1w=2 imported classes]! + * [http://marc.theaimsgroup.com/?t=10431752924r=1w=2 Don't] [http://marc.theaimsgroup.com/?t=10438044013r=1w=2 use] [http://marc.theaimsgroup.com/?t=9694765692r=1w=2 packageless] [http://marc.theaimsgroup.com/?t=10449102012r=1w=2 classes] [http://marc.theaimsgroup.com/?t=10426557623r=1w=2 and] [http://marc.theaimsgroup.com/?t=10424974831r=1w=2 declare] [http://marc.theaimsgroup.com/?t=10299695013r=1w=2 all] [http://marc.theaimsgroup.com/?t=10292218941r=1w=2 imported classes]! - * [http://marc.theaimsgroup.com/?l=tomcat-userm=103843452413727w=2 Another answer to a classloader issue] + * [http://marc.theaimsgroup.com/?l=tomcat-userm=103843452413727w=2 Another answer to a classloader issue] - If you get a NoClassDefFoundError exception, the root cause might be the same as for a ClassNotFound exception. + If you get a '''NoClassDefFoundError''' exception, the root cause might be the same as for a '''ClassNotFound''' exception. - === Questions === + == Questions == - * '''Why is jsp:useBean is not working?''' + '''Why is jsp:useBean is not working?''' - Make sure: - * Your bean is packaged in a class. + * Your bean is packaged in a class. - * You have fully qualified your class name (eg:com.bar.package.MyClass) OR + * You have fully qualified your class name (eg:com.bar.package.MyClass) OR - * You have imported your class into your jsp (eg: %@ pageimport=com.bar.package.MyClass%) + * You have imported your class into your jsp (eg: %@ pageimport=com.bar.package.MyClass%) - * '''Why do I get java.lang.NoClassDefFoundError: javax/servlet/Filter?''' + ''' Why do I get java.lang.NoClassDefFoundError: javax/servlet/Filter? ''' You probably have servlet.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet.jar should only be found only once in $CATALINA_HOME/common/lib. - * '''Why do I get java.lang.NoClassDefFoundError: org/xml/sax/InputSource?''' + ''' Why do I get java.lang.NoClassDefFoundError: org/xml/sax/InputSource? ''' - You have conflicting XML api jar files in your classpath. Read the README or RELEASE-NOTES for more information. + You have conflicting XML api jar files in your classpath. Read the README or RELEASE-NOTES for more information. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found -- == Questions == '''Why is jsp:useBean is not working?''' + Make sure: * Your bean is packaged in a class. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ The comment on the change is: FAQ Migration - Issue 20 - GHOP Contest New page: == Preface == Welcome to the Tomcat FAQ. In conjunction with this FAQ we strongly emphasis doing the following: * Read the docs. Most answers are already documented. * Know the [http://java.sun.com/products/servlet/ Servlet] and [http://java.sun.com/products/jsp/ JSP] specification. Many answers are not documented by the Tomcat team since they are generic and already defined by the specs. Know the specs, they let you ensure your webapps are portable across different servlet containers. * Please do some research. Use a search engine. It is frustrating to see questions which can be answered with a simple Google search (or your favorite search engine). * Browse or search our [http://tomcat.apache.org/lists.html mailing lists]. == Table of Contents == For your convenience, we have tried to break the FAQ out into multiple sections consisting of the following topics: * Bugs - You think you have a bug or there is a difference in behavior with another servlet container. * Class Not Found - What to do with Class Not Found errors. * Connectors - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * Database - Getting tomcat to talk to a database. * Deployment - Questions related to web application deployment. * How To - Miscellaneous common how to's. * FDA Validation - Questions related to running Tomcat in an FDA validated environment. * Linux / Unix - Common questions for Linux / Unix related platforms. * Other Operating Systems - Information about scripts and support for other operating systems. * Logging - Common questions related to logging in Tomcat. * Memory - Common memory related questions. * Meta - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. * Monitoring Performance - Monitoring and Performance questions. * Other Resources - A lot of links to tomcat related documentation and experiences. * Security - Common security issues. * Version - About the different tomcat versions. * Tomcat User - More information about the tomcat-user list. * Windows - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- For your convenience, we have tried to break the FAQ out into multiple sections consisting of the following topics: - * Bugs - You think you have a bug or there is a difference in behavior with another servlet container. + * [http://wiki.apache.org/tomcat/FAQ/Bugs Bugs] - You think you have a bug or there is a difference in behavior with another servlet container. - * Class Not Found - What to do with Class Not Found errors. + * [http://wiki.apache.org/tomcat/FAQ/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. * Connectors - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * Database - Getting tomcat to talk to a database. * Deployment - Questions related to web application deployment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * Connectors - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * Database - Getting tomcat to talk to a database. * Deployment - Questions related to web application deployment. - * How To - Miscellaneous common how to's. + * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. * FDA Validation - Questions related to running Tomcat in an FDA validated environment. * Linux / Unix - Common questions for Linux / Unix related platforms. * Other Operating Systems - Information about scripts and support for other operating systems. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs -- == Questions == - * '''I have a bug, what do I do?''' + ''I have a bug, what do I do?''' Unless you have the source code reference in Tomcat which is wrong, it may not be a bug. E-mail the [http://tomcat.apache.org/faq/tomcatuser.html user list] and confirm its a bug. Also [http://tomcat.apache.org/bugreport.html read this] first from the tomcat site about reporting a bug. - * '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' + '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' There could be a good chance that the other servlet container could be implementing the spec wrong. - * '''I submitted a bug, why is it ignored?''' + '''I submitted a bug, why is it ignored?''' Any of the following may affect someone acting on a bug: * Is it a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs -- == Questions == - ''I have a bug, what do I do?''' + '''I have a bug, what do I do?''' Unless you have the source code reference in Tomcat which is wrong, it may not be a bug. E-mail the [http://tomcat.apache.org/faq/tomcatuser.html user list] and confirm its a bug. Also [http://tomcat.apache.org/bugreport.html read this] first from the tomcat site about reporting a bug. - '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' + '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' There could be a good chance that the other servlet container could be implementing the spec wrong. - '''I submitted a bug, why is it ignored?''' + '''I submitted a bug, why is it ignored?''' Any of the following may affect someone acting on a bug: * Is it a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Deployment by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Deployment New page: == Preface == This section of the FAQ discusses common questions related to web application deployment. == Questions == '''Why does tomcat 5 create context configuration files?''' Unlike tomcat 4.x, tomcat 5.x creates context configuration files for you in its conf/[Engine name]/[Host name] directory. This is part of the change in tomcat's configuration mechanism from version 4.x to make overall configuration more robust, flexible, and enterprise-friendly. Note, however, that this has changed the recommended deployment practices for web applications. These context configuration files are created by tomcat, but not removed by tomcat, because the user may have changed them or other files in the conf directory. The suggested practice for tomcat 5 is to place context configuration files in the META-INF/context.xml directory of your webapp, and use Tomcat's Manager webapp to deploy/undeploy your applications. More details can be found here: MARC Archive ''' Why does the memory usage increase when I redeploy a web application?''' Because the Classloader (and the Class objects it loaded) cannot be recycled. They are stored in the permanent heap generation by the JVM, and when you redepoy a new class loader is created, which loads another copy of all these classes. This can cause OufOfMemoryErrors eventually. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs -- == Questions == '''I have a bug, what do I do?''' + Unless you have the source code reference in Tomcat which is wrong, it may not be a bug. E-mail the [http://tomcat.apache.org/faq/tomcatuser.html user list] and confirm its a bug. Also [http://tomcat.apache.org/bugreport.html read this] first from the tomcat site about reporting a bug. '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' + There could be a good chance that the other servlet container could be implementing the spec wrong. '''I submitted a bug, why is it ignored?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Deployment by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Deployment -- == Preface == This section of the FAQ discusses common questions related to web application deployment. - == Questions == '''Why does tomcat 5 create context configuration files?''' - Unlike tomcat 4.x, tomcat 5.x creates context configuration files for you in its conf/[Engine name]/[Host name] directory. This is part of the change in tomcat's configuration mechanism from version 4.x to make overall configuration more robust, flexible, and enterprise-friendly. Note, however, that this has changed the recommended deployment practices for web applications. These context configuration files are created by tomcat, but not removed by tomcat, because the user may have changed them or other files in the conf directory. The suggested practice for tomcat 5 is to place context configuration files in the META-INF/context.xml directory of your webapp, and use Tomcat's Manager webapp to deploy/undeploy your applications. More details can be found here: MARC Archive + Unlike tomcat 4.x, tomcat 5.x creates context configuration files for you in its conf/[Engine name]/[Host name] directory. This is part of the change in tomcat's configuration mechanism from version 4.x to make overall configuration more robust, flexible, and enterprise-friendly. Note, however, that this has changed the recommended deployment practices for web applications. These context configuration files are created by tomcat, but not removed by tomcat, because the user may have changed them or other files in the conf directory. The suggested practice for tomcat 5 is to place context configuration files in the META-INF/context.xml directory of your webapp, and use Tomcat's Manager webapp to deploy/undeploy your applications. More details can be found here: [http://marc.theaimsgroup.com/?l=tomcat-userm=107590945807699w=2 MARC Archive] ''' Why does the memory usage increase when I redeploy a web application?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. * Connectors - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * Database - Getting tomcat to talk to a database. - * Deployment - Questions related to web application deployment. + * [http://wiki.apache.org/tomcat/FAQ/Deployment Deployment] - Questions related to web application deployment. * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. * FDA Validation - Questions related to running Tomcat in an FDA validated environment. * Linux / Unix - Common questions for Linux / Unix related platforms. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * Monitoring Performance - Monitoring and Performance questions. * Other Resources - A lot of links to tomcat related documentation and experiences. * Security - Common security issues. - * Version - About the different tomcat versions. + * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. * Tomcat User - More information about the tomcat-user list. * Windows - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Other Operating Systems by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems New page: == Preface == This section of the FAQ deals with running Tomcat on platforms not supported by the built-in startup/shutdown scripts. These include OS/2, z/OS, OpenVMS-Alpha, and others. == Questions == Where are the scripts for my operating system? * OS/2: * [http://hobbes.nmsu.edu/cgi-bin/h-search?key=tomcat_5-0-27_os2.zip NMSU.edu] * [http://www.netbeans.org/issues/show_bug.cgi?id=42678 NetBeans.org] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=30394 EComStation] * z/OS: * [http://jzos.com/ JZOS] * GNU/Linux: * [http://issues.apache.org/bugzilla/show_bug.cgi?id=31447 From [EMAIL PROTECTED] * OpenVMS-Alpha: * [http://issues.apache.org/bugzilla/show_bug.cgi?id=31499 Hewlett Packard ([EMAIL PROTECTED])] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. * FDA Validation - Questions related to running Tomcat in an FDA validated environment. * Linux / Unix - Common questions for Linux / Unix related platforms. - * Other Operating Systems - Information about scripts and support for other operating systems. + * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. * Logging - Common questions related to logging in Tomcat. * Memory - Common memory related questions. * Meta - About Tomcat and this FAQ. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Other Operating Systems by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems -- Where are the scripts for my operating system? - * OS/2: + * OS/2: - * [http://hobbes.nmsu.edu/cgi-bin/h-search?key=tomcat_5-0-27_os2.zip NMSU.edu] +* [http://hobbes.nmsu.edu/cgi-bin/h-search?key=tomcat_5-0-27_os2.zip NMSU.edu] - * [http://www.netbeans.org/issues/show_bug.cgi?id=42678 NetBeans.org] +* [http://www.netbeans.org/issues/show_bug.cgi?id=42678 NetBeans.org] - * [http://issues.apache.org/bugzilla/show_bug.cgi?id=30394 EComStation] +* [http://issues.apache.org/bugzilla/show_bug.cgi?id=30394 EComStation] - * z/OS: + * z/OS: - * [http://jzos.com/ JZOS] +* [http://jzos.com/ JZOS] - * GNU/Linux: + * GNU/Linux: - * [http://issues.apache.org/bugzilla/show_bug.cgi?id=31447 From [EMAIL PROTECTED] +* [http://issues.apache.org/bugzilla/show_bug.cgi?id=31447 From [EMAIL PROTECTED] - * OpenVMS-Alpha: + * OpenVMS-Alpha: - * [http://issues.apache.org/bugzilla/show_bug.cgi?id=31499 Hewlett Packard ([EMAIL PROTECTED])] +* [http://issues.apache.org/bugzilla/show_bug.cgi?id=31499 Hewlett Packard ([EMAIL PROTECTED])] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Security by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Security New page: == Preface == This FAQ section provides help with some security-related issues. If you hear of a vulnerability or its exploitation, please let us know on the [mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] mailing list. === The Record === Tomcat's security record is impeccable. There have been no public cases of damage done to a company, organization, or individual due to a Tomcat security issue. There have been no documented cases of data loss or application crashes caused by an intruder. While there have been numerous analyses conducted on Tomcat, partially because this is easy to do with Tomcat's source code openly available, there have been only a few '''theoretical''' vulnerabilities found. All of those were addressed rapidly even though there were no documented cases of actual exploitation of these vulnerabilities. === Role of Customization === We believe, and the evidence suggests, that Tomcat is more than secure enough for most use-cases. However, like all other components of Tomcat, you can customize any and all of the relevant parts of the server to achieve even higher security. For example, the session manager implementation is pluggable, and even the default implementation has support for pluggable random number generators. If you have a special need that you feel is not met by Tomcat out of the box, consider these customization options. At the same time, please bring up your requirements on the user mailing list, where we'll be glad to discuss it and assist in your approach/design/implementation as needed. == Questions == '''How do I use OpenSSL to set up my own Certificate Authority (CA)?''' [http://marc.theaimsgroup.com/?l=tomcat-userm=106293430225790w=2 Using OpenSSL to set up your own CA]. '''OH NO! PORT 8005 is available for anyone on localhost to shutdown my tomcat!''' See these 2 discussions. * [http://marc.theaimsgroup.com/?t=10439665323r=1w=2 Possible to switch off tcp/ip server shutdown?] * [http://marc.theaimsgroup.com/?t=10312664325r=1w=2 Tomcat shutdown security] '''What about Tomcat running as root?''' See these threads: * [http://marc.theaimsgroup.com/?t=10451603873r=1w=2 Tomcat as root and security issues] ''' How to I force all my pages to run under HTTPS?''' [http://marc.theaimsgroup.com/?l=tomcat-userm=104951559722619w=2 Use security-constraint in web.xml]. ''' What is the default login for the manager and admin app?''' The admin and manager application do not provide a default login. Doing so is a security flaw. You need to edit $CATALINA_HOME/conf/tomcat-users.xml if you are using the default install. [http://tomcat.apache.org/tomcat-4.1-doc/manager-howto.html#Configuring%20Manager%20Application%20Access Configuring Manager Application Access] ''' How do I restrict access by ip address or remote host?''' By using the RemoteHostValve or RemoteAddrValve. Warning, these valves rely on accurate incoming ip addresses or hostnames. So they can fall victim to spoofing! [http://tomcat.apache.org/tomcat-4.1-doc/config/valve.html Valve Reference Link] '''How do I use jsvc/procrun to run Tomcat on port 80 securely?''' Fairly easily ;) See the Setup page in the docs for your tomcat release, and read [http://marc.theaimsgroup.com/?l=tomcat-userm=108566020231438w=2 this mailing list post] for a complete setup example with permissions etc. ''' Has Tomcat's security been independently analyzed or audited?''' Yes, by numerous organizations and individuals, many times. Try [http://www.google.com/search?sourceid=navclientie=UTF-8q=is+tomcat+secure this Google search] and you'll see many references, guides, and analyses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Deployment by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Deployment -- == Preface == This section of the FAQ discusses common questions related to web application deployment. == Questions == - '''Why does tomcat 5 create context configuration files?''' Unlike tomcat 4.x, tomcat 5.x creates context configuration files for you in its conf/[Engine name]/[Host name] directory. This is part of the change in tomcat's configuration mechanism from version 4.x to make overall configuration more robust, flexible, and enterprise-friendly. Note, however, that this has changed the recommended deployment practices for web applications. These context configuration files are created by tomcat, but not removed by tomcat, because the user may have changed them or other files in the conf directory. The suggested practice for tomcat 5 is to place context configuration files in the META-INF/context.xml directory of your webapp, and use Tomcat's Manager webapp to deploy/undeploy your applications. More details can be found here: [http://marc.theaimsgroup.com/?l=tomcat-userm=107590945807699w=2 MARC Archive] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * Miscellaneous - Miscellaneous questions that weren't categorized. * Monitoring Performance - Monitoring and Performance questions. * Other Resources - A lot of links to tomcat related documentation and experiences. - * Security - Common security issues. + * [http://wiki.apache.org/tomcat/Security Security] - Common security issues. * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. * Tomcat User - More information about the tomcat-user list. * Windows - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * Other Resources - A lot of links to tomcat related documentation and experiences. * [http://wiki.apache.org/tomcat/Security Security] - Common security issues. * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. - * Tomcat User - More information about the tomcat-user list. + * [http://wiki.apache.org/tomcat/Tomcat_User Tomcat User] - More information about the tomcat-user list. * Windows - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Tomcat User by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Tomcat_User New page: == Preface == The Tomcat user mailing list is for all your questions about how to use Tomcat. It is a high volume list! For those who can't handle that kind of traffic, you can also get it in digest form. If you post to tomcat-user, use good etiquette, ask good questions, and use Best Practices, and also please read the docs, faqs, readme, and search the archives before asking a question. Here are some links about how to use mailing lists and standard etiquette in using mailing lists. These links are not Tomcat specific! Please do not contact the author of these documents with questions. * [http://www.rfc-editor.org/rfc/rfc1855.txt Netiquette Guidelines (RFC 1855)] * [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way] == Questions == '''How do I subscribe?''' See the [http://tomcat.apache.org/lists.html mailing list page]. If you are unable to subscribe, it could be due to your e-mail system mangling your e-mail addres. If you send an e-mail to the list owner to subscribe you to the list, be prepared to wait until the owner has an opportunity to add you to the list. ''' Why won't people answer my question?''' It could be one of any of the following answers: * No one knows the answer. * Everyone is ignoring you. * The person who knows the answer hasn't gotten around to it yet. * The person who knows the answer hasn't gotten around to it yet. (So please don't post the same question multiple times) In other words - you get what you pay for. If you phrase you question intelligently and not make your question annoying, your quality of support will probably better than any commercial help support. In particular, some readers on the tomcat-user list have been known to automatically ignore a message which meets any of the following criteria: (You have been warned) * help in the subject line (we know you need help by writing in the first place) * plz or please in the subject line. We already know you need help. * ALL CAPS IN THE SUBJECT LINE. (Sorry for anyone emailing from a mainframe) * Do not place !! (more than 2!) in the subject line. The number of exclamation points has no relation to anyone's interest in answering the question. In fact - it has a higher chance at being ignored. * Your e-mail has a return receipt. You don't need to know I got the message. * Select posters who have consistently displayed no desire to research before posting a question. '''How do I unsubscribe?''' See the [http://tomcat.apache.org/lists.html mailing list page]. If you are unable to unsubscribe, it could be due to your e-mail system mangling your e-mail address or you have subscribed under an alias. In that case, maybe [http://marc.theaimsgroup.com/?l=tomcat-userm=104190907020995w=2 this thread] will help. If you send an e-mail to the list owner to remove you from the list, be prepared to continue receiving more e-mails from the lists until the owner has an opportunity to remove you from the list. '''Should I post to users or dev?''' tomcat-user is for user based questions for tomcat. That means anyone who is developing any type of software to be used with tomcat. tomcat-dev is the forum to discuss changes to the Tomcat's source code. If your question is not related to changing the source code as maintained by the tomcat committers, then it does not belong here, it belongs on the users list. If you wish to extend tomcat using your own Valve, Realm, or anything else ... those discussions belong in tomcat-user. You might be using Tomcat's internal API but unless your changes are going back into the official source tree, the question belongs on the user list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Connectors by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Connectors New page: == Preface == Please see the [http://wiki.apache.org/tomcat/UsefulLinks Other Resources Link] for other pages describing how they were able to link Tomcat with a connector. With luck, someone documented their experience in an environment which is similar to yours. Here is a link to the [http://tomcat.apache.org/connectors-doc/ JK Connectors]. It contains more configuration and installation information. '''Please note, jk2 is no longer supported. Please use mod_jk instead.''' == Questions == '''What is JK (or AJP)?''' AJP is a wire protocol. It an optimized version of the HTTP protocol to allow a standalone web server such as Apache talk to Tomcat. Historically, Apache has always been much faster than Tomcat at serving static content. The idea is to let Apache serve the static content when possible, then proxy the request back to Tomcat for Tomcat related content. '''Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?''' * Stay away from mod_webapp, aka warp. It is deprecated and unsupported due to lack of developer interest and there are better options such as jk and jk2. It WILL NOT run on windows. * mod_jserv is unsupported and will not be supported in Tomcat 5. mod_jserv was the original connector which supported the ajp protocol. * jk2 is a refactoring of mod_jk and uses the Apache Portable Runtime (apr). But due to lack of developer interest, it is unsupported. The alternative is mod_jk or mod_proxy_ajp. * '''mod_jk is great and should be used for production'''. It is still under active development and also works for the apache 2.X series for cases where you do not want to use mod_proxy_ajp. * mod_proxy. A cheap way to proxy without the hassles of configuring JK. This solution lacks sticky session load balancing. If you don't need some of the features of jk - this is a very simple alternative. * mod_proxy_ajp. With apache 2.2, mod_proxy was rewritten to support load balancing as well as a new transport called mod_proxy_ajp. This module is distributed with the Apache http server, not the Tomcat server. '''Why should I integrate Apache with Tomcat? (or not)''' There are many reasons to integrate Tomcat with Apache. And there are reasons why it should not be done too. Needless to say, everyone will disagree with the opinions here. With the performance of Tomcat 5 and 6, performance reasons become harder to justify. So here are the issues to discuss in integrating vs not. * Clustering. By using Apache as a front end you can let Apache act as a front door to your content to multiple Tomcat instances. If one of your Tomcats fails, Apache ignores it and your Sysadmin can sleep through the night. This point could be ignored if you use a hardware loadbalancer and Tomcat's clustering capabilities. * Clustering/Security. You can also use Apache as a front door to different Tomcats for different URL namespaces (/app1/, /app2/, /app3/, or virtual hosts). The Tomcats can then be each in a protected area and from a security point of view, you only need to worry about the Apache server. Essentially, Apache becomes a smart proxy server. * Security. This topic can sway one either way. Java has the security manager while Apache has a larger mindshare and more tricks with respect to security. I won't go into this in more detail, but let Google be your friend. Depending on your scenario, one might be better than the other. But also keep in mind, if you run Apache with Tomcat - you have two systems to defend, not one. * Add-ons. Adding on CGI, perl, PHP is very natural to Apache. Its slower and more of a kludge for Tomcat. Apache also has hundreds of modules that can be plugged in at will. Tomcat can have this ability, but the code hasn't been written yet. * Decorators! With Apache in front of Tomcat, you can perform any number of decorators that Tomcat doesn't support or doesn't have the immediate code support. For example, mod_headers, mod_rewrite, and mod_alias could be written for Tomcat, but why reinvent the wheel when Apache has done it so well? * Speed. Apache is faster at serving static content than Tomcat. But unless you have a high traffic site, this point is useless. But in some scenarios, tomcat can be faster than apache. So benchmark YOUR site. * Socket handling/system stability. Apache has better socket handling with respect to error conditions than Tomcat. The main reason is Tomcat must perform all its socket handling via the JVM which needs to be cross platform. The problem is socket optimization is a platform specific ordeal. Most of the time the java code is fine, but when you are also bombarded with dropped connections, invalid packets, invalid requests from invalid IP's, Apache does a better job at
[Tomcat Wiki] Update of FAQ/Unix Linux by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Unix_Linux New page: == Preface == == Questions == '''When I run ps (on Linux), why do I see my java process a bazillion times!''' Linux implemented threads as processes. Due to other gory details that is beyond the scope of this FAQ - the ps command doesn't work correctly with respect to threads. You can get more gory details [http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html here] and [http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html#D here] . '''How do I run without an X server and still get graphics?''' You either need to run headless or run an alternate X-server. Some more information can be found [http://marc.theaimsgroup.com/?t=10480304763r=1w=2 here], [http://marc.theaimsgroup.com/?l=tomcat-userm=102335321103262w=2 here], or [http://marc.theaimsgroup.com/?l=tomcat-userm=101614645312259w=2 here]. Or if your are using a JVM 1.4 or better, you can use the system property {{{java.awt.headless=true}}} '''Tomcat dies after I log out!''' This is common complaint in Solaris. Make sure you use nohup and see [http://marc.theaimsgroup.com/?l=tomcat-userm=104809785114238w=2 this thread] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Unix Linux by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Unix_Linux -- '''Tomcat dies after I log out!''' - This is common complaint in Solaris. Make sure you use nohup and see [http://marc.theaimsgroup.com/?l=tomcat-userm=104809785114238w=2 this thread] + This is common complaint in Solaris. Make sure you use {{{nohup}}} and see [http://marc.theaimsgroup.com/?l=tomcat-userm=104809785114238w=2 this thread] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Bugs Bugs] - You think you have a bug or there is a difference in behavior with another servlet container. * [http://wiki.apache.org/tomcat/FAQ/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. * [http://wiki.apache.org/tomcat/FAQ/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. - * Database - Getting tomcat to talk to a database. + * [http://wiki.apache.org/tomcat/FAQ/Database Database] - Getting tomcat to talk to a database. * [http://wiki.apache.org/tomcat/FAQ/Deployment Deployment] - Questions related to web application deployment. * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. * FDA Validation - Questions related to running Tomcat in an FDA validated environment. - * Linux / Unix - Common questions for Linux / Unix related platforms. + * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. * Logging - Common questions related to logging in Tomcat. * Memory - Common memory related questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Database by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Database New page: == Preface == This page is to discuss database error and DBCP. Until more content can appear here, here are some links to the mail archives to perform some searches: * [http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=databaseq=b database] * [http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=datasourceq=b datasource] * [http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=oracleq=b oracle] * [http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=mysqlq=b mysql] * [http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=dbpoolq=b dbpool] Other Links of interest: * [http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html JNDI Datasource HOW-TO] Other notes: * '''Do not use JDBC-ODBC bridge''' bundled with Sun's JDK with Tomcat. It was never meant for a production server environment. If you ask a question about it, everyone will tell you to not use it. If you do need to use ODBC, there are 3rd party drivers which do a pretty good job at being thread safe. * If you use the oracle thin driver, be sure to rename it to a jar file from a zip file. Tomcat only auto-magically loads files ending in .jar placed in a lib directory. It ignores all other file extensions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found -- * [http://marc.theaimsgroup.com/?t=10431752924r=1w=2 Don't] [http://marc.theaimsgroup.com/?t=10438044013r=1w=2 use] [http://marc.theaimsgroup.com/?t=9694765692r=1w=2 packageless] [http://marc.theaimsgroup.com/?t=10449102012r=1w=2 classes] [http://marc.theaimsgroup.com/?t=10426557623r=1w=2 and] [http://marc.theaimsgroup.com/?t=10424974831r=1w=2 declare] [http://marc.theaimsgroup.com/?t=10299695013r=1w=2 all] [http://marc.theaimsgroup.com/?t=10292218941r=1w=2 imported classes]! * [http://marc.theaimsgroup.com/?l=tomcat-userm=103843452413727w=2 Another answer to a classloader issue] - If you get a '''NoClassDefFoundError''' exception, the root cause might be the same as for a '''ClassNotFound''' exception. + If you get a {{{NoClassDefFoundError}}} exception, the root cause might be the same as for a {{{ClassNotFound}}} exception. == Questions == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found -- == Questions == - '''Why is jsp:useBean is not working?''' + '''Why is {{{ jsp:useBean }}} is not working?''' Make sure: * Your bean is packaged in a class. - * You have fully qualified your class name (eg:com.bar.package.MyClass) OR + * You have fully qualified your class name (eg:{{{ com.bar.package.MyClass }}}) OR - * You have imported your class into your jsp (eg: %@ pageimport=com.bar.package.MyClass%) + * You have imported your class into your jsp (eg: {{{ %@ pageimport=com.bar.package.MyClass% }}}) - ''' Why do I get java.lang.NoClassDefFoundError: javax/servlet/Filter? ''' + ''' Why do I get {{{ java.lang.NoClassDefFoundError: javax/servlet/Filter? }}}''' You probably have servlet.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet.jar should only be found only once in $CATALINA_HOME/common/lib. - ''' Why do I get java.lang.NoClassDefFoundError: org/xml/sax/InputSource? ''' + ''' Why do I get {{{ java.lang.NoClassDefFoundError: org/xml/sax/InputSource }}}? ''' You have conflicting XML api jar files in your classpath. Read the README or RELEASE-NOTES for more information. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found -- * You have fully qualified your class name (eg:{{{ com.bar.package.MyClass }}}) OR * You have imported your class into your jsp (eg: {{{ %@ pageimport=com.bar.package.MyClass% }}}) - ''' Why do I get {{{ java.lang.NoClassDefFoundError: javax/servlet/Filter? }}}''' + ''' Why do I get {{{ java.lang.NoClassDefFoundError: javax/servlet/Filter}}}?''' You probably have servlet.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet.jar should only be found only once in $CATALINA_HOME/common/lib. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Bugs Bugs] - You think you have a bug or there is a difference in behavior with another servlet container. * [http://wiki.apache.org/tomcat/FAQ/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. - * Connectors - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. + * [http://wiki.apache.org/tomcat/FAQ/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * Database - Getting tomcat to talk to a database. * [http://wiki.apache.org/tomcat/FAQ/Deployment Deployment] - Questions related to web application deployment. * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. * Logging - Common questions related to logging in Tomcat. - * Memory - Common memory related questions. + * [[http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. * Meta - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. * Monitoring Performance - Monitoring and Performance questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs/Memory by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs/Memory -- First look at {{{java -X}}} to determine what parameters to set. Then you can set them via the environment variable {{{JAVA_OPTS}}}. Read the files catalina.bat or catalina.sh for more information on JAVA_OPTS. - '''Why do I get OutOfMemoryError errors?''' + '''Why do I get {{{OutOfMemoryError}}} errors?''' Many reasons. * You're out of memory. Simple as that - add more to your heap. * You're out of memory. You have code which is hanging onto object references and the garbage collector can't do its job. Get a profiler to debug this one. - * You ran out of file descriptors. If you are on a *nix system, it has been observed that an OutOfMemoryError can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The {{{ulimit}}} program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. + * You ran out of file descriptors. If you are on a *nix system, it has been observed that an {{{OutOfMemoryError}}} can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The {{{ulimit}}} program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. * You have too many threads running. Some OS's have a limit to the number of threads which may be executed by a single process. (Which is what the JVM is.) Refer to your OS docs for more information on how to raise this threshold. * If you have a lot of servlets or JSP's, you may need to increase your permanent generation. By default, it is 64MB. Doubling it to be {{{-XX:MaxPermSize=256m}}} might be a good start. * Your OS limits the amount of memory your process may take. OK, this one is grasping at straws. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Windows by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Windows New page: == Preface == The will address various windows issues. Please see the [http://wiki.apache.org/tomcat/UsefulLinks Other Resources Link] for more links related to Windows. == Questions == '''Why do I get Out of Environment Space?''' Check the Tomcat README, and [http://marc.theaimsgroup.com/?l=tomcat-userm=103918210305702w=2 this link] ''' When I start up tomcat (or when it is running), I get the error {{{java.lang.IllegalMonitorStateException: current thread not owner}}}''' That is weird - but solved.(?) See the [http://issues.apache.org/bugzilla/show_bug.cgi?id=13723 Tomcat Bug Report] and [http://developer.java.sun.com/developer/bugParade/bugs/4776385.html Sun Bug Parade report] for the answer. '''Can I turn off case sensitivity?''' [http://tomcat.apache.org/tomcat-4.1-doc/config/resources.html Yes] '''Can I use NTLM authentication?''' With help from the Samba folks, [http://jcifs.samba.org/src/docs/ntlmhttpauth.html it is possible]. '''I want to redeploy web applications, how do I prevent resources from getting locked?''' Most locking issues will occur with JARs from /WEB-INF/lib, and are useally caused by access through URLs. Tomcat has mechanisms to allow avoiding locking. In Tomcat 5.0, a mechanism exists to prevent locking when accessing resources using the getResource method of the URL classloader (many applications, such as Xerces, do not set the use of caching to false before opening the URL connection, causing locking). If such a call occurs, resources inside the JARs will be extracted to the work directory of the web application. In Tomcat 5.5, this mechanism is disabled by default (as it has a non negligible influence on startup times, and is often useless), and can be enabled using the antiJARLocking attribute of the Context element. There is another lock prevention mechanism in Tomcat 5.5 (antiResourceLocking attribute), which will cause the web application files to be copied to the temp folder and run from this location. This has a larger impact on web application startup times, b ut obviously prevents locking on all resources of the web application. This also allows more flexible management operations as none of the web application resources will be locked, even while the web application is running (as a special note, when making changes JSPs without reloading the application, the changes has to be duplicated to the path where the web application resources have been copied in the temp folder). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs/Memory by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs/Memory -- * You're out of memory. Simple as that - add more to your heap. * You're out of memory. You have code which is hanging onto object references and the garbage collector can't do its job. Get a profiler to debug this one. - * You ran out of file descriptors. If you are on a *nix system, it has been observed that an OutOfMemoryError can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The ulimit program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. + * You ran out of file descriptors. If you are on a *nix system, it has been observed that an OutOfMemoryError can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The {{{ulimit}}} program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. * You have too many threads running. Some OS's have a limit to the number of threads which may be executed by a single process. (Which is what the JVM is.) Refer to your OS docs for more information on how to raise this threshold. * If you have a lot of servlets or JSP's, you may need to increase your permanent generation. By default, it is 64MB. Doubling it to be {{{-XX:MaxPermSize=256m}}} might be a good start. * Your OS limits the amount of memory your process may take. OK, this one is grasping at straws. * The JVM has a bug. This has been known to happen with JVM1.2.? and using EJB's with another servlet engine. * Not actually a reason - but on your particular platform, look at the {{{java -X}}} options. They may be VERY helpful. - * Your classloaders are not being garbage collected. + * [http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 Your classloaders are not being garbage collected]. '''How much memory is Tomcat/webapp/??? using?''' - * To find out how much memory Tomcat is using, you might be able to use the Runtime class provided by the JDK. + * To find out how much memory Tomcat is using, you might be able to use the {{{Runtime}}} class provided by the JDK. * You can't find out how much memory a webapp is using. The JVM doesn't give us these detail. * You can't find out how much memory a ??? is using. The JVM doesn't give us these detail. * That being said, a memory profiling tool might prove the above statements wrong - but you probably don't want to use them in a production environment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs/Memory by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs/Memory New page: == Preface == This page discusses various memory issues. In a nutshell - if your computer has less than 128MB of ram - you will probably have trouble. Anyhow, also read the following threads for other memory related issues: * [http://marc.theaimsgroup.com/?t=10438897306r=1w=2 java.lang.OutOfMemoryError during deploy] * [http://marc.theaimsgroup.com/?t=10437834777r=1w=2 Memory requirements] * [http://marc.theaimsgroup.com/?t=10433306644r=1w=2 Memory Mgmt Tomcat] * [http://marc.theaimsgroup.com/?t=10301137976r=1w=2 Tomcat Out of memory] * [http://marc.theaimsgroup.com/?t=10451996172r=1w=2 Tracking memory usage over time] Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], or [http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them. === JSP Recompilation === If your application uses JSPs which are frequently recompiled at runtime, e.g. headers that change value hourly, please make sure to read the JSP HOW-TO page and RELEASE NOTES documents. You may wish to tune the JSP compiler configuration to prevent memory leaks. Of course, these are documents you should have read by now anyways.. == Questions == '''How do I adjust memory settings?''' First look at {{{java -X}}} to determine what parameters to set. Then you can set them via the environment variable {{{JAVA_OPTS}}}. Read the files catalina.bat or catalina.sh for more information on JAVA_OPTS. '''Why do I get OutOfMemoryError errors?''' Many reasons. * You're out of memory. Simple as that - add more to your heap. * You're out of memory. You have code which is hanging onto object references and the garbage collector can't do its job. Get a profiler to debug this one. * You ran out of file descriptors. If you are on a *nix system, it has been observed that an OutOfMemoryError can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The ulimit program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. * You have too many threads running. Some OS's have a limit to the number of threads which may be executed by a single process. (Which is what the JVM is.) Refer to your OS docs for more information on how to raise this threshold. * If you have a lot of servlets or JSP's, you may need to increase your permanent generation. By default, it is 64MB. Doubling it to be {{{-XX:MaxPermSize=256m}}} might be a good start. * Your OS limits the amount of memory your process may take. OK, this one is grasping at straws. * The JVM has a bug. This has been known to happen with JVM1.2.? and using EJB's with another servlet engine. * Not actually a reason - but on your particular platform, look at the {{{java -X}}} options. They may be VERY helpful. * Your classloaders are not being garbage collected. '''How much memory is Tomcat/webapp/??? using?''' * To find out how much memory Tomcat is using, you might be able to use the Runtime class provided by the JDK. * You can't find out how much memory a webapp is using. The JVM doesn't give us these detail. * You can't find out how much memory a ??? is using. The JVM doesn't give us these detail. * That being said, a memory profiling tool might prove the above statements wrong - but you probably don't want to use them in a production environment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- - == Preface == - Welcome to the Tomcat FAQ. In conjunction with this FAQ we strongly emphasis doing the following: * Read the docs. Most answers are already documented. @@ -31, +29 @@ * [http://wiki.apache.org/tomcat/Security Security] - Common security issues. * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. * [http://wiki.apache.org/tomcat/Tomcat_User Tomcat User] - More information about the tomcat-user list. - * Windows - Common Windows questions. + * [http://wiki.apache.org/tomcat/FAQ/Windows Windows] - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/FDA Validation by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/FDA_Validation New page: == FDA (21 CFR Part 11) Validation == === Preface === This page discusses using Tomcat in an [http://www.fda.gov/ FDA] [http://www.fda.gov/cdrh/comp/guidance/938.html validated] environment, i.e. one where [http://www.21cfrpart11.com/ 21 CFR Part 11] regulations apply. Please note that although this page mentions specific companies, we do not explicitly endorse or sell anyone's services. Tomcat and Apache are not-for-profit organizations. This page is also far from a complete listing of vendors and support options. It is meant as a demonstration showing that these options do exist and that running Tomcat in a validated environment is both feasible and reasonable. === Questions === '''Can Tomcat be used in a validated environment?''' Yes. There's nothing in Tomcat's design or implementation that prevent it from being used in a validated environment. The same validation procedures and guidelines that apply to most software packages apply to Tomcat as well. Being an open-source application does not preclude Tomcat validation. In fact, it helps in at least one key aspect: the source code itself can be audited, as can the commit and change logs for the software. '''Has anyone actually done it?''' Yes. As shown in [http://marc.theaimsgroup.com/?l=tomcat-userm=109836874319797w=2 this user mailing list archive], Merck and other large companies are using Tomcat in a validated environment. In addition, there is at least one application provider ([http://www.interchangedigital.com/ Interchange Digital]) whose application runs on Tomcat that has deployed said package in numerous pharma data centers. '''Is Tomcat itself validated?''' Yes. Tomcat itself is validated to the extent it can be. Tomcat implements two Java Specifications: the [http://java.sun.com/products/servlet Servlet Specification] and the [http://java.sun.com/products/jsp Java Server Pages (JSP) Specification]. Each of these specifications has a Technology Compatbility Kit (TCK), which is a collection of tests to certify a given product meets the Specification fully and accurately. The [http://www.apache.org/ Apache Software Foundation] is licensed to run these TCKs. They are run against every single Tomcat release. '''No Tomcat release is pronounced stable unless it has passed both of these TCKs with 100% compliance'''. Therefore, every stable Tomcat release is validated to the extent of Tomcat's core functionality. Furthermore, any company of individual may [http://java.sun.com/scholarship/ apply] to obtains and use these TCKs themselves. That way, you can re-validated Tomcat including any custom patches you have implemented. However, we cannot validate your application's use of Tomcat. You're on your own there. '''What kind of support is there around validating Tomcat?''' Several kinds. They include: * There are numerous smaller [http://jakarta.apache.org/site/vendors.html vendors] and several large ones, including IBM, HP, Sun, and Novell, who offer Tomcat consulting and support services, including application auditing, environment assessments, and risk analysis. * There are numerous vendors in addition to the above consultants, like [http://www.covalent.net/ Covalent] and [http://www.jboss.org/services/prodsupport JBoss], who offer 24/7/365 enterprise-level support for Tomcat. * The Tomcat [http://tomcat.apache.org/lists.html mailing lists] are extremely active and contain members of many of the above organizations, including contractors available for hire. '''How do I know I have a validated release? How do I know no one has tampered with the release package?''' All Tomcat releases are signed using the Release Manager's [http://www.pgpi.org/doc/pgpintro PGP] key. The key is also available in the KEYS file that ships with every Tomcat release. The same KEYS file is also available in the Tomcat CVS repository ([http://www.apache.org/dist/tomcat/tomcat-5/KEYS here]). The PGP signatures are available on all the Tomcat download pages, and can (and should!) be used to verify the release really is the signed distribution. As for tampering: every Tomcat release is also digested using the MD5 algorithm as specified in [http://www.faqs.org/rfcs/rfc1321.html RFC1321]. The MD5 digest is included in all the download pages. Users run MD5 on their local machine to verify that the digest of what they downlaoded is the same as that published in the Apache download pages. That way, users are assured the distribution has not been modified since the Release Manager signed it. '''What about security? I'm concerned about attacks.''' There's no need to be. See the [http://wiki.apache.org/tomcat/FAQ/Security security page] of this FAQ for more information.
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Database Database] - Getting tomcat to talk to a database. * [http://wiki.apache.org/tomcat/FAQ/Deployment Deployment] - Questions related to web application deployment. * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. - * FDA Validation - Questions related to running Tomcat in an FDA validated environment. + * [http://wiki.apache.org/tomcat/FAQ/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. * Logging - Common questions related to logging in Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. - * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Logging] - Common questions related to logging in Tomcat. + * [http://wiki.apache.org/tomcat/FAQ/Logging Logging] - Common questions related to logging in Tomcat. * [http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. * Meta - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. * Logging - Common questions related to logging in Tomcat. - * [[http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. + * [http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. * Meta - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. - * Monitoring Performance - Monitoring and Performance questions. + * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. * Other Resources - A lot of links to tomcat related documentation and experiences. * [http://wiki.apache.org/tomcat/Security Security] - Common security issues. * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Performance and Monitoring by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring New page: == Preface == This is about Tomcat performance. * [thread] [http://marc.theaimsgroup.com/?t=10445538312r=1w=2 Tomcat Performance Concerns] * [thread] [http://marc.theaimsgroup.com/?t=10359888531r=1w=2 How do I increase performance on Tomcat?] Other (non-exhaustive) notes: * Stress test your webapp. You can do this via [http://jakarta.apache.org/jmeter/ JMeter], [http://www.joedog.org/siege/ siege], [http://httpd.apache.org/test/flood/ flood], and other tools. Google is your friend. * Tweak your UNIX box! Look at ulimit and kernel parameters. * Bad design will hurt performance. * Look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], or [http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them. == Questions == '''Is Tomcat faster than serving static HTML pages than apache?''' Yes depending on how you tune it. And NO depending on how you tune it. Anything less starts a religious war. We recommend performing your own benchmarks and [http://marc.theaimsgroup.com/?l=tomcat-userm=106036177509367w=2 see for yourself]. '''Is there an application-specific comparison between Tomcat and Resin or other containers?''' [http://raibledesigns.com/page/rd?anchor=resin_slower_than_tomcat_fails Here's] one comparing recent versions of Resin and Tomcat running [http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse AppFuse]. '''Is there a comprehensive, up-to-date, detailed benchmark comparing various servlet containers, including Tomcat?''' Yes. Here's the most comprehensive and objective one we've found to date: [http://www.webperformanceinc.com/library/ServletReport/ Web Performance, Inc.'s comparison]. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Logging by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Logging New page: == Preface == This FAQ section provides help with logging-related issues. As you read these questions, please keep in mind that Tomcat's internal logging is separate from your own webapp's logging. You would typically be concerned only with your own webapp's logging. You would modify Tomcat's internal logging settings if you are debugging a possible issue or running into other problems. It is anticipated that Tomcat's out-of-the-box logging configuration will be fine for the vast majority of users and environments. == Questions == '''Does Tomcat have built-in logging capabilities, and if so how do I use them?''' The Servlet Specification requires Servlet Containers like Tomcat to provide at least a rudimentary implementation of the ServletContext#log method. Tomcat provides a much richer implementation than required by the Spec, as follows: * Prior to Tomcat 5.5, Tomcat provided a Logger element that you could configure and extend according to your needs. If you are using a Tomcat version previous to Tomcat 5.5, make sure to read the [http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html Logger configuration reference]. * Starting with Tomcat 5.5, Logger was removed and [http://jakarta.apache.org/commons/logging Jakarta Commons-Logging] {{{Log}}} is used everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to know how to better use and configure Tomcat's internal logging. In addition, Tomcat does not swallow the System.out and System.err JVM output streams. You may use these streams for elementary logging if you wish, but a more robust approach such as commons-logging or [http://logging.apache.org/log4j Log4J] is recommended for production applications. '''How do I configure commons-logging for use with Tomcat?''' You need to specify a commons-logging configuration file and, if you wish, a logging implementation that supports commons-logging. JDK 1.4 (and later) java.util.Logging and Log4j are the two most commonly used logging toolkits for Tomcat. If you supply an external logging toolkit such as Log4J, it needs to be located in the $CATALINA_HOME/common/lib directory (for Tomcat 5.0 and earlier) or added to the bootstrap classpath by using the scripts in $CATALINA_HOME/bin (this is required for Tomcat 5.5 and later, which uses commons-logging while bootstrapping, and optional for Tomcat 5.0 and earlier). For more detailed instructions, see these mailing list discussions: * [http://marc.theaimsgroup.com/?l=tomcat-userm=106623436423859w=2 A log4j example] * [http://marc.theaimsgroup.com/?l=tomcat-userm=108330970225012w=2 Logging Configuration] * [http://marc.theaimsgroup.com/?l=tomcat-userm=108578233003073w=2 Example with JSVC and running on port 80.] * [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=877025 Need for it to be in bootstrap classpath.] '''How should I log in my own webapps?''' While you can use System.out and System.err to log, we strongly recommend using a toolkit like Log4J or JDK 1.4's java.util.logging package. With these toolkits, you have significantly more functionality (for example, sending emails, logging to a database, controlling at runtime the logging level of different classes, inspecting the logs with a graphical viewer, etc.) than with Tomcat's built-in default logging configuration. We also recommend that you separate your logging from Tomcat's internal logging. That means you should bundle your logging toolkit with your webapp. If you're using Log4J, for example, place the Log4J jar in the WEB-INF/lib directory of your webapp and the Log4J configuration file in the WEB-INF/classes directory of your webapp. This way different web applications can have different logging configurations and you don't need to worry about them interfering with each other. '''Where does System.out go? How do I rotate catalina.out?''' System.out and System.err both print to catalina.out. But you can suppress this via the swallowOutput property and sent to different log files. catalina.out does not rotate. But it should not be an issue because nothing should be printing to standard output since you are using a logging package, right? [http://marc.theaimsgroup.com/?t=10554447261r=1w=2a thread about rotation of catalina.out] '''Where are the logs when running Tomcat as a Windows service?''' See these mailing list archive threads: * [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=863525Where are the Tomcat logs when running as a Windows service?] '''Are there external documents, tutorials, or references about logging in Tomcat?''' Yes, there are. You can Google for more, but some such references are: *
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. - * Logging - Common questions related to logging in Tomcat. + * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Logging] - Common questions related to logging in Tomcat. * [http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. * Meta - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * Meta - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. - * Other Resources - A lot of links to tomcat related documentation and experiences. + * [http://wiki.apache.org/tomcat/UsefulLinks Other Resources] - A lot of links to tomcat related documentation and experiences. * [http://wiki.apache.org/tomcat/Security Security] - Common security issues. * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. * [http://wiki.apache.org/tomcat/Tomcat_User Tomcat User] - More information about the tomcat-user list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/About by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/About New page: == Prefce == This FAQ is maintained by the Tomcat Committers. The content for this FAQ is usually discovered by lurking in the tomcat-user list. If you wish to make a comment about the FAQ, make the comment on the tomcat-user list. Do not e-mail any of the committers directly and do not e-mail the tomcat-dev list. (Unless other people liked your suggestion and it was accidently missed by the committers who read the tomcat-user list) Emailing the tomcat-user list will allow a larger audience to immediately learn and critique your findings. == Questions == '''How did Tomcat get its name?''' He (James Duncan Davidson) came up with Tomcat since the animal represented something that could take care of itself and fend for itself. That's how he came up with the name. [ Source ] '''How do I contribute a question?''' * Make sure the question has been asked more than once * Send an e-mail to the tomcat-user list * Make sure the subject has [FAQ] in it * Place the e-mail in a question and answer format like this. * Minimize the use of html. Content is more important, the person updating the FAQ will make the wonderful stylistic choices. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * Miscellaneous - Miscellaneous questions that weren't categorized. * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. * [http://wiki.apache.org/tomcat/UsefulLinks Other Resources] - A lot of links to tomcat related documentation and experiences. - * [http://wiki.apache.org/tomcat/Security Security] - Common security issues. + * [http://wiki.apache.org/tomcat/FAQ/Security Security] - Common security issues. * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. - * [http://wiki.apache.org/tomcat/Tomcat_User Tomcat User] - More information about the tomcat-user list. + * [http://wiki.apache.org/tomcat/FAQ/Tomcat_User Tomcat User] - More information about the tomcat-user list. * [http://wiki.apache.org/tomcat/FAQ/Windows Windows] - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Linux Unix by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Linux_Unix -- + ## page was renamed from FAQ/Unix Linux == Preface == == Questions == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Miscellaneous by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Miscellaneous -- Using /servlet/ to map servlets is evil, absolutely evil. Even more evil than [http://www.eviloverlord.com/lists/overlord.html this] . That being said, here are some threads that may answer this: - * [http://marc.theaimsgroup.com/?l=tomcat-userm=103417249925541w=2 [SECURITY] Apache Tomcat 4.x JSP source disclosure] vulnerability + * [http://marc.theaimsgroup.com/?l=tomcat-userm=103417249925541w=2 (SECURITY) Apache Tomcat 4.x JSP source disclosure] vulnerability * [http://marc.theaimsgroup.com/?t=10394533713r=1w=2 Cannot Run Servlets, only JSP's, Part II] * [http://marc.theaimsgroup.com/?t=10432685411r=1w=2 Tomcat configuration problem: JSPs work, servlets don] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Logging Logging] - Common questions related to logging in Tomcat. * [http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. * [http://wiki.apache.org/tomcat/FAQ/About Meta] - About Tomcat and this FAQ. - * Miscellaneous - Miscellaneous questions that weren't categorized. + * [http://wiki.apache.org/tomcat/FAQ/Miscellaneous Miscellaneous] - Miscellaneous questions that weren't categorized. * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. * [http://wiki.apache.org/tomcat/UsefulLinks Other Resources] - A lot of links to tomcat related documentation and experiences. * [http://wiki.apache.org/tomcat/FAQ/Security Security] - Common security issues. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Miscellaneous by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Miscellaneous New page: == Preface == This section contains various miscellaneous questions that are asked frequently enough to be listed here. == Questions == '''I'm having a problem with character encoding in tomcat 5''' In Tomcat 5 - there have been issues with respect to character encoding. ( Usually of the the form request.setCharacterEncoding(String) doesn't work ) Odds are, its not a bug. Before filing a bug report, see these bug reports as well as any bug reports linked to these bug reports: [http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 23929], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25360 25360], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25231 25231], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25235 25235], [http://issues.apache.org/bugzilla/show_bug.cgi?id=22666 22666], [http://issues.apache.org/bugzilla/show_bug.cgi?id=24557 24557], [http://issues.apache.org/bugzilla/show_bug.cgi?id=24345 24345], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25848 25848] '''I have a problem with webapp reloading in tomcat 4.1.27.''' Update to a later tomcat version, preferably the latest stable one. If you must stay with 4.1.27, get this hotfix: [http://issues.apache.org/bugzilla/show_bug.cgi?id=22096 Bugzilla 22096]. '''I am unable to compile my JSP!''' Are you seeing this? {{{ org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. }}} If so, here is some solutions: * [http://marc.theaimsgroup.com/?l=tomcat-userm=104949554010352w=2 Environment variable issue] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=16688 Environment issue] or [http://issues.apache.org/bugzilla/show_bug.cgi?id=20527 Ant issue] * Others have had success by added JAVA_HOME/bin to their PATH. [http://marc.theaimsgroup.com/?l=tomcat-userm=105525594928279w=2 1] ... [http://marc.theaimsgroup.com/?l=tomcat-userm=105526353505541w=2 2] and make sure you are using the full JDK and not the JRE. In the case of the Environment issues, it is typical that on Windows, the startup scripts work fine and the service does not. The service uses registry values to look for java and other stuff. To save yourself some trouble, see if the [http://web.bvu.edu/staff/david/tcservcfg/ NT Service Config Utility] is helpful. '''I can't get servlets to work under /servlet/*!''' Using /servlet/ to map servlets is evil, absolutely evil. Even more evil than [http://www.eviloverlord.com/lists/overlord.html this] . That being said, here are some threads that may answer this: * [http://marc.theaimsgroup.com/?l=tomcat-userm=103417249925541w=2 [SECURITY] Apache Tomcat 4.x JSP source disclosure] vulnerability * [http://marc.theaimsgroup.com/?t=10394533713r=1w=2 Cannot Run Servlets, only JSP's, Part II] * [http://marc.theaimsgroup.com/?t=10432685411r=1w=2 Tomcat configuration problem: JSPs work, servlets don] '''Why is the invoker evil?''' This is opinions of the writer (YMMV) Quickie about the invoker: The invoker is a dynamic servlet which allows run-time loading of other servlets based on class name. This servlet is the one that allows http://localhost/servlet/com.foo.MyClass?more=cowbell, where com.foo.MyClass is some class which can be loaded as a servlet but was never explicitly declared in a config file. Evil because: * Security risk ... see links above * Configuration hiding - There is NO way to determine which servlets are used vs which are not used. In web.xml, every servlet is declared and mapped. In that one file you instantly have a road map to how the webapp works. * Back doors. Servlets which '''are''' mapped can be alternately called via the invoker by class name. Since the URL is different, all security constraints might be ignored since the URL pattern is VERY different. * Back doors. Bad programmers make it easier to do bad things. * Back doors. It may be common to use common 3rd party jars in a shared area. If that shared jar has servlets in them and that servlet has a hole in it, bad things happen. * Configuration hiding - it's important enough to say twice. Explicit declaration while a PITA, will be more helpful in the maintenance scheme of your webapp. For another explanation of the invoker servlet, why it's evil, and what to do about it, see [http://test.javaranch.com/wiki/view?InvokerServlet JavaRanch FAQ]. '''How to I get Tomcat's version number?''' javax.servlet.ServletContext.getServerInfo(); Starting with tomcat 5.0.28 -
[Tomcat Wiki] Update of FAQ/About by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/About -- - == Prefce == + == Preface == This FAQ is maintained by the Tomcat Committers. The content for this FAQ is usually discovered by lurking in the tomcat-user list. If you wish to make a comment about the FAQ, make the comment on the tomcat-user list. Do not e-mail any of the committers directly and do not e-mail the tomcat-dev list. (Unless other people liked your suggestion and it was accidently missed by the committers who read the tomcat-user list) Emailing the tomcat-user list will allow a larger audience to immediately learn and critique your findings. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ -- * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. * [http://wiki.apache.org/tomcat/FAQ/Logging Logging] - Common questions related to logging in Tomcat. * [http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. - * Meta - About Tomcat and this FAQ. + * [http://wiki.apache.org/tomcat/FAQ/About Meta] - About Tomcat and this FAQ. * Miscellaneous - Miscellaneous questions that weren't categorized. * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. * [http://wiki.apache.org/tomcat/UsefulLinks Other Resources] - A lot of links to tomcat related documentation and experiences. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Logging by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Logging -- '''Does Tomcat have built-in logging capabilities, and if so how do I use them?''' - The Servlet Specification requires Servlet Containers like Tomcat to provide at least a rudimentary implementation of the ServletContext#log method. Tomcat provides a much richer implementation than required by the Spec, as follows: + The Servlet Specification requires Servlet Containers like Tomcat to provide at least a rudimentary implementation of the {{{ServletContext#log}}} method. Tomcat provides a much richer implementation than required by the Spec, as follows: * Prior to Tomcat 5.5, Tomcat provided a Logger element that you could configure and extend according to your needs. If you are using a Tomcat version previous to Tomcat 5.5, make sure to read the [http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html Logger configuration reference]. * Starting with Tomcat 5.5, Logger was removed and [http://jakarta.apache.org/commons/logging Jakarta Commons-Logging] {{{Log}}} is used everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to know how to better use and configure Tomcat's internal logging. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Memory by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Memory New page: == Preface == This page discusses various memory issues. In a nutshell - if your computer has less than 128MB of ram - you will probably have trouble. Anyhow, also read the following threads for other memory related issues: * [http://marc.theaimsgroup.com/?t=10438897306r=1w=2 java.lang.OutOfMemoryError during deploy] * [http://marc.theaimsgroup.com/?t=10437834777r=1w=2 Memory requirements] * [http://marc.theaimsgroup.com/?t=10433306644r=1w=2 Memory Mgmt Tomcat] * [http://marc.theaimsgroup.com/?t=10301137976r=1w=2 Tomcat Out of memory] * [http://marc.theaimsgroup.com/?t=10451996172r=1w=2 Tracking memory usage over time] Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], or [http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them. === JSP Recompilation === If your application uses JSPs which are frequently recompiled at runtime, e.g. headers that change value hourly, please make sure to read the JSP HOW-TO page and RELEASE NOTES documents. You may wish to tune the JSP compiler configuration to prevent memory leaks. Of course, these are documents you should have read by now anyways.. == Questions == '''How do I adjust memory settings?''' First look at {{{java -X}}} to determine what parameters to set. Then you can set them via the environment variable {{{JAVA_OPTS}}}. Read the files catalina.bat or catalina.sh for more information on JAVA_OPTS. '''Why do I get {{{OutOfMemoryError}}} errors?''' Many reasons. * You're out of memory. Simple as that - add more to your heap. * You're out of memory. You have code which is hanging onto object references and the garbage collector can't do its job. Get a profiler to debug this one. * You ran out of file descriptors. If you are on a *nix system, it has been observed that an {{{OutOfMemoryError}}} can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The {{{ulimit}}} program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. * You have too many threads running. Some OS's have a limit to the number of threads which may be executed by a single process. (Which is what the JVM is.) Refer to your OS docs for more information on how to raise this threshold. * If you have a lot of servlets or JSP's, you may need to increase your permanent generation. By default, it is 64MB. Doubling it to be {{{-XX:MaxPermSize=256m}}} might be a good start. * Your OS limits the amount of memory your process may take. OK, this one is grasping at straws. * The JVM has a bug. This has been known to happen with JVM1.2.? and using EJB's with another servlet engine. * Not actually a reason - but on your particular platform, look at the {{{java -X}}} options. They may be VERY helpful. * [http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 Your classloaders are not being garbage collected]. '''How much memory is Tomcat/webapp/??? using?''' * To find out how much memory Tomcat is using, you might be able to use the {{{Runtime}}} class provided by the JDK. * You can't find out how much memory a webapp is using. The JVM doesn't give us these detail. * You can't find out how much memory a ??? is using. The JVM doesn't give us these detail. * That being said, a memory profiling tool might prove the above statements wrong - but you probably don't want to use them in a production environment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Deployment by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Deployment -- ''' Why does the memory usage increase when I redeploy a web application?''' - Because the Classloader (and the Class objects it loaded) cannot be recycled. They are stored in the permanent heap generation by the JVM, and when you redepoy a new class loader is created, which loads another copy of all these classes. This can cause OufOfMemoryErrors eventually. + Because the Classloader (and the Class objects it loaded) cannot be recycled. They are stored in the permanent heap generation by the JVM, and when you redepoy a new class loader is created, which loads another copy of all these classes. This can cause {{{OufOfMemoryErrors}}} eventually. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs/Memory by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Bugs/Memory The comment on the change is: duplicated -- - == Preface == + deleted - This page discusses various memory issues. In a nutshell - if your computer has less than 128MB of ram - you will probably have trouble. Anyhow, also read the following threads for other memory related issues: - - * [http://marc.theaimsgroup.com/?t=10438897306r=1w=2 java.lang.OutOfMemoryError during deploy] - * [http://marc.theaimsgroup.com/?t=10437834777r=1w=2 Memory requirements] - * [http://marc.theaimsgroup.com/?t=10433306644r=1w=2 Memory Mgmt Tomcat] - * [http://marc.theaimsgroup.com/?t=10301137976r=1w=2 Tomcat Out of memory] - * [http://marc.theaimsgroup.com/?t=10451996172r=1w=2 Tracking memory usage over time] - - Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], or [http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them. - - === JSP Recompilation === - If your application uses JSPs which are frequently recompiled at runtime, e.g. headers that change value hourly, please make sure to read the JSP HOW-TO page and RELEASE NOTES documents. You may wish to tune the JSP compiler configuration to prevent memory leaks. Of course, these are documents you should have read by now anyways.. - - == Questions == - - '''How do I adjust memory settings?''' - - First look at {{{java -X}}} to determine what parameters to set. Then you can set them via the environment variable {{{JAVA_OPTS}}}. Read the files catalina.bat or catalina.sh for more information on JAVA_OPTS. - - '''Why do I get {{{OutOfMemoryError}}} errors?''' - - Many reasons. - - * You're out of memory. Simple as that - add more to your heap. - * You're out of memory. You have code which is hanging onto object references and the garbage collector can't do its job. Get a profiler to debug this one. - * You ran out of file descriptors. If you are on a *nix system, it has been observed that an {{{OutOfMemoryError}}} can be thrown if you run out of file descriptors. This can occur if your threshold is too low. The {{{ulimit}}} program can help you out here. You also may need to account for socket connections too when thinking about these thresholds. Google is your friend for getting more information about this topic. - * You have too many threads running. Some OS's have a limit to the number of threads which may be executed by a single process. (Which is what the JVM is.) Refer to your OS docs for more information on how to raise this threshold. - * If you have a lot of servlets or JSP's, you may need to increase your permanent generation. By default, it is 64MB. Doubling it to be {{{-XX:MaxPermSize=256m}}} might be a good start. - * Your OS limits the amount of memory your process may take. OK, this one is grasping at straws. - * The JVM has a bug. This has been known to happen with JVM1.2.? and using EJB's with another servlet engine. - * Not actually a reason - but on your particular platform, look at the {{{java -X}}} options. They may be VERY helpful. - * [http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 Your classloaders are not being garbage collected]. - - '''How much memory is Tomcat/webapp/??? using?''' - - * To find out how much memory Tomcat is using, you might be able to use the {{{Runtime}}} class provided by the JDK. - * You can't find out how much memory a webapp is using. The JVM doesn't give us these detail. - * You can't find out how much memory a ??? is using. The JVM doesn't give us these detail. - * That being said, a memory profiling tool might prove the above statements wrong - but you probably don't want to use them in a production environment. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Miscellaneous by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Miscellaneous The comment on the change is: added code tags where needed -- '''How to I get Tomcat's version number?''' - javax.servlet.ServletContext.getServerInfo(); + {{{javax.servlet.ServletContext.getServerInfo();}}} Starting with tomcat 5.0.28 - there is now a version.sh (or version.bat) program in the bin directory. It will print the version number of tomcat to Standard output. @@ -76, +76 @@ How do I set system properties at startup? Set JAVA_OPTS to be something BEFORE calling startup.bat or before calling catalina.bat. (or you can edit those files, but it isn't advised) - Example (windows): SET JAVA_OPTS='-DpropName=propValue' + Example (windows): {{{SET JAVA_OPTS='-DpropName=propValue' }}} - Example (UNIX): export JAVA_OPTS='-DpropName=propValue' + Example (UNIX): {{{export JAVA_OPTS='-DpropName=propValue' }}} Windows service users - use [http://web.bvu.edu/staff/david/tcservcfg/ this] @@ -139, +139 @@ It is not broken, your tag probably is. Many bug reports have been filed about this. Here is the bug report with all the gory details. - '''Why do I get java.lang.IllegalStateException?''' + '''Why do I get {{{java.lang.IllegalStateException}}} ?''' - These are the most common reasons how you can get an java.lang.IllegalStateException: + These are the most common reasons how you can get an {{{java.lang.IllegalStateException}}}: - * Calling setBufferSize and content has been written. + * Calling {{{setBufferSize}}} and content has been written. * The response has been committed and you do any of the following: -* Calling ServletResponse.reset() or ServletResponse.resetBuffer() +* Calling {{{ServletResponse.reset()}}} or {{{ServletResponse.resetBuffer()}}} -* Calling either HttpServletResponse.sendError() or HttpServletResponse.sendRedirect(). +* Calling either {{{HttpServletResponse.sendError()}}} or {{{HttpServletResponse.sendRedirect()}}}. -* Calling RequestDispatcher.forward() which includes performing a jsp:forward +* Calling {{{RequestDispatcher.forward()}}} which includes performing a jsp:forward -* Calling RequestDispatcher.forward() which includes performing a jsp:forward +* Calling {{{RequestDispatcher.forward()}}} which includes performing a jsp:forward - Remember that if you call forward() or sendRedirect(), any following lines of code will still execute. For example: + Remember that if you call {{{forward()}}} or {{{sendRedirect()}}}, any following lines of code will still execute. For example: {{{ { ... @@ -181, +181 @@ ''' How do open a file for reading in my webapp?''' - Use ServletContext.getResourceAsStream(). + Use {{{ServletContext.getResourceAsStream()}}} '''Can I run tomcat with the JRE, or do I need the full JDK?''' @@ -203, +203 @@ See the [http://wiki.apache.org/tomcat/FAQ/Logging Logging] section of the FAQ. - '''I'm getting java.lang.ThreadDeath exceptions when reloading my webapp.''' + '''I'm getting {{{java.lang.ThreadDeath}}} exceptions when reloading my webapp.''' See [http://issues.apache.org/bugzilla/show_bug.cgi?id=26372 Bugzilla discussion] of this. @@ -217, +217 @@ 1. Download Tomcat's base and admin webapp distributions (binaries), unzip to a directory of your choice. We'll use c:\temp in this example. 2. Edit c:\temp\server\webapps\admin\WEB-INF\web.xml to remove the JSPC-generated servlet mappings. These are marked in the web.xml file with comments indicating the beginning and end of the JSPC section. You can simply comment out all these servlet-mappping elements. Be careful not to comment out other servlet mappings such as the Struts dispatcher servlet. - 3. Open c:\temp\server\webapps\admin\WEB-INF\lib\catalina-admin.jar with a zip file program like WinZip. Remove the files named *_jsp.class, as these are the compiled JSPs. Do not remove the other class files, the ones under the org/apache/ paths. + 3. Open c:\temp\server\webapps\admin\WEB-INF\lib\catalina-admin.jar with a zip file program like {{{WinZip}}}. Remove the files named *_jsp.class, as these are the compiled JSPs. Do not remove the other class files, the ones under the org/apache/ paths. 4. Download a Tomcat source distribution and unzip it to a directory of your choice, but not the same directory that you used above. We'll use c:\src in this example. 5. Copy everything '''except''' the WEB-INF/lib directory from c:\src\container\webapps\admin to c:\temp\server\webapps\admin. Now you will have the uncompiled admin webapp JSPs. 6. If you haven't already, define an admin user in %CATALINA_HOME%\conf\tomcat-users.xml.
[Tomcat Wiki] Update of FAQ/Miscellaneous by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Miscellaneous -- You'll need to tweak with server.xml and [http://marc.theaimsgroup.com/?l=tomcat-userm=105159411609623w=2 do this]. (Don't worry - its really easy!) - '''How do I get UTF-8? + '''How do I get UTF-8?''' [http://marc.theaimsgroup.com/?t=1055242r=1w=2 This thread] should answer that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Security by GianlucaVarisco
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by GianlucaVarisco: http://wiki.apache.org/tomcat/FAQ/Security The comment on the change is: added code tags where needed -- ''' How do I restrict access by ip address or remote host?''' - By using the RemoteHostValve or RemoteAddrValve. Warning, these valves rely on accurate incoming ip addresses or hostnames. So they can fall victim to spoofing! [http://tomcat.apache.org/tomcat-4.1-doc/config/valve.html Valve Reference Link] + By using the {{{RemoteHostValve}}} or {{{RemoteAddrValve}}}. Warning, these valves rely on accurate incoming ip addresses or hostnames. So they can fall victim to spoofing! [http://tomcat.apache.org/tomcat-4.1-doc/config/valve.html Valve Reference Link] '''How do I use jsvc/procrun to run Tomcat on port 80 securely?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of HowTo by AlexanderShopov
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by AlexanderShopov: http://wiki.apache.org/tomcat/HowTo The comment on the change is: How to set the encoding used to interpret POST requests -- }}} + == How to set the encoding used to interpret POST requests? == + POST requests should specify the encoding of the parameters and values they send. Since many clients fail to set an explicit encoding, the defaults are used - ISO 8859-1. In many cases this is not the preferred interpretation so one should employ a javax.servlet.Filter to set request encodings. Writing such a filter is trivial. Furthermore Tomcat already comes with such an example filter. Please take a look at: + 4.x:: {{{webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}} + 5.x:: {{{webapps/servlets-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java + webapps/jsp-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}} + 6.x:: {{{webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}} + + The interpretation of paramers in GET requests is determined by the URIEncoding parameter to the Connector element in server.xml configuration file. + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FrontPage by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FrontPage -- * '''[GettingStarted]''' - Getting started with Tomcat. * '''[TomcatVersions]''' - A list of every Tomcat version and its current status (draft). + * '''[FAQ]''' - Frequently Asked Questions * '''[PoweredBy]''' - A list of sites powered by Tomcat. * '''[Tomcat/Links]''' - Useful Links. * '''[HowTo]''' - How to as linked by the FAQ. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ The comment on the change is: Simplify links. Prep for an FAQ page on character encoding -- For your convenience, we have tried to break the FAQ out into multiple sections consisting of the following topics: - * [http://wiki.apache.org/tomcat/FAQ/Bugs Bugs] - You think you have a bug or there is a difference in behavior with another servlet container. + * [wiki:/Bugs Bugs] - You think you have a bug or there is a difference in behavior with another servlet container. - * [http://wiki.apache.org/tomcat/FAQ/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. + * [wiki:/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. + * [wiki:/CharacterEncoding Character Encoding] - How to handle non-standard characters. - * [http://wiki.apache.org/tomcat/FAQ/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. + * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. - * [http://wiki.apache.org/tomcat/FAQ/Database Database] - Getting tomcat to talk to a database. + * [wiki:/Database Database] - Getting tomcat to talk to a database. - * [http://wiki.apache.org/tomcat/FAQ/Deployment Deployment] - Questions related to web application deployment. + * [wiki:/Deployment Deployment] - Questions related to web application deployment. - * [http://wiki.apache.org/tomcat/HowTo How To] - Miscellaneous common how to's. + * [wiki:HowTo How To] - Miscellaneous common how to's. - * [http://wiki.apache.org/tomcat/FAQ/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. + * [wiki:/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. - * [http://wiki.apache.org/tomcat/FAQ/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. + * [wiki:/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. - * [http://wiki.apache.org/tomcat/FAQ/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. + * [wiki:/Other_Operating_Systems Other Operating Systems] - Information about scripts and support for other operating systems. - * [http://wiki.apache.org/tomcat/FAQ/Logging Logging] - Common questions related to logging in Tomcat. + * [wiki:/Logging Logging] - Common questions related to logging in Tomcat. - * [http://wiki.apache.org/tomcat/FAQ/Memory Memory] - Common memory related questions. + * [wiki:/Memory Memory] - Common memory related questions. - * [http://wiki.apache.org/tomcat/FAQ/About Meta] - About Tomcat and this FAQ. + * [wiki:/About Meta] - About Tomcat and this FAQ. - * [http://wiki.apache.org/tomcat/FAQ/Miscellaneous Miscellaneous] - Miscellaneous questions that weren't categorized. + * [wiki:/Miscellaneous Miscellaneous] - Miscellaneous questions that weren't categorized. - * [http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. + * [wiki:/Performance_and_Monitoring Performance Monitoring] - Performance Monitoring questions. - * [http://wiki.apache.org/tomcat/UsefulLinks Other Resources] - A lot of links to tomcat related documentation and experiences. + * [wiki:UsefulLinks Other Resources] - A lot of links to tomcat related documentation and experiences. - * [http://wiki.apache.org/tomcat/FAQ/Security Security] - Common security issues. + * [wiki:/Security Security] - Common security issues. - * [http://wiki.apache.org/tomcat/TomcatVersions Version] - About the different tomcat versions. + * [wiki:TomcatVersions Version] - About the different tomcat versions. - * [http://wiki.apache.org/tomcat/FAQ/Tomcat_User Tomcat User] - More information about the tomcat-user list. + * [wiki:/Tomcat_User Tomcat User] - More information about the tomcat-user list. - * [http://wiki.apache.org/tomcat/FAQ/Windows Windows] - Common Windows questions. + * [wiki:/Windows Windows] - Common Windows questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of HowTo by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/HowTo The comment on the change is: Move this content to new encoding FAQ. -- }}} - == How to set the encoding used to interpret POST requests? == - POST requests should specify the encoding of the parameters and values they send. Since many clients fail to set an explicit encoding, the defaults are used - ISO 8859-1. In many cases this is not the preferred interpretation so one should employ a javax.servlet.Filter to set request encodings. Writing such a filter is trivial. Furthermore Tomcat already comes with such an example filter. Please take a look at: - 4.x:: {{{webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}} - 5.x:: {{{webapps/servlets-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java - webapps/jsp-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}} - 6.x:: {{{webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}} - - The interpretation of paramers in GET requests is determined by the URIEncoding parameter to the Connector element in server.xml configuration file. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Miscellaneous by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Miscellaneous The comment on the change is: Move content to new encoding FAQ -- This section contains various miscellaneous questions that are asked frequently enough to be listed here. == Questions == - - '''I'm having a problem with character encoding in tomcat 5''' - - In Tomcat 5 - there have been issues with respect to character encoding. ( Usually of the the form request.setCharacterEncoding(String) doesn't work ) Odds are, its not a bug. Before filing a bug report, see these bug reports as well as any bug reports linked to these bug reports: [http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 23929], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25360 25360], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25231 25231], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25235 25235], [http://issues.apache.org/bugzilla/show_bug.cgi?id=22666 22666], [http://issues.apache.org/bugzilla/show_bug.cgi?id=24557 24557], [http://issues.apache.org/bugzilla/show_bug.cgi?id=24345 24345], [http://issues.apache.org/bugzilla/show_bug.cgi?id=25848 25848] '''I have a problem with webapp reloading in tomcat 4.1.27.''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/CharacterEncoding by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding The comment on the change is: Bring all the encoding stuff together into a single page. New page: = Character Encoding Issues = == Questions == '''What is the default character encoding?''' If a character encoding is not specified, the Servlet specification requires that an encoding of ISO 8859-1 is used. '''How do I change how GET parameters are interpreted?''' Set the URIEncoding parameter on the Connector element in server.xml. '''How do I change how POST parameters are interpreted?''' POST requests should specify the encoding of the parameters and values they send. Since many clients fail to set an explicit encoding, the default is used (ISO 8859-1). In many cases this is not the preferred interpretation so one can employ a javax.servlet.Filter to set request encodings. Writing such a filter is trivial. Furthermore Tomcat already comes with such an example filter. Please take a look at: 4.x:: {{{ webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java }}} 5.x:: {{{ webapps/servlets-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java webapps/jsp-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java }}} 6.x:: {{{ webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java }}} '''How can I test if my configuration will work correctly?''' The following sample JSP should work for any input. If you set the URIEncoding=UTF-8 on the connector, it will also work with method=GET. {{{ %@ page contentType=text/html; charset=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleCharacter encoding test page/title /head body pData posted to this form was: % request.setCharacterEncoding(UTF-8); out.print(request.getParameter(mydata)); % /p form method=POST action=index.jsp input type=text name=mydata input type=submit value=Submit / input type=reset value=Reset / /form /body /html }}} '''I'm having a problem with character encoding in tomcat 5''' In Tomcat 5 - there have been issues reported with respect to character encoding (usually of the the form request.setCharacterEncoding(String) doesn't work). Odds are, its not a bug. Before filing a bug report, see these bug reports as well as any bug reports linked to these bug reports: * [http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 23929] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=25360 25360] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=25231 25231] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=25235 25235] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=22666 22666] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=24557 24557] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=24345 24345] * [http://issues.apache.org/bugzilla/show_bug.cgi?id=25848 25848] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/CharacterEncoding by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding The comment on the change is: Add note about working on a clean install -- '''How can I test if my configuration will work correctly?''' - The following sample JSP should work for any input. If you set the URIEncoding=UTF-8 on the connector, it will also work with method=GET. + The following sample JSP should work ona clean Tomcat install for any input. If you set the URIEncoding=UTF-8 on the connector, it will also work with method=GET. {{{ %@ page contentType=text/html; charset=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Trivial Update of FAQ/CharacterEncoding by PrestonBannister
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by PrestonBannister: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding -- '''How can I test if my configuration will work correctly?''' - The following sample JSP should work ona clean Tomcat install for any input. If you set the URIEncoding=UTF-8 on the connector, it will also work with method=GET. + The following sample JSP should work on a clean Tomcat install for any input. If you set the URIEncoding=UTF-8 on the connector, it will also work with method=GET. {{{ %@ page contentType=text/html; charset=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of HowTo by ChristophePierret
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by ChristophePierret: http://wiki.apache.org/tomcat/HowTo The comment on the change is: Added info on debugging Tomcat run as a Windows service -- If Eclipse happens to be your IDE of choice, you can get more information at [http://www.jacoozi.com/index.php?option=com_contenttask=viewid=119Itemid=134 Remote Debugging with Eclipse (Jacoozi Article)]. + == How do I debug a Tomcat application when Tomcat is run as a Windows service ? == + You can debug the tomcat service by editing the service parameters as follows. +* Launch a command prompt + +* Set the proper CATALINA_HOME environment variable : pointing to tomcat home + +* Run the following command: + + {{{ + %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6 + }}} + +* Select the Java tab in the properties dialog box, + +* Add the following two lines to the Java Options text box: + + {{{ + -Xdebug + -Xrunjdwp:transport=dt_socket,address=127.0.0.1:1044,server=y,suspend=n + }}} + + If you want to allow remote debugging, replace 127.0.0.1 by your server IP address. +* Click on Apply and close the dialog by clicking on OK + +* Restart the Apache Tomcat service + +* Use your IDE to connect to Tomcat through port 1044 + + If Eclipse happens to be your IDE of choice, you can get more information at [http://www.jacoozi.com/index.php?option=com_contenttask=viewid=119Itemid=134 Remote Debugging with Eclipse (Jacoozi Article)]. + For IntelliJ IDEA you choose a remote debug target and set transport to socket and mode to attach , then you specify the host (127.0.0.1) and port (1044) == How do I enable Server Side Includes (SSI)? == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by TimFunk
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by TimFunk: http://wiki.apache.org/tomcat/FAQ The comment on the change is: Clustering Link -- * [wiki:/Bugs Bugs] - You think you have a bug or there is a difference in behavior with another servlet container. * [wiki:/Class_Not_Found Class Not Found] - What to do with Class Not Found errors. * [wiki:/CharacterEncoding Character Encoding] - How to handle non-standard characters. + * [wiki:/Clustering Clustering] - Cluster and clustering related questions * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * [wiki:/Database Database] - Getting tomcat to talk to a database. * [wiki:/Deployment Deployment] - Questions related to web application deployment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Clustering by TimFunk
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by TimFunk: http://wiki.apache.org/tomcat/FAQ/Clustering The comment on the change is: Missing from the port New page: == Preface == This page discusses cluster- and clustering-related questions. Please make sure to read the Clustering HowTo page in the main Tomcat documentation bundle as well. == Questions == '''Can I configure a cluster at the Engine level?''' Yes, beginning with Tomcat 5.5.10 you can configure clusters at both the Engine and Host levels. This helps support clustering for web hosting companies. '''Show me a simple cluster configuration example.''' For Tomcat 5.5.10 and later: {{{ Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster defaultMode=true / }}} '''How do I turn on transport logging?''' * Use org.apache.catalina.cluster as logger category and switch to info, debug or trace as log level. * Configure the clusterLog attribute (logging category) to get and send and receive message log. '''How do I use JMX to monitor the cluster?''' With Java 5 you can use the jconsole application to look inside the runnnig cluster: please see the JMX configuration section in the Clustering HowTo document. In fastasyncmode replication mode you can got more information with sender attributes doProcessingStats=true and queueDoStats=true. Finally, with the new JMX remote ant task you can access the state and call operations. '''Can I pause the message sending?''' Yes, the async senders buffer the messages, but make sure the membership ping is active. With fastasyncqueue mode you can limit the max queue size. '''Can I add more senders (pooled mode)?''' Yes, with sender attribute maxPoolSocketLimit=40 you can have more than the default 25 sockets to transfer more parallel messages. '''What happens when I pull the network cable?''' The other members will remove the instance from the cluster, but when you insert the cable again, the Tomcat instance might have completely flipped out. This is because the OS might start using 100% of the CPU when a multicast message is sent. There has not yet been a good solution for this, I will let you know when I have come up with one. (pero: I test this and I works correct with java 5 and exists when you use the cluster with JDK 1.4.x) '''At my windows laptop without network my cluster doesn't work?''' The Membership attribute mcastBindAddress=127.0.0.1 must be set! '''The cluster dosen't work under linux with two nodes at two boxes?''' Check the the following: * Is your network interface enabled for multicast? ifconfig eth0 MULTICAST * Exists a multicast route to your network interface? route add -host 228.0.0.4 dev eth0 * Is your firewall active? Then check that multicast port is on your UDP open list and the receiver TCP port is also for both machines open! '''I get localhost rather than eth0 or another interface when using tcpListenAddress=auto.''' Change /etc/hosts so that the localhost domain resolves to the actual IP address of the NIC, eth0. Please see Bugzilla for more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Developing by TimFunk
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by TimFunk: http://wiki.apache.org/tomcat/FAQ/Developing The comment on the change is: missing page from port New page: == About == This section of the FAQ discusses common questions related to Tomcat development. == Questions == '''How do I configure Tomcat to support remote debugging?''' The short answer is to add the following options when the JVM is started: {{{-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n}}} There are a number of ways you can do this depending on how you normally start Tomcat: * Set environment variables {{{JPDA_ADDRESS=8000}}} and {{{JPDA_TRANSPORT=dt_socket}}} and then start tomcat using {{{catalina jpda start}}}. * If you run Tomcat using service wrapper, check the documentation for the service to determine how to set the required JVM options. * If you start Tomcat from within an IDE, check the documentation for the IDE to determine how to set the required JVM options. The port does not need to be set to 8000, it may be any value appropriate for your system. Whilst this is very useful in development it should not be used in production because of both security and performance implications. '''How do I remotely debug Tomcat using Eclipse?''' This answer assumes that you have a project set up with all of the fixings and have some idea of what you're doing in this respect. If not then thats really outside the scope of this topic and more in the scope of you needing to go to [[http://eclipse.org eclipse.org]] and read up on how to use your ide, and maybe practice a little bit before you come back to this. We're also going to assume you have some idea of what a debugger is and how to use one. Make sure tomcat is started and that your app is deployed and the sources, etc are all defined as resources in your app. If you have a servlet or something, set a breakpoint where its sure to hit on the next request. Go to Run-Debug Click on Remote Java Applications, then click New. Type in the title and all. Notice that port 8000 from the Tomcat instructions. Save and run. Eclipse will connect to the VM that Tomcat is running under. Wow, that was easy! Now go type the url to submit to your servlet or whatever in your browser. Boom you hit the breakpoint right? Have fun! '''How do I remotely debug Tomcat using NetBeans IDE?''' This answer assumes that you have correctly set up a NetBeans IDE project and that you know how to use the NetBeans IDE debugger. If not, please go to http://www.netbeans.org/kb/using-netbeans/40/debug.html and read up on how to use NetBeans IDE and its debugger. Make sure that Tomcat is started in debug mode as described above, that your application is deployed, and that the sources are all defined as resources in your application. If you have a servlet or JSP file, set a breakpoint where you think a problem might be occurring. Go to Run-Attach Debugger. A dialog pops up to let you specify the following options: * Debugger: JPDA Debugger * Connector: SocketAttach * Host: The IP address of the host your Tomcat installation is running on (127.0.0.1 if it is your local machine). * Port: The port of your Tomcat debugging interface, which should be 8000 if you've followed the instructions above. When you press OK, you have a debugging connection very similar to local debugging. Note that NetBeans IDE has a second option -- you can debug JSP files and servlets locally using a Tomcat server that is bundled with the IDE. When you debug a JSP file or servlet in the IDE, the bundled Tomcat server automatically starts in debug mode, and the debugger connects to it. '''How do I change the monitoring interval for modified resources and application reloading?''' Modify the {{{checkInterval}}} attribute value on the relevant Loader element in your web application configuration file (yourapp.xml), or in the main configuration file {{{%CATALINA_HOME%/conf/server.xml}}} if that is the one you're using. For more information, please see the [[http://tomcat.apache.org/faq/config/loader.html Loader configuration reference]]. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by TimFunk
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by TimFunk: http://wiki.apache.org/tomcat/FAQ The comment on the change is: added Development -- * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * [wiki:/Database Database] - Getting tomcat to talk to a database. * [wiki:/Deployment Deployment] - Questions related to web application deployment. + * [wiki:/Development] - Various IDE integration questions. * [wiki:HowTo How To] - Miscellaneous common how to's. * [wiki:/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. * [wiki:/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Trivial Update of FAQ/Connectors by pgrodt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by pgrodt: http://wiki.apache.org/tomcat/FAQ/Connectors The comment on the change is: Formatting -- No. This way - either apache or tomcat can be restarted at any time independent of one another. - Is there any way to control the content of automatically generated mod_jk.conf-auto? I need my own specific commands added to it. + '''Is there any way to control the content of automatically generated mod_jk.conf-auto? I need my own specific commands added to it.''' + There really is no need to. Just copy the automatically generated mod_jk.conf-auto and edit it manually to your preference. None of production tomcat installations really use mod_jk.conf-auto as it is. '''How do I bind to a specific ip address?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Trivial Update of FAQ/Miscellaneous by Dan
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by Dan: http://wiki.apache.org/tomcat/FAQ/Miscellaneous -- To make a global change, this is done in TOMCAT_HOME/conf/web.xml by changing the listings property for the default servlet. - If you want to enable it for an individual webapp, then you need to add something similar to the following to your web.xml file: + If you want to enable it for an individual webapp, then you need to add something similar to the following to your web.xml file (for your individual app): {{{ servlet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Miscellaneous by Dan
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by Dan: http://wiki.apache.org/tomcat/FAQ/Miscellaneous The comment on the change is: improving an answer -- '''How do I enable/disable directory listings?''' - This is done in TOMCAT_HOME/conf/web.xml by changing the listings property for the default servlet. + To make a global change, this is done in TOMCAT_HOME/conf/web.xml by changing the listings property for the default servlet. + + If you want to enable it for an individual webapp, then you need to add something similar to the following to your web.xml file: + + {{{ +servlet +servlet-namelisting/servlet-name + servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class +init-param +param-namedebug/param-name +param-value0/param-value +/init-param +init-param +param-namelistings/param-name +param-valuetrue/param-value +/init-param +load-on-startup1/load-on-startup +/servlet + +servlet-mapping +servlet-namelisting/servlet-name +url-pattern//url-pattern +/servlet-mapping + + }}} '''How do I make Tomcat listen on a specific IP address instead of all available addresses?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of PoweredBy by IOrtega
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by IOrtega: http://wiki.apache.org/tomcat/PoweredBy -- http://www.deltava.org/img/DeltaBanner.png [http://www.deltva.org/ Delta Virtual Airlines] is the world's largest virtual airline, with over 2,200 members. This is a group of flight simulation enthusiasts using Microsoft Flight Simulator to fly the current and historic routes of Delta Air Lines. + = Derecho.com = + http://www.derecho.com/_img/derecho_dot_com_logo.gif + [http://www.derecho.com/ Derecho.com] Spanish law page, the biggest ebook publisher, Law content provider and eLaw firm in Spain. + = DSpace = http://dspace.org/img/green-white-gray.gif [http://www.dspace.org/ DSpace] is an open-source repository for research materials. It is installed in numerous places, including [http://dspace.mit.edu MIT] and the [http://www.iue.it/LIB/Cadmus/InstallationNotes.shtml European University Institute]. Detailed [http://www.dspace.org/technology/system-docs/install.html installation instructions] are available. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of TomcatFAQ by MichaelBurton
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by MichaelBurton: http://wiki.apache.org/tomcat/TomcatFAQ -- * '''Q: How to solve problems involving Custom``Tags and Tag``Pooling?''' * A: various apache links: -* http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001 - bug report discussing the problem +* http://issues.apache.org/bugzilla/show_bug.cgi?id=16001 - bug report discussing the problem * http://jakarta.apache.org/taglibs/guidelines.html - nice description of the life cycle * '''Q: How can I increase the max memory usage of Tomcat running as a Windows Service?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Logging by tchize
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by tchize: http://wiki.apache.org/tomcat/FAQ/Logging -- The Servlet Specification requires Servlet Containers like Tomcat to provide at least a rudimentary implementation of the {{{ServletContext#log}}} method. Tomcat provides a much richer implementation than required by the Spec, as follows: * Prior to Tomcat 5.5, Tomcat provided a Logger element that you could configure and extend according to your needs. If you are using a Tomcat version previous to Tomcat 5.5, make sure to read the [http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html Logger configuration reference]. - * Starting with Tomcat 5.5, Logger was removed and [http://jakarta.apache.org/commons/logging Jakarta Commons-Logging] {{{Log}}} is used everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to know how to better use and configure Tomcat's internal logging. + * Starting with Tomcat 5.5, Logger was removed and [http://jakarta.apache.org/commons/logging Jakarta Commons-Logging] {{{Log}}} is used everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to know how to better use and configure Tomcat's internal logging. See also [http://tomcat.apache.org/tomcat-5.5-doc/logging.html] In addition, Tomcat does not swallow the System.out and System.err JVM output streams. You may use these streams for elementary logging if you wish, but a more robust approach such as commons-logging or [http://logging.apache.org/log4j Log4J] is recommended for production applications. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of TomcatOnMacOS by MichaelValentiner
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by MichaelValentiner: http://wiki.apache.org/tomcat/TomcatOnMacOS -- == Running Tomcat on Macintosh OS X == - [See bottom half for a 2006 update to this 2004 posting] + [See bottom half for a 2006 and 2008 update to this 2004 posting] These notes are the result of several weeks playing with different things and asking a LOT of questions on several mailing lists. @@ -245, +245 @@ --Basil Bourque + === Updated for 2008 === + Michael Valentiner says: + + Today (2008-02-03) I verified running Tomcat 6.0.14 on Mac OS X 10.5.1. + + Like Basil, I did not need to set up JAVA_HOME and I did need to fix Unix file permissions. + + Unlike Basil, the System Preferences Sharing Firewall has moved to System Preferences Security Firewall. I was able to enable logging, but haven't figured out how to block UDP. + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of PoweredBy by StephanSchmid
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by StephanSchmid: http://wiki.apache.org/tomcat/PoweredBy -- http://www.enhydra.org/images/enhydra200_t200.gif [http://www.enhydra.org/ Enhydra] - Enhydra Server is a leading open source Java/XML application and webservice SOA server with an efficient super-servlet approach and is based on Tomcat. + = eTools.ch = + http://www.etools.ch/images/logo.gif + [http://www.etools.ch/ eTools.ch] is a fast and transparent metasearch engine that simultaneously queries major search engines. + = The eSage Group = http://www.esagegroup.com/images/logoAnimation.gif [http://www.esagegroup.com eSage Group] - A consulting company, most of our projects are built on Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of PoweredBy by StephanSchmid
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by StephanSchmid: http://wiki.apache.org/tomcat/PoweredBy -- http://www.enhydra.org/images/enhydra200_t200.gif [http://www.enhydra.org/ Enhydra] - Enhydra Server is a leading open source Java/XML application and webservice SOA server with an efficient super-servlet approach and is based on Tomcat. + = The eSage Group = + http://www.esagegroup.com/images/logoAnimation.gif + [http://www.esagegroup.com eSage Group] - A consulting company, most of our projects are built on Tomcat. + = eTools.ch = http://www.etools.ch/images/logo.gif [http://www.etools.ch/ eTools.ch] is a fast and transparent metasearch engine that simultaneously queries major search engines. - - = The eSage Group = - http://www.esagegroup.com/images/logoAnimation.gif - [http://www.esagegroup.com eSage Group] - A consulting company, most of our projects are built on Tomcat. = Farmer Guy Hams and Gammons = http://www.farmerguy.co.uk/images/logo.jpg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of TomcatVersions by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/TomcatVersions -- * markt: Yes, if it is agreed to drop support for it * What level of support do we want to provide for 5.5.x? * markt: Bug fixes and security fixes, no enhancements + + = Overview = + This page provides a high-level view of each of the past, current and planned major Tomcat versions. - * Once we have a stable release of 6.2.x, what support do we want to provide for 6.0.x? -* markt: None. The API change is likely to be minor and impact zero to very few users. If it is an issue then we can change our minds and limit it to just security fixes. - * What features/API changes do we want to include in 6.2.x -* remm: It could be limited to the AnnotationProcessor - InstanceManager replacement, and have the branch simply take over for 6.0.x immediately. This also allows placing 6.0.x in security fixes mode since 6.2 is a trivial upgrade path. -* markt: I'd go further and not do any updates for 6.0.x - * What features/API changes do we want to put in 6.3.x for future inclusion in 6.4.x and/or 7.0.x? -* markt: That is what the STATUS file and voting is for ;) = Tomcat 3.3.x = ||Spec versions:||Servlet 2.2, JSP 1.1|| @@ -59, +55 @@ = Tomcat 6.2.x = ||Spec versions:||Servlet 2.5, JSP 2.1|| - ||Stable:||Yes|| - ||Enhancements:||Yes|| - ||Bug Fixes:||Yes|| - ||Security Fixes:||Yes|| - ||Process:||RTC|| - ||Listed on download pages||Yes|| - ||Release Manager:||TBD|| Features: * 6.0.x plus - * Geronimo API changes - * TBD + * http://svn.apache.org/repos/asf/tomcat/trunk/NOTES-FOR-TOMCAT-6.2.txt + * TBD - additional features will be added to the above file - = Tomcat 6.3.x = + = Tomcat 7.0.x = - ||Spec versions:||Servlet 2.5, JSP 2.1|| + ||Spec versions:||Servlet 2.6?, JSP 2.2?|| - ||Stable:||No|| - ||Enhancements:||Yes|| - ||Bug Fixes:||Yes|| - ||Security Fixes:||Yes|| - ||Process:||CTR|| - ||Listed on download pages||Yes|| - ||Release Manager:||TBD|| - Features: + Features - * 6.2.x plus + * 6.x plus - * TBD + * http://svn.apache.org/repos/asf/tomcat/trunk/NOTES-FOR-TOMCAT-7.txt + * TBD - additional features will be added to the above file = Unsupported versions = The following versions are no longer supported. The source is still available from SVN and both source and binary downloads are available from the archives. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of PoweredBy by BrandonDuRette
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by BrandonDuRette: http://wiki.apache.org/tomcat/PoweredBy -- [http://www.classifieds.pl Polska Strefa - OgÅoszenia] - Classified ads database. Running on Tomcat 5 and [http://cocoon.apache.org Apache Cocoon] + = CodeCollaborator = + http://smartbear.com/i/chrome/logo-190.gif + [http://smartbear.com/codecollab.php CodeCollaborator] is a popular peer code review tool from [http://www.smartbear.com Smart Bear Software]. + = Cofax = http://www.cofax.org/content/static/cofax/logo2.gif [http://www.cofax.org Cofax] - Content Object Factory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of TomcatVersions by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/TomcatVersions The comment on the change is: Update support status after discussion on the dev list. -- - = Draft = - Need to resolve TBDs. Specifically: - * Do we want to continue to provide support (currently only security fixes) for 3.3.x? -* markt: Suggest we drop all support for 3.x - * If yes, who is release manager for 3.3.x? - * If no, do we want to remove 3.3.x from the main download page? -* markt: Yes, if it is agreed to drop support for it - * What level of support do we want to provide for 5.5.x? -* markt: Bug fixes and security fixes, no enhancements - = Overview = This page provides a high-level view of each of the past, current and planned major Tomcat versions. + The way Apache is structured and governed it is impossible to say that there will be no further enhancements, bug fixes or releases for a given version. Therefore, rather than use No in the tables below Highly unlikely has been used. That said, highly unlikely means exactly that and users of versions that are highly unlikely to see another release, even for security fixes, should consider moving to a later version. + + It is anticipated that releases will be provided for a maximum of 3 major versions at any one time. It is currently planned that the last Tomcat 4.1.x release will occur no later than June 2009. However, there are currently no firm plans for Tomcat 7 therefore, depending on demand, Tomcat 4.1.x releases may continue beyond June 2009. + = Tomcat 3.3.x = ||Spec versions:||Servlet 2.2, JSP 1.1|| ||Stable:||Yes|| - ||Enhancements:||No|| - ||Bug Fixes:||No|| - ||Security Fixes:||TBD - currently yes|| + ||Enhancements:||Highly unlikely|| + ||Bug Fixes:||Highly unlikely|| + ||Security Fixes:||Highly unlikely|| + ||Releases:||Highly unlikely|| + ||Release Manager:||Bill Barker (billbarker)|| ||Process:||RTC|| - ||Listed on download pages||Yes|| + ||Listed on download pages||No|| - ||Release Manager:||???|| = Tomcat 4.1.x = ||Spec versions:||Servlet 2.3, JSP 1.2|| ||Stable:||Yes|| - ||Enhancements:||No|| + ||Enhancements:||Unlikely|| - ||Bug Fixes:||Yes|| + ||Bug Fixes:||Unlikely|| ||Security Fixes:||Yes|| + ||Releases:||As required until at least June 2009. Driven by security fixes|| + ||Release Manager:||Mark Thomas (markt)|| ||Process:||RTC|| ||Listed on download pages||Yes|| - ||Release Manager:||Mark Thomas (markt)|| + = Tomcat 5.5.x = ||Spec versions:||Servlet 2.4, JSP 2.0|| ||Stable:||Yes|| - ||Enhancements:||TBD - currently ???|| + ||Enhancements:||Unlikely|| ||Bug Fixes:||Yes|| ||Security Fixes:||Yes|| + ||Releases:||Yes|| + ||Release Manager:||Filip Hanik (fhanik)|| ||Process:||RTC|| ||Listed on download pages||Yes|| - ||Release Manager:||Filip Hanik (fhanik)|| = Tomcat 6.0.x = ||Spec versions:||Servlet 2.5, JSP 2.1|| ||Stable:||Yes|| - ||Enhancements:||TBD - currently Yes|| - ||Bug Fixes:||TBD - currently Yes|| + ||Enhancements:||Yes|| + ||Bug Fixes:||Yes|| - ||Security Fixes:||TBD - currently Yes|| + ||Security Fixes:||Yes|| + ||Releases:||Yes|| + ||Release Manager:||Remy Maucherat (remm)|| ||Process:||RTC|| ||Listed on download pages||Yes|| - ||Release Manager:||Remy Maucherat (remm)|| = Tomcat 6.2.x = ||Spec versions:||Servlet 2.5, JSP 2.1|| @@ -66, +65 @@ * 6.x plus * http://svn.apache.org/repos/asf/tomcat/trunk/NOTES-FOR-TOMCAT-7.txt * TBD - additional features will be added to the above file + * Anything from http://svn.apache.org/repos/asf/tomcat/trunk/NOTES-FOR-TOMCAT-6.2.txt that doesn't make it into 6.x = Unsupported versions = The following versions are no longer supported. The source is still available from SVN and both source and binary downloads are available from the archives. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Miscellaneous by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Miscellaneous The comment on the change is: Add link that got lost on move to wiki -- '''Is tag pooling broken? It doesn't call release!''' - It is not broken, your tag probably is. Many bug reports have been filed about this. Here is the bug report with all the gory details. + It is not broken, your tag probably is. Many bug reports have been filed about this. [https://issues.apache.org/bugzilla/show_bug.cgi?id=16001 Bug 16001] has all the gory details. '''Why do I get {{{java.lang.IllegalStateException}}} ?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Class Not Found by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Class_Not_Found The comment on the change is: Add Q list. Update doc refs. -- This page discusses the various ways you see Class Not Found errors or very similar errors. It is strongly advised you read the following topics: - * Classloader HOWTO pages: [http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html Tomcat 4.1], [http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html Tomcat 5.0], [http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Tomcat 5.5]. + * Classloader HOWTO pages: [http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html Tomcat 4.1], [http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Tomcat 5.5], [http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html Tomcat 6.0]. * [http://marc.theaimsgroup.com/?t=10431752924r=1w=2 Don't] [http://marc.theaimsgroup.com/?t=10438044013r=1w=2 use] [http://marc.theaimsgroup.com/?t=9694765692r=1w=2 packageless] [http://marc.theaimsgroup.com/?t=10449102012r=1w=2 classes] [http://marc.theaimsgroup.com/?t=10426557623r=1w=2 and] [http://marc.theaimsgroup.com/?t=10424974831r=1w=2 declare] [http://marc.theaimsgroup.com/?t=10299695013r=1w=2 all] [http://marc.theaimsgroup.com/?t=10292218941r=1w=2 imported classes]! * [http://marc.theaimsgroup.com/?l=tomcat-userm=103843452413727w=2 Another answer to a classloader issue] If you get a {{{NoClassDefFoundError}}} exception, the root cause might be the same as for a {{{ClassNotFound}}} exception. == Questions == + 1. [#Q1 Why is jsp:useBean is not working?] + 1. [#Q2 Why do I get java.lang.NoClassDefFoundError: javax/servlet/Filter?] + 1. [#Q3 Why do I get java.lang.NoClassDefFoundError: org/xml/sax/InputSource?] + == Answers == - '''Why is {{{ jsp:useBean }}} is not working?''' + [[Anchor(Q1)]]'''Why is {{{ jsp:useBean }}} is not working?''' Make sure: @@ -22, +26 @@ * You have fully qualified your class name (eg:{{{ com.bar.package.MyClass }}}) OR * You have imported your class into your jsp (eg: {{{ %@ pageimport=com.bar.package.MyClass% }}}) - ''' Why do I get {{{ java.lang.NoClassDefFoundError: javax/servlet/Filter}}}?''' + [[Anchor(Q2)]]'''Why do I get {{{ java.lang.NoClassDefFoundError: javax/servlet/Filter}}}?''' You probably have servlet.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet.jar should only be found only once in $CATALINA_HOME/common/lib. - ''' Why do I get {{{ java.lang.NoClassDefFoundError: org/xml/sax/InputSource }}}? ''' + [[Anchor(Q3)]]'''Why do I get {{{ java.lang.NoClassDefFoundError: org/xml/sax/InputSource }}}?''' You have conflicting XML api jar files in your classpath. Read the README or RELEASE-NOTES for more information. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Bugs by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Bugs The comment on the change is: Restore the question list. Note numbers are arbitary and can be in any order. -- If you think you found a bug, [http://tomcat.apache.org/bugreport.html read this page]. == Questions == + 1. [#Q1 I have a bug, what do I do?] + 1. [#Q2 Why does feature ABC work in Servlet Container XYZ but not in Tomcat?] + 1. [#Q3 I submitted a bug, why is it ignored?] + == Answers == - '''I have a bug, what do I do?''' + [[Anchor(Q1)]]'''I have a bug, what do I do?''' Unless you have the source code reference in Tomcat which is wrong, it may not be a bug. E-mail the [http://tomcat.apache.org/faq/tomcatuser.html user list] and confirm its a bug. Also [http://tomcat.apache.org/bugreport.html read this] first from the tomcat site about reporting a bug. - '''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' + [[Anchor(Q2)]]'''Why does feature ABC work in Servlet Container XYZ but not in Tomcat?''' There could be a good chance that the other servlet container could be implementing the spec wrong. - '''I submitted a bug, why is it ignored?''' + [[Anchor(Q3)]]'''I submitted a bug, why is it ignored?''' Any of the following may affect someone acting on a bug: * Is it a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Clustering by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Clustering The comment on the change is: Add question list to start. -- This page discusses cluster- and clustering-related questions. Please make sure to read the Clustering HowTo page in the main Tomcat documentation bundle as well. == Questions == + 1. [#Q1 Can I configure a cluster at the Engine level?] + 1. [#Q2 Show me a simple cluster configuration example.] + 1. [#Q3 How do I turn on transport logging?] + 1. [#Q4 How do I use JMX to monitor the cluster?] + 1. [#Q5 Can I pause the message sending?] + 1. [#Q6 Can I add more senders (pooled mode)?] + 1. [#Q7 What happens when I pull the network cable?] + 1. [#Q8 On my windows laptop without network my cluster doesn't work.] + 1. [#Q9 The cluster dosen't work under linux with two nodes on two boxes.] + 1. [#Q10 I get localhost rather than eth0 or another interface when using tcpListenAddress=auto.] + + == Answers == - '''Can I configure a cluster at the Engine level?''' + [[Anchor(Q1)]]'''Can I configure a cluster at the Engine level?''' Yes, beginning with Tomcat 5.5.10 you can configure clusters at both the Engine and Host levels. This helps support clustering for web hosting companies. - '''Show me a simple cluster configuration example.''' + [[Anchor(Q2)]]'''Show me a simple cluster configuration example.''' For Tomcat 5.5.10 and later: {{{ Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster defaultMode=true / }}} - '''How do I turn on transport logging?''' + [[Anchor(Q3)]]'''How do I turn on transport logging?''' * Use org.apache.catalina.cluster as logger category and switch to info, debug or trace as log level. * Configure the clusterLog attribute (logging category) to get and send and receive message log. - '''How do I use JMX to monitor the cluster?''' + [[Anchor(Q4)]]'''How do I use JMX to monitor the cluster?''' With Java 5 you can use the jconsole application to look inside the runnnig cluster: please see the JMX configuration section in the Clustering HowTo document. In fastasyncmode replication mode you can got more information with sender attributes doProcessingStats=true and queueDoStats=true. Finally, with the new JMX remote ant task you can access the state and call operations. - '''Can I pause the message sending?''' + [[Anchor(Q5)]]'''Can I pause the message sending?''' Yes, the async senders buffer the messages, but make sure the membership ping is active. With fastasyncqueue mode you can limit the max queue size. - '''Can I add more senders (pooled mode)?''' + [[Anchor(Q6)]]'''Can I add more senders (pooled mode)?''' Yes, with sender attribute maxPoolSocketLimit=40 you can have more than the default 25 sockets to transfer more parallel messages. - '''What happens when I pull the network cable?''' + [[Anchor(Q7)]]'''What happens when I pull the network cable?''' The other members will remove the instance from the cluster, but when you insert the cable again, the Tomcat instance might have completely flipped out. This is because the OS might start using 100% of the CPU when a multicast message is sent. There has not yet been a good solution for this, I will let you know when I have come up with one. (pero: I test this and I works correct with java 5 and exists when you use the cluster with JDK 1.4.x) - '''At my windows laptop without network my cluster doesn't work?''' + [[Anchor(Q8)]]'''On my windows laptop without network my cluster doesn't work.''' The Membership attribute mcastBindAddress=127.0.0.1 must be set! - '''The cluster dosen't work under linux with two nodes at two boxes?''' + [[Anchor(Q9)]]'''The cluster dosen't work under linux with two nodes on two boxes.''' Check the the following: * Is your network interface enabled for multicast? ifconfig eth0 MULTICAST * Exists a multicast route to your network interface? route add -host 228.0.0.4 dev eth0 * Is your firewall active? Then check that multicast port is on your UDP open list and the receiver TCP port is also for both machines open! - '''I get localhost rather than eth0 or another interface when using tcpListenAddress=auto.''' + [[Anchor(Q10)]]'''I get localhost rather than eth0 or another interface when using tcpListenAddress=auto.''' Change /etc/hosts so that the localhost domain resolves to the actual IP address of the NIC, eth0. Please see Bugzilla for more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Connectors by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Connectors The comment on the change is: Add anchors - ran out of time for list of questions on this page. -- '''Please note, jk2 is no longer supported. Please use mod_jk instead.''' == Questions == + - '''What is JK (or AJP)?''' + [[Anchor(Q1)]]'''What is JK (or AJP)?''' AJP is a wire protocol. It an optimized version of the HTTP protocol to allow a standalone web server such as Apache talk to Tomcat. Historically, Apache has always been much faster than Tomcat at serving static content. The idea is to let Apache serve the static content when possible, then proxy the request back to Tomcat for Tomcat related content. - '''Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?''' + [[Anchor(Q2)]]'''Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?''' * Stay away from mod_webapp, aka warp. It is deprecated and unsupported due to lack of developer interest and there are better options such as jk and jk2. It WILL NOT run on windows. * mod_jserv is unsupported and will not be supported in Tomcat 5. mod_jserv was the original connector which supported the ajp protocol. @@ -20, +21 @@ * mod_proxy. A cheap way to proxy without the hassles of configuring JK. This solution lacks sticky session load balancing. If you don't need some of the features of jk - this is a very simple alternative. * mod_proxy_ajp. With apache 2.2, mod_proxy was rewritten to support load balancing as well as a new transport called mod_proxy_ajp. This module is distributed with the Apache http server, not the Tomcat server. - '''Why should I integrate Apache with Tomcat? (or not)''' + [[Anchor(Q3)]]'''Why should I integrate Apache with Tomcat? (or not)''' There are many reasons to integrate Tomcat with Apache. And there are reasons why it should not be done too. Needless to say, everyone will disagree with the opinions here. With the performance of Tomcat 5 and 6, performance reasons become harder to justify. So here are the issues to discuss in integrating vs not. @@ -32, +33 @@ * Speed. Apache is faster at serving static content than Tomcat. But unless you have a high traffic site, this point is useless. But in some scenarios, tomcat can be faster than apache. So benchmark YOUR site. * Socket handling/system stability. Apache has better socket handling with respect to error conditions than Tomcat. The main reason is Tomcat must perform all its socket handling via the JVM which needs to be cross platform. The problem is socket optimization is a platform specific ordeal. Most of the time the java code is fine, but when you are also bombarded with dropped connections, invalid packets, invalid requests from invalid IP's, Apache does a better job at dropping these error conditions than JVM based program. (YMMV) - '''At boot, is order of start up (Apache vs Tomcat) important?''' + [[Anchor(Q4)]]'''At boot, is order of start up (Apache vs Tomcat) important?''' No. This way - either apache or tomcat can be restarted at any time independent of one another. - '''Is there any way to control the content of automatically generated mod_jk.conf-auto? I need my own specific commands added to it.''' + [[Anchor(Q5)]]'''Is there any way to control the content of automatically generated mod_jk.conf-auto? I need my own specific commands added to it.''' There really is no need to. Just copy the automatically generated mod_jk.conf-auto and edit it manually to your preference. None of production tomcat installations really use mod_jk.conf-auto as it is. - '''How do I bind to a specific ip address?''' + [[Anchor(Q6)]]'''How do I bind to a specific ip address?''' Each Connector element allows an address property. For example: @@ -53, +54 @@ For a more complete description of the Connector config, see the [http://tomcat.apache.org/tomcat-5.0-doc/config/http.html HTTP Connector docs] or the see the [http://tomcat.apache.org/tomcat-5.0-doc/config/http.html AJP Connector docs]. - '''Where can I download a binary distribution of my connector?''' + [[Anchor(Q7)]]'''Where can I download a binary distribution of my connector?''' You can't: you need to download the source and compile it for your platform. The source distributions are available from the [http://tomcat.apache.org/download-connectors.cgi standard location]. Note that JPackage.org has RPM distributions for the connectors as well as tomcat itself: [http://www.jpackage.org/ JPackage.org] - '''I'm having strange UTF-8 issues with my request parameters.''' + [[Anchor(Q8)]]'''I'm having strange UTF-8 issues with my request parameters.''' - Since tomcat 5 - does your connector have Connector
[Tomcat Wiki] Update of FAQ/Connectors by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Connectors The comment on the change is: Add question list to start. -- '''Please note, jk2 is no longer supported. Please use mod_jk instead.''' == Questions == + 1. [#Q1 What is JK (or AJP)?] + 1. [#Q2 Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?] + 1. [#Q3 Why should I integrate Apache with Tomcat? (or not)] + 1. [#Q4 At boot, is order of start up (Apache vs Tomcat) important?] + 1. [#Q5 Is there any way to control the content of automatically generated mod_jk.conf-auto?] + 1. [#Q6 How do I bind to a specific ip address?] + 1. [#Q7 Where can I download a binary distribution of my connector?] + 1. [#Q8 I'm having strange UTF-8 issues with my request parameters.] + + == Answers == [[Anchor(Q1)]]'''What is JK (or AJP)?''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Deployment by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Deployment The comment on the change is: Add question list to start. -- == Preface == This section of the FAQ discusses common questions related to web application deployment. == Questions == + 1. [#Q1 Why does tomcat 5 create context configuration files?] + 1. [#Q2 Why does the memory usage increase when I redeploy a web application?] + + == Answers == - '''Why does tomcat 5 create context configuration files?''' + [[Anchor(Q1)]]'''Why does tomcat 5 create context configuration files?''' Unlike tomcat 4.x, tomcat 5.x creates context configuration files for you in its conf/[Engine name]/[Host name] directory. This is part of the change in tomcat's configuration mechanism from version 4.x to make overall configuration more robust, flexible, and enterprise-friendly. Note, however, that this has changed the recommended deployment practices for web applications. These context configuration files are created by tomcat, but not removed by tomcat, because the user may have changed them or other files in the conf directory. The suggested practice for tomcat 5 is to place context configuration files in the META-INF/context.xml directory of your webapp, and use Tomcat's Manager webapp to deploy/undeploy your applications. More details can be found here: [http://marc.theaimsgroup.com/?l=tomcat-userm=107590945807699w=2 MARC Archive] - ''' Why does the memory usage increase when I redeploy a web application?''' + [[Anchor(Q2)]]'''Why does the memory usage increase when I redeploy a web application?''' Because the Classloader (and the Class objects it loaded) cannot be recycled. They are stored in the permanent heap generation by the JVM, and when you redepoy a new class loader is created, which loads another copy of all these classes. This can cause {{{OufOfMemoryErrors}}} eventually. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Trivial Update of FAQ by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ -- * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * [wiki:/Database Database] - Getting tomcat to talk to a database. * [wiki:/Deployment Deployment] - Questions related to web application deployment. - * [wiki:/Development] - Various IDE integration questions. + * [wiki:/Development Development] - Various IDE integration questions. * [wiki:HowTo How To] - Miscellaneous common how to's. * [wiki:/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. * [wiki:/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ The comment on the change is: Fix broken link -- * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, IIS, or have questions about tomcat-standalone. * [wiki:/Database Database] - Getting tomcat to talk to a database. * [wiki:/Deployment Deployment] - Questions related to web application deployment. - * [wiki:/Development Development] - Various IDE integration questions. + * [wiki:/Developing Developing] - Various IDE integration questions. * [wiki:HowTo How To] - Miscellaneous common how to's. * [wiki:/FDA_Validation FDA Validation] - Questions related to running Tomcat in an FDA validated environment. * [wiki:/Linux_Unix Linux / Unix] - Common questions for Linux / Unix related platforms. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Developing by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Developing The comment on the change is: Add question list to start. -- This section of the FAQ discusses common questions related to Tomcat development. == Questions == + 1. [#Q1 How do I configure Tomcat to support remote debugging?] + 1. [#Q2 How do I remotely debug Tomcat using Eclipse?] + 1. [#Q3 How do I remotely debug Tomcat using NetBeans?] + 1. [#Q4 How do I change the monitoring interval for modified resources and application reloading?] + == Answers == - '''How do I configure Tomcat to support remote debugging?''' + [[Anchor(Q1)]]'''How do I configure Tomcat to support remote debugging?''' The short answer is to add the following options when the JVM is started: {{{-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n}}} @@ -18, +23 @@ Whilst this is very useful in development it should not be used in production because of both security and performance implications. - '''How do I remotely debug Tomcat using Eclipse?''' + [[Anchor(Q2)]]'''How do I remotely debug Tomcat using Eclipse?''' This answer assumes that you have a project set up with all of the fixings and have some idea of what you're doing in this respect. If not then thats really outside the scope of this topic and more in the scope of you needing to go to [[http://eclipse.org eclipse.org]] and read up on how to use your ide, and maybe practice a little bit before you come back to this. We're also going to assume you have some idea of what a debugger is and how to use one. Make sure tomcat is started and that your app is deployed and the sources, etc are all defined as resources in your app. If you have a servlet or something, set a breakpoint where its sure to hit on the next request. Go to Run-Debug Click on Remote Java Applications, then click New. Type in the title and all. Notice that port 8000 from the Tomcat instructions. Save and run. Eclipse will connect to the VM that Tomcat is running under. Wow, that was easy! Now go type the url to submit to your servlet or whatever in your browser. Boom you hit the breakpoint right? Have fun! - '''How do I remotely debug Tomcat using NetBeans IDE?''' + [[Anchor(Q3)]]'''How do I remotely debug Tomcat using NetBeans?''' - This answer assumes that you have correctly set up a NetBeans IDE project and that you know how to use the NetBeans IDE debugger. If not, please go to http://www.netbeans.org/kb/using-netbeans/40/debug.html and read up on how to use NetBeans IDE and its debugger. + This answer assumes that you have correctly set up a NetBeans project and that you know how to use the NetBeans debugger. If not, please go to http://www.netbeans.org/kb/using-netbeans/40/debug.html and read up on how to use NetBeans and its debugger. Make sure that Tomcat is started in debug mode as described above, that your application is deployed, and that the sources are all defined as resources in your application. If you have a servlet or JSP file, set a breakpoint where you think a problem might be occurring. Go to Run-Attach Debugger. A dialog pops up to let you specify the following options: @@ -38, +43 @@ When you press OK, you have a debugging connection very similar to local debugging. - Note that NetBeans IDE has a second option -- you can debug JSP files and servlets locally using a Tomcat server that is bundled with the IDE. When you debug a JSP file or servlet in the IDE, the bundled Tomcat server automatically starts in debug mode, and the debugger connects to it. + Note that NetBeans has a second option -- you can debug JSP files and servlets locally using a Tomcat server that is bundled with the IDE. When you debug a JSP file or servlet in the IDE, the bundled Tomcat server automatically starts in debug mode, and the debugger connects to it. - '''How do I change the monitoring interval for modified resources and application reloading?''' + [[Anchor(Q4)]]'''How do I change the monitoring interval for modified resources and application reloading?''' Modify the {{{checkInterval}}} attribute value on the relevant Loader element in your web application configuration file (yourapp.xml), or in the main configuration file {{{%CATALINA_HOME%/conf/server.xml}}} if that is the one you're using. For more information, please see the [[http://tomcat.apache.org/faq/config/loader.html Loader configuration reference]]. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/FDA Validation by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/FDA_Validation The comment on the change is: Add question list to start. -- Please note that although this page mentions specific companies, we do not explicitly endorse or sell anyone's services. Tomcat and Apache are not-for-profit organizations. This page is also far from a complete listing of vendors and support options. It is meant as a demonstration showing that these options do exist and that running Tomcat in a validated environment is both feasible and reasonable. === Questions === + 1. [#Q1 Can Tomcat be used in a validated environment?] + 1. [#Q2 Has anyone actually done it?] + 1. [#Q3 Is Tomcat itself validated?] + 1. [#Q4 What kind of support is there around validating Tomcat?] + 1. [#Q5 How do I know I have a validated release? How do I know no one has tampered with the release package?] + 1. [#Q6 What about security? I'm concerned about attacks.] + === Answers === - '''Can Tomcat be used in a validated environment?''' + [[Anchor(Q1)]]'''Can Tomcat be used in a validated environment?''' Yes. There's nothing in Tomcat's design or implementation that prevent it from being used in a validated environment. The same validation procedures and guidelines that apply to most software packages apply to Tomcat as well. Being an open-source application does not preclude Tomcat validation. In fact, it helps in at least one key aspect: the source code itself can be audited, as can the commit and change logs for the software. - '''Has anyone actually done it?''' + [[Anchor(Q2)]]'''Has anyone actually done it?''' Yes. As shown in [http://marc.theaimsgroup.com/?l=tomcat-userm=109836874319797w=2 this user mailing list archive], Merck and other large companies are using Tomcat in a validated environment. In addition, there is at least one application provider ([http://www.interchangedigital.com/ Interchange Digital]) whose application runs on Tomcat that has deployed said package in numerous pharma data centers. - '''Is Tomcat itself validated?''' + [[Anchor(Q3)]]'''Is Tomcat itself validated?''' Yes. Tomcat itself is validated to the extent it can be. Tomcat implements two Java Specifications: the [http://java.sun.com/products/servlet Servlet Specification] and the [http://java.sun.com/products/jsp Java Server Pages (JSP) Specification]. Each of these specifications has a Technology Compatbility Kit (TCK), which is a collection of tests to certify a given product meets the Specification fully and accurately. @@ -26, +33 @@ However, we cannot validate your application's use of Tomcat. You're on your own there. - '''What kind of support is there around validating Tomcat?''' + [[Anchor(Q4)]]'''What kind of support is there around validating Tomcat?''' Several kinds. They include: @@ -34, +41 @@ * There are numerous vendors in addition to the above consultants, like [http://www.covalent.net/ Covalent] and [http://www.jboss.org/services/prodsupport JBoss], who offer 24/7/365 enterprise-level support for Tomcat. * The Tomcat [http://tomcat.apache.org/lists.html mailing lists] are extremely active and contain members of many of the above organizations, including contractors available for hire. - '''How do I know I have a validated release? How do I know no one has tampered with the release package?''' + [[Anchor(Q5)]]'''How do I know I have a validated release? How do I know no one has tampered with the release package?''' All Tomcat releases are signed using the Release Manager's [http://www.pgpi.org/doc/pgpintro PGP] key. The key is also available in the KEYS file that ships with every Tomcat release. The same KEYS file is also available in the Tomcat CVS repository ([http://www.apache.org/dist/tomcat/tomcat-5/KEYS here]). The PGP signatures are available on all the Tomcat download pages, and can (and should!) be used to verify the release really is the signed distribution. As for tampering: every Tomcat release is also digested using the MD5 algorithm as specified in [http://www.faqs.org/rfcs/rfc1321.html RFC1321]. The MD5 digest is included in all the download pages. Users run MD5 on their local machine to verify that the digest of what they downlaoded is the same as that published in the Apache download pages. That way, users are assured the distribution has not been modified since the Release Manager signed it. - '''What about security? I'm concerned about attacks.''' + [[Anchor(Q6)]]'''What about security? I'm concerned about attacks.''' There's no need to be. See the [http://wiki.apache.org/tomcat/FAQ/Security security page] of this FAQ for more information.
[Tomcat Wiki] Update of FAQ/Linux Unix by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Linux_Unix The comment on the change is: Add question list to start. -- == Preface == == Questions == - + 1. [#Q1 When I run ps (on Linux), why do I see my java process a bazillion times!] + 1. [#Q2 How do I run without an X server and still get graphics?] + 1. [#Q3 Tomcat dies after I log out!] + == Answers == - '''When I run ps (on Linux), why do I see my java process a bazillion times!''' + [[Anchor(Q1)]]'''When I run ps (on Linux), why do I see my java process a bazillion times!''' Linux implemented threads as processes. Due to other gory details that is beyond the scope of this FAQ - the ps command doesn't work correctly with respect to threads. You can get more gory details [http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html here] and [http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html#D here] . - '''How do I run without an X server and still get graphics?''' + [[Anchor(Q2)]]'''How do I run without an X server and still get graphics?''' You either need to run headless or run an alternate X-server. Some more information can be found [http://marc.theaimsgroup.com/?t=10480304763r=1w=2 here], [http://marc.theaimsgroup.com/?l=tomcat-userm=102335321103262w=2 here], or [http://marc.theaimsgroup.com/?l=tomcat-userm=101614645312259w=2 here]. Or if your are using a JVM 1.4 or better, you can use the system property {{{java.awt.headless=true}}} - '''Tomcat dies after I log out!''' + [[Anchor(Q3)]]'''Tomcat dies after I log out!''' - This is common complaint in Solaris. Make sure you use {{{nohup}}} and see [http://marc.theaimsgroup.com/?l=tomcat-userm=104809785114238w=2 this thread] + This is a common complaint when using Solaris. Make sure you use {{{nohup}}} and see [http://marc.theaimsgroup.com/?l=tomcat-userm=104809785114238w=2 this thread] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of FAQ/Logging by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Logging The comment on the change is: Add question list to start. Remove obsolete entry that referred to 5.0. -- As you read these questions, please keep in mind that Tomcat's internal logging is separate from your own webapp's logging. You would typically be concerned only with your own webapp's logging. You would modify Tomcat's internal logging settings if you are debugging a possible issue or running into other problems. It is anticipated that Tomcat's out-of-the-box logging configuration will be fine for the vast majority of users and environments. == Questions == + 1. [#Q1 Does Tomcat have built-in logging capabilities, and if so how do I use them?] + 1. [#Q2 How do I configure commons-logging for use with Tomcat?] + 1. [#Q3 How should I log in my own webapps?] + 1. [#Q4 Where does System.out go? How do I rotate catalina.out?] + 1. [#Q5 Where are the logs when running Tomcat as a Windows service?] + == Answers == + - '''Does Tomcat have built-in logging capabilities, and if so how do I use them?''' + [[Anchor(Q1)]]'''Does Tomcat have built-in logging capabilities, and if so how do I use them?''' The Servlet Specification requires Servlet Containers like Tomcat to provide at least a rudimentary implementation of the {{{ServletContext#log}}} method. Tomcat provides a much richer implementation than required by the Spec, as follows: @@ -16, +23 @@ In addition, Tomcat does not swallow the System.out and System.err JVM output streams. You may use these streams for elementary logging if you wish, but a more robust approach such as commons-logging or [http://logging.apache.org/log4j Log4J] is recommended for production applications. - '''How do I configure commons-logging for use with Tomcat?''' + [[Anchor(Q2)]]'''How do I configure commons-logging for use with Tomcat?''' You need to specify a commons-logging configuration file and, if you wish, a logging implementation that supports commons-logging. JDK 1.4 (and later) java.util.Logging and Log4j are the two most commonly used logging toolkits for Tomcat. If you supply an external logging toolkit such as Log4J, it needs to be located in the $CATALINA_HOME/common/lib directory (for Tomcat 5.0 and earlier) or added to the bootstrap classpath by using the scripts in $CATALINA_HOME/bin (this is required for Tomcat 5.5 and later, which uses commons-logging while bootstrapping, and optional for Tomcat 5.0 and earlier). @@ -27, +34 @@ * [http://marc.theaimsgroup.com/?l=tomcat-userm=108578233003073w=2 Example with JSVC and running on port 80.] * [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=877025 Need for it to be in bootstrap classpath.] - '''How should I log in my own webapps?''' + [[Anchor(Q3)]]'''How should I log in my own webapps?''' While you can use System.out and System.err to log, we strongly recommend using a toolkit like Log4J or JDK 1.4's java.util.logging package. With these toolkits, you have significantly more functionality (for example, sending emails, logging to a database, controlling at runtime the logging level of different classes, inspecting the logs with a graphical viewer, etc.) than with Tomcat's built-in default logging configuration. We also recommend that you separate your logging from Tomcat's internal logging. That means you should bundle your logging toolkit with your webapp. If you're using Log4J, for example, place the Log4J jar in the WEB-INF/lib directory of your webapp and the Log4J configuration file in the WEB-INF/classes directory of your webapp. This way different web applications can have different logging configurations and you don't need to worry about them interfering with each other. - '''Where does System.out go? How do I rotate catalina.out?''' + [[Anchor(Q4)]]'''Where does System.out go? How do I rotate catalina.out?''' System.out and System.err both print to catalina.out. But you can suppress this via the swallowOutput property and sent to different log files. catalina.out does not rotate. But it should not be an issue because nothing should be printing to standard output since you are using a logging package, right? [http://marc.theaimsgroup.com/?t=10554447261r=1w=2a thread about rotation of catalina.out] - '''Where are the logs when running Tomcat as a Windows service?''' + [[Anchor(Q5)]]'''Where are the logs when running Tomcat as a Windows service?''' See these mailing list archive threads: * [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=863525Where are the Tomcat logs when running as a Windows service?] - '''Are there external documents, tutorials, or
[Tomcat Wiki] Update of FAQ/Memory by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The following page has been changed by markt: http://wiki.apache.org/tomcat/FAQ/Memory The comment on the change is: Add question list to start. Add Yourkit to list of profilers. -- * [http://marc.theaimsgroup.com/?t=10301137976r=1w=2 Tomcat Out of memory] * [http://marc.theaimsgroup.com/?t=10451996172r=1w=2 Tracking memory usage over time] - Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], or [http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them. + Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], [http://www.yourkit.com/ YourKit] or [http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots of people recommend these tools. This is not an endorsement for them, I just notice other people like them. === JSP Recompilation === If your application uses JSPs which are frequently recompiled at runtime, e.g. headers that change value hourly, please make sure to read the JSP HOW-TO page and RELEASE NOTES documents. You may wish to tune the JSP compiler configuration to prevent memory leaks. Of course, these are documents you should have read by now anyways.. == Questions == + 1. [#Q1 How do I adjust memory settings?] + 1. [#Q2 Why do I get {{{OutOfMemoryError}}} errors?] + 1. [#Q3 How much memory is Tomcat/webapp/??? using?] + == Answers == - '''How do I adjust memory settings?''' + [[Anchor(Q1)]]'''How do I adjust memory settings?''' First look at {{{java -X}}} to determine what parameters to set. Then you can set them via the environment variable {{{JAVA_OPTS}}}. Read the files catalina.bat or catalina.sh for more information on JAVA_OPTS. - '''Why do I get {{{OutOfMemoryError}}} errors?''' + [[Anchor(Q2)]]'''Why do I get {{{OutOfMemoryError}}} errors?''' Many reasons. @@ -35, +39 @@ * Not actually a reason - but on your particular platform, look at the {{{java -X}}} options. They may be VERY helpful. * [http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 Your classloaders are not being garbage collected]. - '''How much memory is Tomcat/webapp/??? using?''' + [[Anchor(Q3)]]'''How much memory is Tomcat/webapp/??? using?''' * To find out how much memory Tomcat is using, you might be able to use the {{{Runtime}}} class provided by the JDK. * You can't find out how much memory a webapp is using. The JVM doesn't give us these detail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]