File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes options for <body-content> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "options for <body-content>" Watch "options for <body-content>" New topic
Author

options for <body-content>

geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208
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

Joined: Jun 22, 2009
Posts: 150
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

Check this FAQ.


[My Blog]
All roads lead to JavaRanch
geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

but how we can figure out whether the tag is simple tag or custom tag

Without looking at the tag class, you can't.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: options for <body-content>