Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:useBean

 
Vineela Devi
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone gimme an example of how to use beanName attribute of the <jsp:useBean>tag and also whats the significance of it.

Regards,
Vineela
 
Radhika Jonnalagadda
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Vineela,

This is an excerpt from JSP Spec.

<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� |
type=�typeName�
If the action has a body, it is of the form:
1-104 STANDARD ACTIONS
JavaServer Pages 2.0 Specification
<jsp:useBean id="name" scope="page|request|session|application" typeSpec >
body
</jsp:useBean>


beanName
--------
The name of a bean, as expected by the instantiate method
of the java.beans.Beans class.
This attribute can accept a request-time attribute expression
as a value.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I addition :

The name of a bean, as excepted by the instantiate method of java.beans.Beans class.
beanName must be of the form a.b.c, which may be either a class, or the name of a resource of the form a/b/c.ser that will be resolved in the current ClassLoader.

That is the beanName find the class exaclty like the class attribute. or it can use the serialized object from the file system which haveextension .ser instead of class.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic