JSP Tutorials - Herong's Tutorial Examples - Version 4.03, by Dr. Herong Yang
Value Type Conversion
This section describes basic rules on how JSP server determines which setter method to call and how to convert the attribute value to match the setter method parameter.
In my previous example, the attribute value is passed to the tag object property as a string data type. Can we pass attribute values to tag object as other data types or objects? The answer is yes. JSP tag extension facility will try to convert attribute values to the data types of the tag object properties. I couldn't find any official specifications on the match rules. The following is my guesses:
Last update: 2012.
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat 7 Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Tag Attributes Are Tag Object Properties
Setter Method Example - EchoTag.java
Value Type Conversion Example - AttValueTag.java
Accepting EL Expression Example
Passing Expression as String Example
Using jsp:attribute Action Elements