• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

jsp:useBean

 
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
 
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.
 
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
 
    Bookmark Topic Watch Topic
  • New Topic