• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how many instances of java bean in jsp?

 
hanumanth reddy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

If a jsp pages is accessing javabean then how many instance of that class are created ?

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on the scope of the Bean as declared in the scope attribute of the <jsp:useBean tag.
page or request = one instance per call (default)
session = one instance per session
application = one instance shared by entire web application
Bill

------------------
author of:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic