Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean instantiation from JSP

 
Ian Whitelaw
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP, shown below, which uses a JavaBean to write to an Access database. My understanding of the jsp:useBean tag is that it is will locate and use a bean if one exists, otherwise it instantiates a new one. Is this right?
If it is, why do I get a new instance of my bean whenever I submit the page, even when I specify the bean's scope as "session"? I don't appear to be getting a new session (Session ID remains the same) but the InstanceID (determined in the bean's constructor) changes every time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic