JSP Quiz
This is the JSP Quiz Page.
Start
Congratulations - you have completed JSP Quiz.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
What is the output of the following code?
<% session.setAttribute("name", "John"); %>
<%= session.getAttribute("John") %>
A | null |
B | John |
Question 2 |
When a JSP is executed, of the following, what is most likely to be sent to the client ?
A | The compiled Servlet file |
B | The source Servlet file |
C | HTML |
D | The source JSP file |
Question 3 |
Which statements is incorrect?
A | HttpServlet.destroy() throws ServletException
|
B | HttpServlet.init() throws ServletException
|
C | HttpServlet.service() thrwos ServletException and IOException
|
Question 4 |
What is the signature of method jspInit of JspPage?
A | void jspInit(HttpServletRequest, HttpServletResponse) |
B | void jspInit() |
C | void jspInit(HttpServletRequest, HttpServletResponse) throws IOException, ServletException |
Question 5 |
Which one of the following is a valid argument for a JSP page directive?
A | isThreadSafe="yes|no" |
B | importer="package.class" |
C | contentType="text/html" |
D | extender="package.class" |
E | caching="sizekb|none" |
Question 6 |
What is the signature of method jspDestroy of JspPage?
A | void jspDestroy(HttpServletRequest, HttpServletResponse) |
B | void jspDestroy(HttpServletRequest, HttpServletResponse) throws IOException, ServletException |
C | void jspDestroy() |
Question 7 |
What is the return type of the getLastModified method of HttpServlet?
A | java.sql.Date. |
B | int |
C | java.util.Date |
D | long |
Question 8 |
What is the signature of method _jspService of HttpJspPage?
A | void _jspService(HttpServletRequest, HttpServletResponse) |
B | void _jspService(HttpServletRequest, HttpServletResponse) throws IOException, ServletException |
C | void _jspService() |
Question 9 |
The method _jspService of HttpJspPage should not be overriden by a JSP author
A | False |
B | True |
Question 10 |
JavaServer Pages are processed by software on the ?
A | Servver |
B | Client |
Question 11 |
What is the output of the following code?
<% session.setAttribute("name", "John"); %>
<%= session.getAttribute("name") %>
A | null |
B | John |
Question 12 |
JavaServer Pages are processed by ?
A | IIS |
B | Web Server |
C | The asp.dll component |
D | JSP Container |
Question 13 |
The methods jspInit and jspDestroy of JspPage may be overriden by a JSP author
A | False |
B | True |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 13 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!
Leave a Reply