Logo of Bento frameworkspaceObject Oriented Programming


JBuilder 2007

Tip for Bento framework Part 1

Free source code example for Bento framework...

Seeing is believing! First of all, please enjoy the example of Bento framework that is running on our web site. It is the simple photo Blog where you can upload the image files by your web browser (multipart/form-data), or e-mail with file attachment. After you grasp how it works, please explore its source code. The source code of the example is included in the FREE trial version of Bento framework.

[ Try and download example ... ]

Single deployment for more than one host ...

Through mod_jk module, Apache web server can redirect the HTTP request to the Servlet running on Apache Tomcat. And one set of Servlet/JSP on Tomcat, that is waiting for the request on the local host, can accept the HTTP requests with various host headers. Please click the link below and look into the XML fragment of server.xml for Apache Tomcat 4:

[ server.xml for Tomcat 4 ... ]

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 resource consumption.

Different response for each host ...

By server.xml like above, each Servlet behaves in a same way against the HTTP request to the same request path, regardless of 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 may need to implement the Servlet that depends on the host header, and deploy this Servlet for that specific request path. And, in most cases, this is not what you want to do. To avoid it, Bento framework allows you to deploy the different View/Model per each host. Please click the links below and look into the example XML:

[ Example XML for ViewGenerator ... ]
[ Example XML for ServletWorker ... ]

By these configurations, you can define the different View/Model for each host header. Please also note that you can use the wild card character (*) as the host name, that means the same View/Model will be deployed for all the host headers.


Copyright © 1997-2008 OOP-Research CorporationTM, All Rights Reserved.

Valid XHTML 1.0! Valid CSS!