IP Unit 5 MCQ
IP Unit 5 MCQ
Answer: a
2. Which tag should be used to pass information from JSP to included JSP?
a) Using <%jsp:page> tag
b) Using <%jsp:param> tag
c) Using <%jsp:import> tag
d) Using <%jsp:useBean> tag
Answer: a
Answer: d
Answer: a
Answer: b
Answer: a
7. Which one is the correct order of phases in JSP life cycle?
a) Initialization, Cleanup, Compilation, Execution
b) Initialization, Compilation, Cleanup, Execution
c) Compilation, Initialization, Execution, Cleanup
d) Cleanup, Compilation, Initialization, Execution
Answer: c
Answer: c
Answer: c
Answer: a
Answer: a
12. Which of the following action variable is used to include a file in JSP?
a) jsp:setProperty
b) jsp:getProperty
c) jsp:include
d) jsp:plugin
Answer: c
Answer: a
Answer: d
15. Which object stores references to the request and response objects?
a) sessionContext
b) pageContext
c) HttpSession
d) sessionAttribute
Answer: b
Answer: c
Answer: a
Answer: b
Answer: d
A - Expression Language (EL) expressions will not be evaluated and will
be treated as static text.
Answer : A
A - true
B - false
Answer : A
32. Which Error Handling in Java handles runtime errors with exceptions,
If an exception is not caught in your JSP or Servlet, Resin will use a
special error page to send results back to the browser, Resin uses a
default error page unless you explicitly provide an error page yourself?
33. The
ASP and JSP technologies are quite similar in the way they
support the creation of Dynamic pages, using HTML templates, scripting
code and components for business logic.
a. True
b. False
34. Which can generate HTML dynamically on the client but can hardly
interact with the web server to perform complex tasks like database
access and image processing etc. in JSP?
- Published on 22 Jul 15
a. vs.Static HTML
b. vs.Server-Side Includes
c. vs.Pure Servlets
d. Vs.JavaScript
35.
In JSP Action tags which tags are used for bean development?
a. jsp:useBean
b. jsp:setPoperty
c. jsp:getProperty
d. All mentioned above
36.
Which two interfaces does the javax.servlet.jsp package have?
a. JspPage
b. HttpJspPage
c. JspWriter
d. PageContext
e. Both A & B
38) JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you can
do with Java servlets.
a. True
b. False
39) How many jsp implicit objects are there and these objects are created by the web contain
that are available to all the jsp pages?
a. 8
b. 9
c. 10
d. 7
40)JavaServer
Pages often serve the same purpose as programs
implemented using the Common Gateway Interface (CGI)
a. True
b. False
41) Whichaction tags are used in JSP for developing web application
with Java Bean?
a. jsp:useBean
b. jsp:setProperty
c. jsp:getProperty
d. Both B & C
b. JSP
c. Both A & B
d. None of the above
43) Which is the Microsoft solution for providing dynamic Web content?
a. ASP
b. JSP
c. Both A & B
d. None of the above
A.1 & 2
B.1 & 3
C.2 & 3
A.jspInit()
B._jspService()
C.jspDestroy()
A.jspInit()
B._jspService()
C.jspDestroy()
D._jspRequest()
A.jspInit()
B._jspService()
C.jspDestroy()
D.init()
2. JSP translator is a part of the web server which is responsible for translating the
JSP page into Servlet.
A.only 1
B.only 2
C.Both 1 & 2
D.None
50) Which of the following folder in JSP project contains web.xml file?
A.META-INF
B.WEB-INF
C.context-root
D.Any of A & B
1. Instantiation
2. Request processing
3. Initialization
4. Classloading
5. Compilation of JSP Page
6. Destroy
A.7-5-4-1-3-2-6
B.6-5-4-1-3-2-7
C.1-5-4-7-3-2-6
D.7-5-4-3-1-2-6