JavaBean Objects and "useBean" Action Elements

This chapter provides tutorial notes and example codes on using JavaBean in JSP pages. Topics include what is a JavaBean; 'useBean', 'setProperty' and 'getProperty' action elements; using JavaBean objects in scripting elements; refreshing loaded JavaBean classes; Tomcat compilation error when import JavaBean classes declared in unnamed packages.

What Is a JavaBean?

"jsp:useBean" Action Elements

Servlet Class Converted from UseBean.jspx

Setting and Getting JavaBean's Properties

Using JavaBean Objects in Scripting Elements

Using Java Objects as JavaBeans

getProperty() Error on Tomcat 7

Refreshing Loaded JavaBean Classes

Importing Unnamed Package Class Error

Using JavaBean without Import Element Error

Creating JavaBean Classes in Named Packages

"NoClassDefFoundError" Exception

Conclusions:

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat 7 Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

 EL (Expression Language)

 Overview of JSTL (JSP Standard Tag Libraries)

 JSTL Core Library

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

 Outdated Tutorials

 References

 PDF Printing Version