Could someone please explain to me the answers to the followng questions from Edurardo Cobian's mock exam?
Question 3)
Which of the following staments are correct about the following
jsp lines:
<jps:useBean id=�name� class=�java.lang.String� />
<%= name %>
1) It won't compile.
2) It is a valid jsp line and it will print the variable called name.
3) It will compile but it will always produce null as the output.
4) It will work if you create a javabean class with only one variable of type
java.lang.String.
Answer 3)
2) It is a valid jsp line and it will print the variable called name.It will work.To have valid functionality you have to set an attribute of
String type in the proper scope before it is accessed by <jsp:useBean ...>
===============================================
Question 13)
Inside the body ( <elemnent>body</element>
of which elements can you use the element
jsp
aram?
1) <jsp:include ...>
2) <jsp:forward ...>
3) <jsp
arams >
4) <servlet-params...>
Answer 13)
1)<jsp:include ...>
2) <jsp:forward ...>
3) <jsp
arams >
I don't think Answer 3 is correct because there is no <jsp
arams> tag.
Thanks,
Andy