Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
Who, what or where is the Invoker? There are web sites that have a lot of pages on them, none of which is served up all that often, and there are other web sites which only host a few web applications,each of which is run in a container service such as Catalina within Tomcat. In the first case, the web site developer / maintainer wants to simply add extra pages to the appropriate directory and have them appear at their own URLs, but in the latter case (s)he will usually want to specifically point individual URLs at individual applications. And on Tomcat, this is done though the web.xml
But just occasionally under Tomcat, there's a requirement to be able to copy a Class that contains a servlet on the web server, and have it available straight away - no mucking about with web.xml
. For example, I'm training systems administrators who will be looking after a system used by Java classes (University ones, not ours!) this week, and their students need to be able to upload a class that contains a servlet, and with minimal fuss and editing, test it on the server. This is where the Invoker comes in.
To enable the invoker
... in the administrator's main web application configuration file (also called web.xml, but in the conf
directory), remove the comments that disable the Invoker in the sample file supplied with the Tomcat distribution. That extra code comes in two sections - one to define what the invoker IS and and other to define how it MAPS - and you need them both. Then kick [restart] your Tomcat.
To use the invoker for a new Servlet
... place the class file in the WEB-INF/classes
subdirectory of your web application, and visit it via a URL of the form:
is the name of your web application (directory name in the webapps
folder) and Whichone
is the class name - i.e. the file is called Whichone.class. The word "servlet" is 'hard coded' in the web.xml file - you can change it server-wide if you wish!
We go through all of this (and much, much more!) on our Deploying Apache httpd / Tomcat
course. Illustration - a waiter at Gun Wharf in Portsmouth (written 2009-02-13, updated 2009-02-15)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesA654 - Web Application Deployment - Configuring and Controlling Tomcat 
Gathering information - logging - with log4j. First steps. - (2010-11-12) 
Reading and writing cookies in Java Servlets and JSPs - (2010-02-26) 
CATALINA_OPTS v JAVA_OPTS - What is the difference? - (2009-05-09) 
Tomcat 6 - Annotated Sample Configuration Files - (2009-03-01) 
tomcat-users.xml; what a difference a space made - (2009-01-16) 
Port and Glasses - (2008-12-14) 
WEB-INF (Tomcat) and .htaccess (httpd) - (2008-08-20) 
Automatic startup and shutdown of Tomcat - (2008-02-24) 
Web page (http) error status 405 - (2008-01-12) 
Apache Tomcat Performance Tuning - (2007-09-29) 
Compressing web pages sent out from server. Is it worth it? - (2007-09-14) 
A practical example of roles - (2006-11-04) 
Browser -> httpd -> Tomcat -> MySQL. Restarting. - (2006-10-28) 
Tomcat - Shutdown port - (2006-08-18)
Some other Articles
Confidence, Customer Service and Tourism in MelkshamWiltshire Rail Service Updatehttpd, Tomcat and PHP course enhancementsError: Cant read xxxxx: no such variable (in Tcl Tk)The InvokerSticky Sessions with mod_jk (httpd to Tomcat)The Interview and The LiftJava Tag Libraries / how they work / Tomcat Deployment1234567890 ... coming up on Friday 13thThrough Snow and Flood to Linux and Tomcat
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
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).