Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

options for <body-content>

 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,

can we use JSP in <body-content> of <tag>. because in some mock questions i have read we cannot use scriptlets in tags.

thanks,
geeta
 
Mahesh Lohi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
geeta vemula wrote:hello all,

can we use JSP in <body-content> of <tag>. because in some mock questions i have read we cannot use scriptlets in tags.

thanks,
geeta


If you mean

<body>
<%(Any Thing)%>
</body>

Yes you can use. Scriptlets can also be used in tags say <table color="<%=(Any Thing)%>">

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this FAQ.
 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok but how we can figure out whether the tag is simple tag or custom tag, for example,

<taglib>
<uri>someuri<uri>

<tag>
<name>sometag<name>
<tag-class>sometagclass<tag-class>
<body-content>XXXX<body-content>
</tag>

<taglib>

in jsp
<%@taglib prefix="pre" uri="someuri" %>

<pre:sometag>

something goes here...

</pre:sometag>

the question: what can you write in body-content so that body of tag can have scriptlets

options are
1.JSP
2. jsp
3. tags cannot have scriplets.
4. empty.

Answer 3

In this how can we figure out whether tag is custom tag or simple tag?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but how we can figure out whether the tag is simple tag or custom tag

Without looking at the tag class, you can't.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic