站内搜索: 请输入搜索关键词
当前页面: 图书首页 > JavaServer Pages, Second Edition

JavaServer Pages, Second Edition

[ directory ] Previous Section Next Section

3.10 Tags Learned in This Chapter

jsp:useBean Makes a bean available to a page
Parameters:
    id: The name by which this bean will be known to the rest of the page
    class: The Java class that represents the bean
    beanName: For serialized beans, indicates the file where the bean is stored
    type: For serialized beans, indicates the type
    scope: The scope梡age, request, session, or application梚n which the bean 
    is stored.
Body: Optional arbitrary JSP code or text. If present, a body will be evaluated when 
the bean is created.

jsp:useBean Sets a property in a bean
Parameters:
    name: The name of the bean; should match the id in the useBean tag
    property: The name of the property to set, or "*" to set all available properties 
    from a form
    value: If present, specifies the value to set; if not present, the value from the 
    form
Body: None

jsp:useBean gets a property from a bean
Parameters:
    name: The name of the bean; should match the id in the useBean tag
    property: The name of the property to get
Body: None

    [ directory ] Previous Section Next Section