JavaServer Page

February 5, 2007

The Show tag String name = data.getAttributeString(”name”); String

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

The Show tag String name = data.getAttributeString(”name”); String scope = data.getAttributeString(”scope”); if(o != null) { c if(null != name || null != scope) { return false; } } else { if(null == name) { d return false; } if(null != scope && e !scope.equals(ReflectionTag.PAGE_ID) && !scope.equals(ReflectionTag.REQUEST_ID) && !scope.equals(ReflectionTag.SESSION_ID) && !scope.equals(ReflectionTag.APPLICATION_ID)) { return false; } } if((null != data.getAttribute(”index”)) && f (null == data.getAttribute(”property”))) { return false; } return true; } } B The object attribute must be the product of a runtime expression. C If the object was provided through a runtime expression, the name and scope attributes should not be used. D If the object is not provided through a runtime expression, we must provide a variable name. E The scope value must be one of the four defined scopes. F We cannot provide an attribute index without specifying a property. ShowTag s TLD All that is left for us to do before using ShowTag in a JSP file is to create a TLD (listing 8.7). Note in this listing that not all the attributes are mandatory. This loss of control is required by the flexible functionality that was required from the tag. Listing 8.7 Tag library descriptor entry for ShowTag show

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat 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