• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

JSP Quiz

January 3, 2011 By j2eereference Leave a Comment




 

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
JavaServer Pages are processed by software on the ?
A
Client
B
Servver
Question 2
What is the signature of method jspInit of JspPage?
A
void jspInit(HttpServletRequest, HttpServletResponse) throws IOException, ServletException
B
void jspInit()
C
void jspInit(HttpServletRequest, HttpServletResponse)
Question 3
What is the return type of the getLastModified method of HttpServlet?
A
int
B
java.util.Date
C
java.sql.Date.
D
long
Question 4
The methods jspInit and jspDestroy of JspPage may be overriden by a JSP author
A
True
B
False
Question 5
Which statements is incorrect?
A
HttpServlet.destroy() throws ServletException
B
HttpServlet.init() throws ServletException
C
HttpServlet.service() thrwos ServletException and IOException
Question 6
Which one of the following is a valid argument for a JSP page directive?
A
extender="package.class"
B
caching="sizekb|none"
C
isThreadSafe="yes|no"
D
importer="package.class"
E
contentType="text/html"
Question 7
What is the output of the following code? <% session.setAttribute("name", "John"); %> <%= session.getAttribute("John") %>
A
null
B
John
Question 8
What is the signature of method jspDestroy of JspPage?
A
void jspDestroy(HttpServletRequest, HttpServletResponse)
B
void jspDestroy()
C
void jspDestroy(HttpServletRequest, HttpServletResponse) throws IOException, ServletException
Question 9
What is the signature of method _jspService of HttpJspPage?
A
void _jspService(HttpServletRequest, HttpServletResponse) throws IOException, ServletException
B
void _jspService()
C
void _jspService(HttpServletRequest, HttpServletResponse)
Question 10
What is the output of the following code? <% session.setAttribute("name", "John"); %> <%= session.getAttribute("name") %>
A
John
B
null
Question 11
The method _jspService of HttpJspPage should not be overriden by a JSP author
A
True
B
False
Question 12
JavaServer Pages are processed by ?
A
IIS
B
The asp.dll component
C
JSP Container
D
Web Server
Question 13
When a JSP is executed, of the following, what is most likely to be sent to the client ?
A
The compiled Servlet file
B
HTML
C
The source Servlet file
D
The source JSP file
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.
12345
678910
111213End
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!


Filed Under: JSP

Reader Interactions

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • Java Buzzwords
  • Anonymous Inner Class in Java
  • Network Programming – java.net Package
  • Java Regular Expressions
  • Method Local Inner Class in Java
  • URL Processing in Java
  • Iterator Design Pattern Implementation using Java
  • Strategy Design Pattern Implementation using Java
  • Decorator Design Pattern
  • Adapter Design Pattern Implementation using Java
  • JSF Composite Components
  • JSF UI Components
  • What is JavaServer Faces (JSF)?
  • GOF Design Patterns
  • History and Need for Design Patterns

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.