Tomcat
Tomcat is one of the most popular Apache projects and is the leading open source Java Web Application Server implementation which acts as a Servlet container while also supporting JSP, JSF, JNLP and a number of other Java-powered web technologies.
Contents
Server versions
- Apache Tomcat Versions: http://tomcat.apache.org/whichversion.html
TomEE
Tomcat offers only the basic Servlet, JSP, JSTL, JSF and related Java Web technologies. It does not include additional JEE features such as Database connectivity (JPA), JMS messaging, etc. TomEE is the Java (now Jakarta) EE full stack of libraries and dependencies added to a specific Tomcat version. There are TomEE versions available for Tomcat 7+.
- TomEE: http://tomee.apache.org | EXAMPLES (adds full J2EE support to basic Tomcat which only supports Servlets, JSP, JSTL and basic JSF... with TomEE we can also use EJB, JPA, JMS, JAX-WS, JAX-RS, etc)
Coyote
Standalone full web server version of Tomcat for older versions.
- Coyote configs for Apache Tomcat 4.x: https://tomcat.apache.org/tomcat-4.1-doc/config/coyote.html
Features
Java Servlets
Commonly used to build lightweight Web Services through associated both internal/external APIs.
See: Servlet
Java Server Pages
Java Expression Language
- JDK6+ docs - Java EL: https://docs.oracle.com/javaee/6/tutorial/doc/gjddd.html
- Apache Commons - Java Expression Language library (JEXL): https://commons.apache.org/proper/commons-jexl/
WebSockets
See: WebSockets
DBCP
DataBase Connection Pooling (DBCP).
- Tomcat docs -- JDBC pool - Common Attributes: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes
- Understanding the Database Connection Pool (DBCP) Properties: https://dzone.com/articles/understanding-the-database-connection-pool-dbcp-pr
Tools
- Apache JServ Protocol (AJP) connector: https://tomcat.apache.org/tomcat-10.0-doc/config/ajp.html (Tomcat-->Apache connector)[7]
Resources
- OWASP - Securing Tomcat: https://www.owasp.org/index.php/Securing_tomcat
- Apache Tomcat Hardening & Security Guide: https://geekflare.com/apache-tomcat-hardening-and-security-guide/
- Comparing The Performance of J2EE Servers: http://www.webperformance.com/library/reports/ServletReport/#servers
- The Apache-Tomcat Connector (AJP): http://tomcat.apache.org/connectors-doc/ (Apache Web Server to Java Web Server connector)
- AJP Connector docs: http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
- Tomcat logging: http://tomcat.apache.org/tomcat-6.0-doc/logging.html
- Is there a comprehensive list of tomcat roles?: https://stackoverflow.com/questions/17433445/is-there-a-comprehensive-list-of-tomcat-roles
- Tomcat - The Definitive Guide, 2nd ed. (BOOK): https://www.oreilly.com/library/view/tomcat-the-definitive/9780596101060/ | Ch.6 - Securing Tomcat with SSL
- Redis - Tomcat Session Management: https://github.com/redisson/redisson/tree/master/redisson-tomcat[8]
Tutorials
- How to Install Apache Tomcat 7/8 (on Windows, Mac, Ubuntu): http://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html
- Tutorial - Installing Tomcat 7 and Using it with Eclipse: http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html
- Installing Tomcat 7 and Configuring as Server in NetBeans: http://technology.amis.nl/2012/01/02/installing-tomcat-7-and-configuring-as-server-in-netbeans/[9][10]
- Tomcat not starting with XAMPP: https://stackoverflow.com/questions/13994705/tomcat-not-starting-with-xampp
- Guide to Tomcat Manager Application: https://www.baeldung.com/tomcat-manager-app
- How to Deploy a WAR File to Tomcat: https://www.baeldung.com/tomcat-deploy-war[11]
- Embedding Tomcat Into Java Applications: http://onjava.com/pub/a/onjava/2002/04/03/tomcat.html
- Using an Embedded Tomcat with Maven tomcat plugin: http://www.xicojunior.com/blog/2014/01/20/using-an-embedded-tomcat-with-maven-tomcat-plugin/
- Tomcat – java.security.AccessControlException - access denied (logging.properties read): http://www.mkyong.com/tomcat/tomcat-javasecurityaccesscontrolexception-access-denied-loggingproperties-read/
- HOWTO - Disable HTTP Methods in Tomcat: https://www.techstacks.com/howto/disable-http-methods-in-tomcat.html
- Configure Tomcat to accept HTTP PUT command (for specific paths/roles): http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.html
- How to make Apache Tomcat accept DELETE method via CORS: https://stackoverflow.com/questions/17853812/how-to-make-apache-tomcat-accept-delete-method
- Using Tomcat’s `tomcat-users.xml` with Jakarta Security in TomEE: https://www.tomitribe.com/blog/using-tomcats-tomcat-users-xml-with-jakarta-security-in-tomee/
- Securing a Web Application in NetBeans IDE: https://netbeans.org/kb/docs/web/security-webapps.html
- Using Apache Tomcat In Production - Tools, Tips, and Tricks: http://www.mulesoft.com/tcat/tomcat-in-production
- How to set up a cluster with Tomcat 8, Apache and mod_jk : http://blog.c2b2.co.uk/2014/04/how-to-set-up-cluster-with-tomcat-8.html
- Tomcat Clustering - A Step By Step Guide: http://www.mulesoft.com/tcat/tomcat-clustering
- Tomcat Clustering Series Part 1 -- Simple Load Balancer: http://www.ramkitech.com/2012/10/tomcat-clustering-series-simple-load.html
- Tomcat Clustering Series Part 2 -- Session Affinity Load Balancer: http://www.ramkitech.com/2012/10/tomcat-clustering-series-part-2-session.html
- Tomcat Clustering Series Part 3 -- Session Replication: http://www.ramkitech.com/2012/11/tomcat-clustering-series-part-3-session.html
- Tomcat Clustering Series Part 4 -- Session Replication using Backup Manager: http://www.ramkitech.com/2012/12/tomcat-clustering-series-part-4-session.html
- Tomcat Clustering Series Part 5 -- NginX as Load Balancer: http://www.ramkitech.com/2013/01/tomcat-clustering-series-part-5-nginx.html
- Load Balancing Apache Tomcat with Nginx: http://java.dzone.com/articles/load-balancing-apache-tomcat
- Two most commonly misconfigured Tomcat performance settings: http://www.theserverside.com/tip/Two-most-commonly-misconfigured-Tomcat-performance-settings
- Configure Tomcat for production deployment: http://wiki.razuna.com/display/ecp/Configure+Tomcat+for+production+deployment
- Tomcat 7 Clustering Guide: http://www.openlogic.com/blog/bid/215898/Enterprise-Apache-Tomcat-7-Clustering-Designing-an-Efficient-Reliable-and-Productive-Application-Server-Cluster
- Tomcat 6 HOWTO DOC -- Built-In Clustering: http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
- Quick and Dirty Test for Thread Leakage in Java: http://java.dzone.com/articles/quick-and-dirty-test-thread
- Secure Tomcat Hosting - Restrict Access to Your Web Application: https://dzone.com/articles/secure-tomcat-hosting-restrict-access-to-your-web
- GraalVM 20.0 -- Run Tomcat as Native Image on Windows: https://www.infoq.com/news/2020/03/graalvm-20-tomcat-native-windows/
- How to setup JNDI Database Connection pool in Tomcat - Spring tutorial: https://javarevisited.blogspot.com/2018/07/how-to-setup-jndi-database-connection-pool-tomcat-spring-example-tutorial.html
- How do I use a JDBC Realm with Tomcat and MySQL?: https://www.avajava.com/tutorials/lessons/how-do-i-use-a-jdbc-realm-with-tomcat-and-mysql.html
[12] [13] [14] [15] [16] [17] [18] [19] [20] [21]
- Step by Step guide to Enable HTTPS or SSL correct way on Apache Tomcat Server – Port 8443: https://crunchify.com/step-by-step-guide-to-enable-https-or-ssl-correct-way-on-apache-tomcat-server-port-8443/
- Tomcat authentication with request headers: https://stackoverflow.com/questions/34185818/tomcat-authentication-with-request-headers
- Add CORS headers to Tomcat server configuration: http://docs.motechproject.org/en/latest/deployment/CORS_Headers.html#tomcat-web-server-config
- How to fix "Tomcat casting servlets to javax.servlet.Servlet instead of jakarta.servlet.http.HttpServlet": https://stackoverflow.com/questions/65703840/tomcat-casting-servlets-to-javax-servlet-servlet-instead-of-jakarta-servlet-http/65704617#65704617
- Tomcat 10.x throws java.lang.NoClassDefFoundError on javax.servlet.*: https://stackoverflow.com/questions/66711660/tomcat-10-x-throws-java-lang-noclassdeffounderror-on-javax-servlet
External Links
- Apache Tomcat: http://tomcat.apache.org/
- wikipedia: Apache Tomcat
- A Simple Guide To Tomcat Logging: http://www.mulesoft.com/tomcat-logging
- How to configure mod_proxy_ajp with Tomcat?: http://www.zeitoun.net/articles/configure-mod_proxy_ajp-with-tomcat/start
- How to run Tomcat on Port 80: http://www.klawitter.de/tomcat80.html
- Tomcat – java.lang.OutOfMemoryError: PermGen space: https://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/[22][23][24]
- Tutorial -- Using Tomcat 6 with Eclipse: http://www.coreservlets.com/Apache-Tomcat-Tutorial/eclipse.html
- Apache Unleashes New Tomcat 7 Open Source Web Server (June 29, 2010): http://www.devx.com/DailyNews/Article/45070?trk=DXRSS_
- Tomcat 5 on Fedora Core 6 - In Five Easy Steps: http://www.weiqigao.com/blog/2007/01/14/tomcat_5_on_fedora_core_6_in_five_easy_steps.html
- Tomcat 6 Fedora 15: http://forums.fedoraforum.org/showthread.php?p=1488453#post1488453
- What is Tomcat default administrator password?: http://www.mkyong.com/tomcat/tomcat-default-administrator-password/
- In Defense of Tomcat (in PROD): http://java.dzone.com/articles/defense-tomcat
- Comparing Apache Tomcat Performance Across Platforms: http://www.webperformance.com/library/reports/windows_vs_linux_part1/
- Comparing Apache Tomcat Performance Across Platforms: http://www.webperformance.com/library/reports/windows_vs_linux_part2/
- tcnative-1.dll Can't load AMD 64-bit .dll on a IA 32-bit platform: http://stackoverflow.com/questions/14048773/tcnative-1-dll-cant-load-amd-64-bit-dll-on-a-ia-32-bit-platform
- Servlets and Tomcat -- 23+ Years and Counting: https://www.tomitribe.com/blog/servlets-and-tomcat-23-years-and-counting/
- Tomcat 10.x released: https://tomcat.apache.org/tomcat-10.0-doc/changelog.html#Tomcat_10.0.2_(markt)
References
- ↑ TomEE vs. Tomcat: https://tomitribe4.wpengine.com/blog/tomee-vs-tomcat/
- ↑ Using the TomEE Maven Plugin: https://www.tomitribe.com/blog/using-the-tomee-maven-plugin/
- ↑ Configuring JDBC in TomEE: https://tomitribe4.wpengine.com/blog/configuring-jdbc-in-tomee/
- ↑ Apache TomEE Jakarta EE certified after 10 years: https://www.tomitribe.com/blog/apache-tomee-jakarta-ee-certified-after-10-years/
- ↑ How-to: Modify Apache-Coyote/1.1 Banner: https://securitythoughts.wordpress.com/2011/03/30/how-to-modify-apache-coyote1-1-banner/
- ↑ Metasploitable/Apache/Tomcat and Coyote: https://charlesreid1.com/wiki/Metasploitable/Apache/Tomcat_and_Coyote
- ↑ wikipedia: Apache JServ Protocol
- ↑ Redis-Based Tomcat Session Management: https://dzone.com/articles/redis-based-tomcat-session-management?edition=689399
- ↑ How to deploy Maven based war file to Tomcat: https://www.mkyong.com/maven/how-to-deploy-maven-based-war-file-to-tomcat/
- ↑ How to deploy to Tomcat from NetBeans?: https://stackoverflow.com/questions/2781057/how-to-deploy-to-tomcat-from-netbeans
- ↑ Deploying your built ".war" file from Jenkins to Tomcat: https://www.jdev.it/deploying-your-war-file-from-jenkins-to-tomcat/
- ↑ Tomcat docs -- Realm how to: https://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html
- ↑ Realm name in tomcat (web.xml): https://stackoverflow.com/questions/10892336/realm-name-in-tomcat-web-xml
- ↑ Tomcat Realm - Tutorial & Examples: https://javapipe.com/blog/tomcat-realm/
- ↑ Tomcat security constraint for valid user: https://stackoverflow.com/questions/1089600/tomcat-security-constraint-for-valid-user
- ↑ Purpose of roles tags in tomcat-users.xml?: https://stackoverflow.com/questions/14948212/purpose-of-roles-tags-in-tomcat-users-xml
- ↑ Example web application layout: https://www.thecoderscorner.com/team-blog/hosting-servers/17-setting-up-role-based-security-in-tomcat/
- ↑ web.xml Reference Guide for Tomcat: http://wiki.metawerx.net/wiki/Web.xml
- ↑ Specifying an Authentication Mechanism in the Deployment Descriptor: https://docs.oracle.com/cd/E19798-01/821-1841/bncbn/index.html
- ↑ Creating the Login Form and the Error Page: https://docs.oracle.com/cd/E19798-01/821-1841/bncca/index.html
- ↑ Define a <security-constraint> outside of web.xml (e.g. server-wide): https://stackoverflow.com/questions/18242619/define-a-security-constraint-outside-of-web-xml-e-g-server-wide?noredirect=1&lq=1
- ↑ Tomcat - java.lang.OutOfMemoryError -- PermGen space: https://web.archive.org/web/20150209143431/https://www.eukhost.com/forums/f33/tomcat-java-lang-outofmemoryerror-permgen-space-7675/
- ↑ java.lang.OutOfMemoryError -- PermGen space: https://web.archive.org/web/20100829022237/http://www.webteches.com/javalangoutofmemoryerror-permgen-space/
- ↑ java.lang.OutOfMemoryError -- PermGen space (response): http://www.liferay.com/community/forums/-/message_boards/message/1806667#_19_message_1785380
See Also
Apache | Apache Web Server | Java/JPA | JSP/JSTL | Servlet | WebWorkers