• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Translation Time

 
Ashu Jain
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Deshmukh book says that " The same Java Bean name is not used more than once in a single tranlation unit".

Does that mean , i can do something ..i should not be doing following in same JSP page . Below i am trying to get attribute named "XYZ" and "LMN" that store "MyBean" object.

<jsp:useBean id="XYZ" class="foo.MyBean" scope="Session" />

<jsp:useBean id="LMN" class="foo.MyBean" scope="Session" />

Can anyone help me in understaning the meaning of the statement
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name is the key and ought to be unique. If you're creating another bean with the same name (id), then it will override any previously created bean in the same transaction/scope.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic