Exercises, examples and other material relating to training module A655. This topic is presented on public courses
Deploying Apache and Tomcat,
Deploying Java Applications on Linux / Unix
Tomcat's an excellent server, but it doesn't have quite the facilities and acceptance that Apache httpd and Microsoft's IIS have. Fortunately, you can get the best of both Tomcat and another server by running them in careful co-operative co-existence on the same host computer.
Related technical and longer articles
Load balancing and robustness - httpd, tomcat, PHP, Servlets, MySQLThe proxy jServ, jk, jk2, warp and jk story
Articles and tips on this subject | updated |
3999 | Handling failures / absences of your backend server nicely It's good for your website to put a professional smile on it's face, even when it's having problems with its backend!
On high traffic sites (for example - TV show and news sites), backend servers can occasionally get overloaded and you'll want your web site visitor to get a message to that effect, ... | 2013-02-08 |
3018 | Tuning Apache httpd and Tomcat to work well together If you're running Tomcat as your servlet / JSP container, you're more than likely to have it (or them - you may have multiple instances) running as application servers behind Apache httpd (the Http server) or behind a pair of Http servers. That just like having a team of people providing a service (let's ... | 2010-10-28 (longest) |
2482 | Load balancing with sticky sessions (httpd / Tomcat) Subject: Load balancing with sticky sessions, using Apache http server (version 2.2.14 in my example) with mod_proxy_balancer as the front end balancer and Apache Tomcat 6.0.20 as the application engine. [[Tip should also work for other recent 2.2.x and 6.0.x versions]]
Background
When you have too ... | 2009-10-30 (longer) |
1938 | Predictive Load Balancing - PHP and / or Java Load Balancing Algorithms - the standard offerings
How do you share out the requests when you're load balancing? The computer (or other device) that's sharing out the load needs to make a decision as to where it should forward each request, and there are a number of different option commonly available.
a) ... | 2008-12-15 (longer) |
1944 | Forwarding session and cookie requests from httpd to Tomcat If you're using mod_proxy to forward requests that use sessions to other servers, you need to ensure that the cookies get correctly rewritten as they're sent to the browser for setting, in order to reflect the URL of the customer facing server rather than the back end server.
Here's an example where ... | 2008-12-15 |
1940 | URL rewriting with front and back servers If you ask someone to double a number, they'll come back to you and tell you twice the number you gave them - give the "3" and they'll say "6". But if you tell them to double the number every time they handle it, but refer it to someone else for them to validate it, you'll get "12" back. Since they ... | 2008-12-14 |
1771 | More HowTo diagrams - MySQL, Tomcat and Java Here are some more diagrams "off the wall" from last week - showing "howto" and "whatis" information for Tomcat, Java and MySQL
Some Tomcat and Java Fundamentals
On the right of the board ... the main java programs ...
• the Java compiler is called javac
• the Java Virtual machins is in a ... | 2008-08-24 (longest) |
576 | Why run two different web servers You wouldn't choose to use a Ford Ka as your car for that holiday of a lifetime travelling across Europe, neither would you choose a Jaguar as your idea car for the school run. Yet both of them are perfectly good models of car. Indeed as a family, you might have one of each.
Apache httpd and Apache ... | 2008-05-04 |
1552 | Extra public classes in deploying Apache httpd and Tomcat We have just scheduled an additional two Deploying Apache httpd and Tomcat courses, to start on Monday 3rd and Wednesday 5th March 2008. This course is "flavour of the month" - I ran such a course the week before last, a tailored private course last week ... and I have another public course scheduled ... | 2008-02-24 |
1376 | Choosing between mod_proxy and mod_rewrite If you're connecting an Apache httpd server to an Apache Tomcat server, you can do so via proxied http requests - i.e. have your customer facing http server relay the request on, perhaps having modified it, to Tomcat and then passing the response back. Two different Apache modules give you the facility ... | 2008-02-23 |
1549 | http, https and ajp - comparison and choice In a web scenario, client to server traffic is usually carried using an http (HyperText Transfer Protocol) transport. That's both from browser to public facing server, but also in ongoing transfers from the public facing server to other servers which provide content or run business logic in many applications.
But ... | 2008-02-23 (longer) |
1383 | Monitoring mod_jk and how it is load balancing Apache httpd with mod_jk has the ability to balance the load forwarded to a number of instances of a Java application running in different Tomcat containers, probably on different host c.p.u.s in most circumstances. I covered this a few days ago - see here for details.
But there's a follow up question ... | 2007-10-07 |
631 | Apache httpd to Tomcat - jk v proxy Many of our customers run both the Apache httpd and Apache Tomcat web servers - with good cause, since Tomcat is biased towards web applications where the same code is run many, many times over and httpd is biased towards serving pages and is better tuned for a much larger number of different pages but ... | 2006-06-09 |
436 | Linking Apache httpd to Apache Tomcat Current connectors are jk and proxy; jserv, warp and jk2 are deprecated. As well as httpd and Tomcat downloads, you'll need mod_jk and then you'll need to configure it. I've seen some long explanations ... so here's a "bare bones" for the configuration files:
Onto the end of httpd.conf:
LoadModule ... | 2006-06-05 |
Examples from our training material
Background information
Some modules are
available for download as a sample of our material or under an
Open Training Notes License for free download from
[here].
Topics covered in this module
Do I run both Apache httpd and Apache Tomcat?.
Connection options.
Using two separate server daemons on a single host.
Connecting via a proxy from Apache to Tomcat.
Setting up httpd to act as a proxy.
Setting up Tomcat to handle proxied requests from httpd.
Running Tomcat from httpd with jk2 with AJP.
Installing and configuring mod_jk2 in httpd.
Other deprecated connectors.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Linux and LAMP,
Ruby,
Lua,
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if
you live in a different
country or continent to us.
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.