Alright, alright, already.  I f*cked up!  I went to my boss's house this
afternoon for BBQ and beers and came home and never should have gone online.
:-)

Anyway, I think your analysis bears merit, though I have never heard of
iterative mapping as "Servlet Reflection."  And I think you mean something
like

http://myrealserver/servlets/aServlet?operation=realParameters

don't you?

But it's Friday night...how about we debate the implications of:

if( req.getMethod().equals( "HEAD")) return;

Now, who's requesting head, and what should you return?  ;-)

Cheers!
Mark

(also a Java2 Certified Programmer  ;-))

----- Original Message -----
From: "Michael Santos" <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 9:06 PM


> Servlet Reflection, explained in an old article in JavaWorld, is a
technique
> that combines servlet mapping with reflection to avoid the use of
> "if-cascades", like:
>
> String operation = request.getParameter("operation");
>
> if (operation.equals("details")) {
>    details(request, response);
> } else if (operation.equals("anotherOperation")) {
>    anotherOperation(request, response);
> } else if ...
>
> It has something to do with using the URL to identify the operation, like:
>
> http://myrealserver/servlets/aServlet/operation/?realParameters
>
> and using reflection to call the appropriate method - in this case,
> operation.
> ----------------------------------------------------
> P.S.: B4 someone starts flaming me 'bout my English, I KNOW I MAKE
MISTAKES
> :-)
>
> >From: Mark Galbreath <[EMAIL PROTECTED]>
> >Date: Fri, 6 Jul 2001 20:01:33 -0400
> >
> >Reflection is a technique whereby a Java class can inspect and manipulate
> >itself at runtime, learning what methods are available and is used in
> >JavaBeans, EJB and serialization.  I never heard of "Servlet Reflection."
> >
> >----- Original Message -----
> >From: "Sam Newman" <[EMAIL PROTECTED]>
> >Sent: Friday, July 06, 2001 4:15 AM
> >
> > > Given the standard meaning of Reflection in java, I assume you mean
the
> > > ability to find out at runtime what servlets are avaliable?
> > >
> > > ----- Original Message -----
> > > From: "Mike" <[EMAIL PROTECTED]>
> > > Sent: Friday, July 06, 2001 12:56 AM
> > > >
> > > > I heard about Servlet Reflection, could someone please explain me
what
> >is
> > > that mean? It would be nice that I can see samples on this.

___________________________________________________________________________
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