I found a very interesting article in Servlet Central Magazine, March 1999
(http://www.servletcentral.com/) on using reflection to process requests. It
has demo with source code demonstrating using a single servlet to manage
requests for all your transaction types (in other words, using one servlet
to manage requests for your entire web site). I ran the demo on my unix box,
and it works fine.

This technique is very powerful. From a design perspective, the UI and the
processing components are separated, with obvious virtues. It is also highly
extensible, since adding new transactions only requires specifying a new
transaction type in the initialization, and then extending the generic
transaction class.

If you have ever worked in a servlet environment with a bunch of people with
varying levels of experience all designing servlets for the same project at
the same time, then this technique becomes very appealing, because you
isolate the web server communication logic from the other processing and
domain logic. In other words, all of your Java developers do not have to be
servlet developers. There are any number of other virtues as well.

By the way, the demo falls short of showing the full independence of the
servlet because the number of params is hardcoded. I brought this to the
writer's attention and he showed me how to complete the design properly. Let
me know if you are interested in taking it further.

Tim Clotworthy

-----Original Message-----
From: Rick Gibbs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 13, 1999 3:40 PM
To: [EMAIL PROTECTED]
Subject: Servlets and Introspection


I was just looking back on a couple servlet related projects that I had been
working on and started to notice that alot of the code that I wrote was
getting parameters from the request and setting attributes of different
objects.  With JSP and beans there is introspection but I was wondering if
anyone implemented something similar for servlets.  You could have some sort
of function that took a request and set the attributes of a object where
they matched up.  Does this sound like something that has been done or could
be done?  Anybody have advice on how we could go about implementing this?

Thanks

    Rick

_________________________________
Rick Gibbs
earthcars.com, Inc.
[EMAIL PROTECTED]
http://earthcars.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to