You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Klemme, Robert, myview" <ro...@myview.de> on 2001/01/31 16:12:17 UTC

Q: Why using introspection and reflection inside a compiled JSP?

hi all,

this might be regarded as a user question but i think this is so much
internal that this is the right list to post to.  if not, please excuse me.
i will then repost on the users list.

ok, here's what i'd like to know: looking at the java code generated from a
JSP i found this:

in the JSP (the details of the tag are irrelevant.  the important thing is
the property):
<my:tag foo="false">

in the generated .java file:
JspRuntimeLibrary.introspecthelper(_jspx_th_my_tag_0,
"foo","false",null,null, false);

since the type of the attribute can be determined at compile time i wonder
why introspection / reflection is used inspite of the performance drawback.
did i overlook something?  can anyone anser this?  thank you!

	robert

-- 
Robert Klemme
Software Engineer
-------------------------------------------------------------
myview technologies GmbH & Co. KG
Riemekestraße 160 ~ D-33106 Paderborn ~ Germany
E-Mail: mailto:robert.klemme@myview.de
Telefon: +49/5251/69090-321 ~ Fax: +49/5251/69090-399
-------------------------------------------------------------