May 2001
Intermediate to advanced
1088 pages
30h 13m
English
When you want to use a Java bean within a Java Server Page, use the <jsp:useBean> tag to either create a new instance of the bean or use an existing bean. The idea behind the <jsp:useBean> tag and its associated helper tags is that you should try to move as much of your application logic as possible out of your JSP so all that remains is code to display the output.
When you encapsulate business objects or business logic into a Java class, you should make that Java class a bean. Many of Sun's Java APIs and tools revolve around the idea that you put your logic into beans and then use tools to help you create applications that use those beans. JSP is one of those tools.
When you add a bean to a JSP, ...
Read now
Unlock full access