![]()
|
|||||
OOP ServletWorker API: Flexible deployment for each host header
Apache Tomcat behind the Apache web server (HTTP daemon) can accept the HTTP request for more than one host. With this Java API, Servlet can take the advantage of this feature.
Putting it all togather : OOP Bento frameworkThis Java API is now a part of OOP Bento framework. In this MVC framework by XML, you can write all the GUIs in the web application in the normal HTML, XHTML, WML, HDML or any other mark-up languages. And you no longer need to bother about the user authentication and the session tracking. Because its full working source code example will be the good starting point of this Java API, please also visit the web site of Bento framework. Related Pages:
|
|||||
Same Servlet for more than one host ...
When connect to Jakarta Apache Tomcat via mod_jk module, Apache web server can redirect the HTTP request to the Servlet on Tomcat.
And the Servlet on Tomcat, that is listening the request at the local host, can accept the HTTP request to multiple hosts.
This feature is useful when you deploy the same web application for multiple hosts, because you can avoid th duplicate installation of the same web application that results in the unnecessary consumption.
Different response for each host ...
By the above configauration, each Servlet behaves in a same way for the response to the HTTP request with the same path, regardless the host header.
In other words, the host header in the HTTP request does not affect the behavior of the Servlet.
But, only for the specific request path, there may be the case that your Servlet must send back the different response for each host.
To make it possible, you must implement the Servlet that depends on the host header, and deploy this Servlet for that specific request path.
If the deployment mechanisum allows you to deploy the different Servlet for each host, the things will be much easier.
And voilà, OOP ServletWorker
Please implements this interface for each request path. The relationship between the request path and the class name of the implementation should be written into the XML. And this XML allow you to define the relationship for each host.
DownloadThis API is now a part of Bento framework. There are the better documentations and source code examples on the web site for Bento framework. There, you will also find the link to download the entire framework or each API in it. |
|
||||
|
Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries. |
|||||
|
ALL CONTENTS COPYRIGHT 1997-2007, OOP-Research Corporation. All rights reserved. |
|||||