InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.2: Developing JSP files >
4.2.2.3: Overview of JSP file content >
4.2.2.3.5: JSP syntax: useBean tag >
4.2.2.3.5.1: JSP syntax: <jsp:useBean> tag

4.2.2.3.5.1: JSP syntax: <jsp:useBean> tag

Use the <jsp:useBean> tag to locate or instantiate a JavaBeans component. The syntax for the <jsp:useBean> tag is:



<jsp:useBean

  id="beanSomeName"
 scope="page|request|session|applicaton"
{ class="package_class" |
 type ="package_class" |
 class="package_class" type ="package_class" |
 beanName="{package.class| <%= expression%>}" type ="package_class"
}
{ />|
 > other elements
 </jsp:useBean>
}

See Sun's JSP syntax reference for a description of the <jsp:useBean> attributes and examples.

Go to previous article: JSP syntax: useBean tags Go to next article: JSP syntax: Accessing bean properties

 

 
Go to previous article: JSP syntax: useBean tags Go to next article: JSP syntax: Accessing bean properties