Posts Tagged ‘Tomcat’

Hello World with JAX-RS on Tomcat 10, Jersey and JDK 17

Coding, Protocols & Specs, Technology, Web [ | ]

Sometimes the best place to start a new coding experiment is with “Hello World” (HW), the absolute minimum, often borrowed from someone else who has kindly published it for the benefit of others. The fewer assumptions made by the HW project the more useful it will be to the community. Some HW demos tend to make a lot of assumptions (IDE, build mechanism, dependency management etc.) and this presents problems for those who don’t match.

I recently created a starting point for a JAX-RS API running on Tomcat 10.1 and JDK 17, and when I looked around the Web I noticed that similar demos tended to assume Eclipse, or Maven, or Gradle and so on in the development environment. Here [click title to read more…]

Static Tomcat cluster, Apache load balancer and replicating sessions

Coding [ | | ]

The normal way to set up a Tomcat 6 cluster is to use multicast messages to manage cluster membership, with Tribes replication of session data (or deltas) to all known members. When multicasting is not supported in your network environment, static membership is an alternative you can try. It’s not as flexible, in that you cannot dynamically size a running cluster, but it has all the essential features such as session synchronization, balancing, stickiness and failover.

Assuming you are reasonably familiar with Apache httpd and Apache Tomcat, here’s the OS-neutral recipe.

Updating Tomcat after a yum install

Coding []

Problem: You have already installed Tomcat 6.0.N in CentOS (or similar) successfully, but now you want to upgrade to 6.0.M, yet yum is telling you that there’s no upgrade for Tomcat.

Under these circumstances you’ll think of installing the new binaries directly from Apache. But your existing Tomcat deployments will not be migrated, and instead of the directory links under /usr/share/tomcat6 you will have a single directory hierarchy with no links, which is probably rather different to what you are used to, and will probably break a lot of scripts that assume the files are in their current locations.

Fortunately, if you need Tomcat 6.0.M in a hurry, there’s an easy procedure to replace the essential Tomcat binaries/links without breaking [click title to read more…]