Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Apache httpd and Apache Tomcat miscellany

When you start a newly installed Apache httpd web server, you may get the following message:

httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName

It's only a warning! It means that the web server software can't work out what the computer is called; it will run as a web server anyway, but when it reports on the name if pages that it is returning to the user it will guess that they are pages. Only in a few circumstances does the browser actually use this returned information, however!

If you see a web page that just says It Works! and nothing else, you have probably got a brand new installation of Apache httpd 2.2.summat; this is the default page for that server. Why doesn't the Apache httpd team provide a nice front page? Well - they use to under 2.0.summat, but I understand that they got so many emails complaining about the web site not being what users expected that they took their name off it.

If you are building a mod_jk connector to add to your Apache httpd (mod_jk allows a Tomcat connection via ajp1.3 protocol), you MUST ensure that you build it to go with exactly the right version of httpd, If you try and install a 2.0.43 version on a 2.0.44 server (as small a difference as that!) you can have problems.

The way to do this is to configure the build as follows:
./configure --prefix=/usr/local/apache2 --with-apxs=/usr/local/apache2/bin/apxs
which uses the apxs utility that was built / loaded with your web server to provide the vital information about buffer sizes, etc, to your jk connector build.

Apache Tomcat does a lot of caching - and it's right that it should, as it's an application container and not a file server. Sometimes that can be a nuisance, and occasionally it can be more than a nuisance - it can be a major headache (if you have stepped back from an upgrade, for example).

In order to clear out work in progress and more recent temporary files from you Apache Tomcat setup, stop your Tomcat and delete the entire tmp and work directories which is where these deep hidden caches are to be found, then restart Tomcat. The first few hits to the web site after this operation may take a little longer as the directories are recreated, but they'll be recreated clean of information which has been removed from elsewhere and had remained only in the cache.

If you stop a web server and callup a page that it should have been serving on your browser "just to check that it really has stopped", you may sometimes be surprised to see the page pop up again.

Could it be that you have failed to stop the server? It could be, but it's far more likely that your browser tried to contact the server, failed, and so displayed a page it had cached locally. Hold the shift key down and reload again ... on most modern browsers, this will force a true reload, and tell you is it fails without giving you any cached versions.

The javap program tells you what symbols are defined in a java class file. And that lets you tell if a class can be run as an applet, a servlet, a stand alone program, or is something else.

[trainee@easterton classes]$ javap Smallest
Compiled from "Smallest.java"
public class Smallest extends javax.servlet.http.HttpServlet{
  public static int counter;
  public Smallest();
  public void doGet(javax.servlet.http.HttpServletRequest,
    throws java.io.IOException, javax.servlet.ServletException;
  static {};
[trainee@easterton classes]$

This is a Servlet - it extends HttpServlet, and it includes a method called doGet which means that it will respond to "href" links, to having its URL typed in to the command line, and to forms with method="GET". It does not have a POST method, nor specific code to allow it to be initialised or have its data saved when it is flushed out of memory.

There is no main method, so it cannot run as a stand alone program, and since it's a Servlet it can't be an Applet (Java does not allow multiple inheritance which would be needed for a class to double up in this way)

Above notes from today's Deploying Apache httpd and Tomcat course. We also offer a course that covers just Apache httpd if you're wanting to set up a more typical web server rather than being into the Java thing!
(written 2009-01-30)

Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A651 - Web Application Deployment - Tomcat Overview
  [49] Business is the predominant user of Tomcat, Perl and Tcl - (2004-09-15)
  [498] Why is Tomcat called Tomcat? - (2005-11-17)
  [576] Why run two different web servers - (2006-01-25)
  [659] Web Application Components - (2006-03-28)
  [1265] Apache, Tomcat, Jakarta, httpd, web server - what are they? - (2007-07-13)
  [1771] More HowTo diagrams - MySQL, Tomcat and Java - (2008-08-24)
  [1941] Server - Service - Engine - Host, Tomcat - (2008-12-14)
  [2077] Why put Apache httpd in front of Apache Tomcat - (2009-03-12)
  [2186] An FAQ on the Apache httpd and Apache Tomcat web servers, and on using them together - (2009-05-17)
  [2753] You do not just fly - that is just part of the journey - (2010-05-06)
  [3997] Servlet v JSP (Java Server Page). What is the difference? - (2013-02-06)
  [4434] Public training courses - upcoming dates - (2015-02-21)

A601 - Web Application Deployment - Apache httpd - an overview
  [924] The LAMP Cookbook - Linux, Apache, MySQL, PHP / Perl - (2006-11-13)
  [1593] Keep the client experience easy - single server contact point - (2008-03-27)
  [1897] Keeping on an even keel - (2008-11-21)
  [2038] Sticky Sessions with mod_jk (httpd to Tomcat) - (2009-02-12)
  [2054] Tuning httpd / the supermarket checkout comparison - (2009-02-26)
  [2063] Internal Dummy Connections on Apache httpd - (2009-03-02)
  [4064] Apache httpd - a robust, open source web server - (2013-04-16)

Back to
Service Excellence Awards
Previous and next
Horse's mouth home
Forward to
Python - a truly dynamic language
Some other Articles
Learning Python - many new example programs
Baby Caleb and Fortune City in your web logs?
UnboundLocalError - Python Message
Python - a truly dynamic language
Apache httpd and Apache Tomcat miscellany
Service Excellence Awards
First Class
wxPython - Introduction and sample
The Wiltshire Police
Conversion of OSI grid references to Eastings and Northings
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page

This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2016_Apa ... llany.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb