☑ MCQ PRACTICE

Web Technologies Unit 4

Practice objective questions for quick revision and examination preparation. Try answering each question before revealing the answer.

📚 Web Technologies
📖 Unit 4
🎯 MCQs
Web Technologies MCQs - Unit 4

Web Technologies MCQs - Unit 4

1

Which page directive should be used in JSP to generate a PDF page?

A contentType
B generatePdf
C typePDF
D contentPDF
Correct 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
Correct Answer A
3

Application is instance of which class?

A javax.servlet.Application
B javax.servlet.HttpContext
C javax.servlet.Context
D javax.servlet.ServletContext
Correct Answer D
4

Which option is true about session scope?

A Objects are accessible only from the page in which they are created
B Objects are accessible only from the pages which are in same session
C Objects are accessible only from the pages which are processing the same request
D Objects are accessible only from the pages which reside in same application
Correct Answer B
5

Which one is 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
Correct Answer C
6

"request" is instance of which one of the foloowing classes?

A Request
B HttpRequest
C HttpServletRequest
D ServletRequest
Correct Answer C
7

Which is not a directive?

A include
B page
C export
D useBean
Correct Answer C
8

Which is mandatory in tag?

A id, class
B id, type
C type, property
D type,id
Correct Answer A
9

Which of the following attributes are mandatory in <jsp:getProperty /> tag?

A name, property
B type, id
C name, type
D id, property
Correct Answer A
10

Which of the following is true about language attribute?

A The language attribute indicates the programming language used in scripting the servlet.
B The language attribute indicates the programming language used in scripting the html page.
C The language attribute indicates the programming language used in scripting the JSP page.
D None of the above.
Correct Answer C
11

Which of the following method can be used to read binary data stream coming from the client?

A request.getInputStream()
B response.getInputStream()
C request.getInputStreamData()
D response.getInputStreamData()
Correct Answer A
12

Which of the following is true about extends Attribute?

A The extends attribute can be used to define a subclass of generated servlet.
B The extends attribute is used to specify a superclass that the generated servlet must extend.
C Both of the above.
D None of the above.
Correct Answer B
13

Which of the following is true about isScriptingEnabled Attribute?

A The isScriptingEnabled attribute determines if scripting elements are allowed for use.
B The default value (true) enables scriptlets, expressions, and declarations.
C Both of the above.
D None of the above.
Correct Answer C
14

Which of the following is true about <jsp:useBean> action?

A useBean action first searches for an existing object utilizing the id and scope variables. If an object is not found, it then tries to create the specified object.
B useBean is used to load java beans in jsp page.
C Both of the above.
D None of the above.
Correct Answer C
15

Which of the following is true about response.sendRedirect(url)?

A The sendRedirect sends HTTP temporary redirect response to the browser.
B Request data gets lost in case of sendRedirect.
C Both of the above.
D None of the above.
Correct Answer C
16

Which of the following is true about <c:redirect> tag?

A The <c:redirect > tag redirects the browser to an alternate URL by providing automatically URL rewriting.
B The <c:redirect > tag supports context-relative URLs.
C The <c:redirect > tag supports <c:param> tag.
D All of the above.
Correct Answer D
← Back to All MCQs