aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes mockQuestion from javabeat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "mockQuestion from javabeat" Watch "mockQuestion from javabeat" New topic
Author

mockQuestion from javabeat

geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208
Which of the following statements are correct regarding the import tag of JSTL?

Select 2 correct options.

A.The String value of the imported content can be made available for use outside of the tag in 'var' variable.
B.If the url contains a relative path, then the resource must exist in the same webapp.
C.import tag is more efficient than jsp:include action in the case when large amount of data is imported only to be given to another tag.
D.import tag is useful to convert URL when cookies are not supported by the client.
E.The content imported by the import tag can be made available only through a String object

AC

Here how option A is correct? var attribute is available with <c:url.. but not with ><c:import url="someUrl"/>

and also I am not able to get option C, <c:import..> is better that <jsp:include..> in the sense that it may reach out of the web application

Can anyone clear my doubt about this?
Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

Hi Geeta,

var attribute is available for <c:import>. Using var attribute you can store the string content of URL and use it somewhere else in the jsp.
for ex:
is same as

see the jstl spec http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html
Using c:import we can store large amount of data(data in url) in var attribute and this can be used in another tag as shown in above code.

-Venkat


SCJP 5.0, SCWCD 5, preparing for SCDJWS
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mockQuestion from javabeat