File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jsp:useBean tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:useBean tag" Watch "jsp:useBean tag" New topic

jsp:useBean tag

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
<jsp:useBean id="name" scope="page|request|session|application" typeSpec />
typeSpec ::= class=”className” |
class=”className” type=”typeName” |
type=”typeName” class=”className” |
beanName=”beanName” type=”typeName” |
type=”typeName” beanName=”beanName” |

if I have a bean as in package general

<jsp:useBean id = hello scope =request class = general.HelloWorld type = general.HelloWorld beanName =??/>

what will be my beanName???
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

Here's an excellent reference that should answer all of your questions:
JSP Syntax Reference

[Asking smart questions] [About Bear] [Books by Bear]
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am still not clear... with the explanation.
can anyone explain me with an example
I agree. Here's the link:
subject: jsp:useBean tag
It's not a secret anymore!