• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between Class attribute and beanName attribute of jsp:useBean

 
Krupa Eng
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between the class attribute and beanName attribute of <jsp:useBean> action if tghe beanName refers to a class, rather than a serialized bean.
Thanks in advance
Krupa :
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class and beanName attributes are the same in this case other than the fact that you can define request time attribute in the beanName and not in the class.
There may be cases where the specific class used by the view depends on previous choices made or the location of the person etc.
HTH
 
Krupa Eng
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
I also found that

If we want to locate an existing bean object, but don't want to create a new instance,We can achieve this, if We specify only the Type attribute without specifying Class or beanName attributes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic