Hi, I'm new to this list but I think I know what the original poster was
asking about.
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.
Anyway, take a look at JavaWorld and search for it.
----------------------------------------------------
Michael Nascimento Santos
Sun Certified Programmer for the Java 2 Platform
Analista/Consultor
Moderador SouJava - www.soujava.org.br
CPM Sistemas - www.cpm.com.br
P.S.: B4 someone starts flaming me 'bout my English, I KNOW I MAKE MISTAKES
:-)
>From: Mark Galbreath <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Servlet Reflection
>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."
>
>Cheers!
>Mark
>
>----- Original Message -----
>From: "Sam Newman" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, July 06, 2001 4:15 AM
>Subject: Re: Servlet Reflection
>
>
> > Given the standard meaning of Reflection in java, I assume you mean the
> > ability to find out at runtime what servlets are avaliable?
> >
> > sam
> > ----- Original Message -----
> > From: "Mike" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, July 06, 2001 12:56 AM
> > Subject: Servlet Reflection
> >
> >
> > > Hi,
> > >
> > > 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.
> > >
> > > Thanks,
> > >
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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