Aptitude Reasoning English GK Computer Knowledge Programming Skill Banking Software Testing



Question - 1

JSP container creates ______________ methods so it should not be overridden.

  • _jspService()
  • jdbcservice()
  • Both A and B
  • None of these
Solutions
Question - 2

Which of the following is not a valid attribute of page directives?

  • language
  • extend
  • export
  • import
Solutions
Question - 3

Which of the following attribute is used to mark a page as an error processing page?

  • isErrorPage
  • errorPage
  • exception
  • exceptionPage
Solutions
Question - 4

Where filters are defined?

  • Filters are defined in the deployment descriptor file web.xml
  • Filters are defined in the jsp pages
  • Both A and B
  • None of these
Solutions
Question - 5

What happens when autoFlush is set to a value "false"?

  • JSP container throws exception to indicate buffer overflow when buffer is filled
  • JSP container flushed the buffered output when buffer is filled
  • Both A and B
  • None of these
Solutions
Question - 6

Which of the scripting of JSP not putting content into service method of the converted servlet?

  • Declarations
  • Expressions
  • Scriptlets
  • None of the above
Solutions
Question - 7

The method forward(request, response) will ________________.

  • return back to the same method from where the forward was invoked
  • not return back to the same method from where the forward was invoked and the web pages navigation continues
  • Both A and B
  • None of these
Solutions
Question - 8

The difference between Servlets and JSP is the _______________.

  • translation
  • compilation
  • syntax
  • Both A and B
Solutions
Question - 9

Which of the following are the valid scopes in JSP?

  • request, page, session, application
  • request, page, session, global
  • request, page, context, application
  • response, page, session, application
Solutions
Question - 10

JSP includes a ___________ mechanism for defining or custom tags.

  • static attributes
  • local attributes
  • dynamic attributes
  • global attributes
Solutions
Question - 11

Why DB connections are not written directly in JSPs?

  • Response is slow
  • Not a standard J2EE architecture
  • Load Balancing is not possible
  • Both B and C
Solutions
Question - 12

How many JSP implicit objects are there and these objects are created by the web container that is available to all the JSP pages?

  • 8
  • 9
  • 10
  • 7
Solutions
Question - 13

Why use Request Dispatcher to forward a request to another resource, instead of using a sendRedirect?

  • Redirects are no longer supported in the current servlet API
  • Redirects are not a cross-platform portable mechanism
  • The RequestDispatcher does not use the reflection API
  • The RequestDispatcher does not require a round trip to the client, and thus is more efficient and allows the server to maintain request state
Solutions
Question - 14

Which is not a directive?

  • include
  • page
  • export
  • useBean
Solutions
Question - 15

Which HTTP method send by the browser asks the server to get the page only?

  • get
  • post
  • option
  • put
Solutions
Question - 16

Which can generate HTML dynamically on the client but can hardly interact with the webserver to perform complex tasks like database access and image processing etc. in JSP?

  • vs.Static HTML
  • vs.Server-Side Includes
  • vs.Pure Servlets
  • Vs.JavaScript
Solutions
Question - 17

What is the initial contact point for handling a web request in a Page-Centric architecture?

  • A JSP page
  • A JavaBean
  • A servlet
  • A session manager
Solutions
Question - 18

Which of the following statements is true regarding the scope of 'request' in JSP?

  • Objects with request scope are accessible from pages processing the same request where they were created
  • All references to the object shall be released after the request is processed; in particular, if the request is forwarded to a resource in the same run time, the object is still reachable
  • References to objects with request scope are stored in the request object
  • All of the above
Solutions
Question - 19

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

  • contentType
  • generatePdf
  • typePDF
  • contentPDF
Solutions
Question - 20

Which option is true about session scope?

  • Objects are accessible only from the page in which they are created
  • Objects are accessible only from the pages which are in same session
  • Objects are accessible only from the pages which are processing the same request
  • Objects are accessible only from the pages which reside in same application
Solutions
Tags:
60+ Best JSP Interview Questions, JSP MCQ questions for placement,JSP interview questions, Previously asked JSP Questions, Frequently asked JSP Questions,JSP Questions for TCS, JSP Interview Questions for Freshers, JSP Interview Questions for Experience, Accenture JSP Interview Questions, JSP Objective Questions for Interview


Practice More sets Questions