JavaServer Page

February 4, 2007

The Show tag interesting; we already know how

Filed under: JSP Tag Libraries — webmaster @ 11:34 am

CHAPTER 8 Using JavaBeans with tags matching our property name and parameter types. If we find such a method, we assume that it is the one we seek. 1) Places the newly introspected method in the cache. ReflectionTag The class presented in listing 8.3 had nothing to do with tags (in fact, you can use it in any program that employs JavaBeans). The next class, ReflectionTag, is an abstract tag handler that integrates the JavaBeans reflection capabilities to the tag s world: Listing 8.4 Source code for the ReflectionTag base class package book.reflection; import java.beans.IntrospectionException; import java.lang.reflect.InvocationTargetException; import book.util.LocalStrings; import book.util.ExTagSupport; import book.util.BeanUtil; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.JspException; public abstract class ReflectionTag extends ExTagSupport { public static final String PAGE_ID = “page”; public static final String REQUEST_ID = “request”; public static final String SESSION_ID = “session”; public static final String APPLICATION_ID = “application”; static LocalStrings ls = LocalStrings.getLocalStrings(ReflectionTag.class); protected Object obj = null; b protected String objName = null; protected String objScope = null; protected String property = null; c protected String index = null; public void setObject(Object o) { this.obj = o; } public void setName(String name) { this.objName = name; } public void setScope(String scope) { this.objScope = scope; }

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting