SCWCD : JSP include directive or the jsp:include standard action
Questions no -1
Which of the following elements can use the element jsp:param ?
options
A)<jsp:include ...>
B)<jsp:forward ...>
C)<jsp:params >
D)All of the above
Correct answer is : D
Explanations : All of the above elememts can use jsp:param inside it.
Questions no -2
Which of the following statements are correct about the following jsp lines:
<jps:useBean id="lname" class="java.lang.String" />
<%= lname%>
options
A)It won't compile
B)It is a valid jsp line and it will print the variable called lname.
C)It will compile but it will always produce null as the output.
D)None of the above
Correct answer is : B
Explanations : It will work properly .To have valid functionality you have to set an attribute of String type in the proper scope before it is accessed by <jsp:useBean ...> .
|