• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in HFSJ page-567

 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a doubt in HFSJ on custom tag development. The question is:
It is said in HFSJ that "For each attribute declared and specified in a Tag File, the container creates a page scoped attribute with the same name.

Can anybody clarify this?

Thanks in advance.
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Any solutions?


Thanks in advance.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP.8.3 Semantics of Tag Files
For each attribute declared and specified, a page-scoped variable must be created in the page scope of the JSP Context Wrapper. The name of the variable must be the same as the declared attribute name. The value of the variable must be the value of the attribute passed in during invocation. For each attribute declared as optional and not specified, no page-scoped variable is created. If the tag accepts dynamic attributes, then the names and values of those dynamic attributes must be exposed to the tag file as specified in Table JSP.8-2.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"For each attribute declared and specified in a Tag File, the container creates a page scoped attribute with the same name


Suppose in tag file you have

<%@attribute name="var1" %>
<%@attribute name="var2" %>

These 2 attributes viz... var1 and var2 are page scoped..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic