• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Scripting in body of Custom Tags

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guyz,

I'm very confused about this thing.

Simple tag cannot have scripting in their body, because JspFragment must not contain any scripting elements.
So the <body-content> tag in tld file, cannot have a value
<body-content>JSP</body-content>

Now my question is, are classic tags allowed to have scripting in their bodies, i mean can i write something like this :

<%! int i%>
<my:ClassicTag>
<%=i++;>
</my:ClassicTag>

If they are not, then what is <body-content>JSP</body-content> used for. I mean if it is not used with Simple Tag, Tag File, where is it used??

Please clearify....

thankz,

puneet
SCJP, SCBCD 1.3
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

classic tags can have scripting in it's body.
so this
<%! int i%>
<my:ClassicTag>
<%=i++;>
</my:ClassicTag>
is possible.
and you have to use <body-content>JSP</body-content> in the DD for the tag.

regards,
sarang
 
Puneet Vashisht
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thankx buddy, u very right
 
reply
    Bookmark Topic Watch Topic
  • New Topic