Menu

Objective Type Questions & Answers


Web Technologies -Unit-4 (JSP) Objective Type Questions



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

A . contentType

B . generatePdf

C . typePDF

D . contentPDF

Answer



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



3.Application is instance of which class?

A . javax.servlet.Application

B . javax.servlet.HttpContext

C . javax.servlet.Context

D . javax.servlet.ServletContext

Answer



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

Answer



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

Answer



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

A . Request

B . HttpRequest

C . HttpServletRequest

D . ServletRequest

Answer



7.Which is not a directive?

A . include

B . page

C . export

D . useBean

Answer



8.Which is mandatory in tag?

A . id, class

B . id, type

C . type, property

D . type,id

Answer



9. Which of the following attributes are mandatory in  tag?

A . name, property

B . type, id

C . name, type

D . id, property

Answer



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.

Answer



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()

Answer



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.

Answer



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.

Answer



14. Which of the following is true about  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.

Answer



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.

Answer



16. Which of the following is true about  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.

Answer



17.

A .

B .

C .

D .

Answer





Relevant Materials :

Web Technologies -Unit-1 (PHP) Objective Type Questions - [ Web Technologies ]

Web Technologies -Unit-2 (XML) Objective Type Questions - [ Web Technologies ]

Web Technologies -Unit-3 (Servlets) Objective Type Questions - [ Web Technologies ]

Web Technologies -Unit-4 (JSP) Objective Type Questions - [ Web Technologies ]

Web Technologies -Unit-5 (JavaScript) Objective Type Questions - [ Web Technologies ]


Similar Materials :

R - Programming MCQs - Unit-1 - [ R-Programming ]

R - Programming MCQs - Unit-2 - [ R-Programming ]

R - Programming MCQs - Unit-3 - [ R-Programming ]

R - Programming MCQs - Unit-4 - [ R-Programming ]

R - Programming MCQs - Unit-5 - [ R-Programming ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-1 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-2 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-3 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-4 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-5 - [ FLAT ]

PPS MCQs - Unit-1 - [ PPS ]

PPS MCQs - Unit-2 - [ PPS ]

PPS MCQs - Unit-3 - [ PPS ]

PPS MCQs - Unit-4 - [ PPS ]

PPS MCQs - Unit-5 - [ PPS ]

Object Oriented Programming through Java MCQs - Unit-1 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-2 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-3 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-4 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-5 - [ OOP_JAVA ]

Design and Analysis of Algorithms MCQs - Unit-1 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-2 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-3 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-4 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-5 - [ DAA ]

Software Engineering MCQs - Unit-1 - [ SE ]

Software Engineering MCQs - Unit-2 - [ SE ]

Software Engineering MCQs - Unit-3 - [ SE ]

Software Engineering MCQs - Unit-4 - [ SE ]

Software Engineering MCQs - Unit-5 - [ SE ]

Data Mining MCQs - Unit-1 - [ DM ]

Data Mining MCQs - Unit-2 - [ DM ]

Data Mining MCQs - Unit-3 - [ DM ]

Data Mining MCQs - Unit-4 - [ DM ]

Data Mining MCQs - Unit-5 - [ DM ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-1 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-2 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-3 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-4 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-5 - [ COA ]

Data Structures Objective Type Question Bank-Unit-1 - [ DS ]

Data Structures Objective Type Question Bank-Unit-2 - [ DS ]

Data Structures Objective Type Question Bank-Unit-3 - [ DS ]

Data Structures Objective Type Question Bank-Unit-4 - [ DS ]

Data Structures Objective Type Question Bank-Unit-5 - [ DS ]

Database Management System Objective Type Question Bank-Unit-1 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-2 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-3 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-4 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-5 - [ DBMS ]