![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Скачать руководство пользователя страница 344](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369344.webp)
318
Developing Web Applications with ColdFusion
getAttribute
public String getAttribute(String name)
Retrieves the value of the passed attribute. Returns an empty string if the attribute
does not exist (use attributeExists to test whether an attribute was passed to the
tag). Use getAttribute(String,String) to return a default value rather than an empty
string.
The following example retrieves an attribute named DESTINATION and writes its
value back to the user:
String strDestination = request.getAttribute("DESTINATION") ;
response.write( "The destination is: " + strDestination ) ;
Parameters:
name
— The attribute to retrieve (case insensitive)
Returns:
The value of the attribute passed to the tag. If no attribute of that name was passed
to the tag then an empty string is returned.
See Also:
attributeExists, getAttributeList, getAttribute(String,String),
getIntAttribute
getIntAttribute
public int getIntAttribute(String name)
throws NumberFormatException
Retrieves the value of the passed attribute as an integer. Returns -1 if the attribute
does not exist. Throws a NumberFormatException if the attribute is not a valid
number. Use attributeExists to test whether an attribute was passed to the tag. Use
getIntAttribute(String,int) to return a default value rather than throwing an
exception or returning -1.
The following example retrieves an attribute named PORT and writes its value
back to the user:
int nPort = request.getIntAttribute("PORT") ;
if ( nPort != -1 )
response.write( "The port is: " + String.valueOf(nPort) ) ;
Parameters:
name
— The attribute to retrieve (case insensitive)
Returns:
The value of the attribute passed to the tag. If no attribute of that name was passed
to the tag then -1 is returned.
Содержание COLDFUSION 4.5-DEVELOPING WEB
Страница 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Страница 14: ...xiv Developing Web Applications with ColdFusion...
Страница 26: ...xxvi Developing Web Applications with ColdFusion...
Страница 34: ...8 Developing Web Applications with ColdFusion...
Страница 70: ...44 Developing Web Applications with ColdFusion...
Страница 84: ...58 Developing Web Applications with ColdFusion...
Страница 114: ...88 Developing Web Applications with ColdFusion...
Страница 148: ...122 Developing Web Applications with ColdFusion...
Страница 174: ...148 Developing Web Applications with ColdFusion...
Страница 208: ...182 Developing Web Applications with ColdFusion...
Страница 244: ...218 Developing Web Applications with ColdFusion...
Страница 274: ...248 Developing Web Applications with ColdFusion...
Страница 288: ...262 Developing Web Applications with ColdFusion...
Страница 300: ...274 Developing Web Applications with ColdFusion...
Страница 350: ...324 Developing Web Applications with ColdFusion...
Страница 362: ...336 Developing Web Applications with ColdFusion...