JSP/JSP Fundamentals. (MCQs) Questions Sample Test,Sample questions

Question:
 How many jsp implicit objects are there and these objects are created by the web container that are available to all the jsp pages?

1.8

2.9

3.10

4.7


Question:
 How many jsp implicit objects are there and these objects are created by the web container that are available to all the jsp pages?

1.8

2.9

3.10

4.7


Question:
 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?

1. vs.Static HTMLB. C. D.

2.vs.Server-Side Includes

3.vs.Pure Servlets

4.Vs.JavaScript


Question:
 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?

1. vs.Static HTMLB. C. D.

2.vs.Server-Side Includes

3.vs.Pure Servlets

4.Vs.JavaScript


Question:
 Which http method send by browser that asks the server to get the page only?

1.get

2.post

3.option

4.put


Question:
 Which http method send by browser that asks the server to get the page only?

1.get

2.post

3.option

4.put


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

1.The forward action terminates the action of the current page.

2.The forward action forwards the request to another resource such as a static page another JSP page or a Java Servlet.

3.Both of the above.

4.None of the above.


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

1.The forward action terminates the action of the current page.

2.The forward action forwards the request to another resource such as a static page another JSP page or a Java Servlet.

3.Both of the above.

4.None of the above.


Question:
DBC is a ………………… interface which means that it is used to invoke SQL commands directly

1.low-level

2.middle-level

3.higher-level

4.User


Question:
DBC is a ………………… interface which means that it is used to invoke SQL commands directly

1.low-level

2.middle-level

3.higher-level

4.User


Question:
Dynamic interception of requests and responses to transform the information is done by

1.servlet container

2.servlet config

3.servlet context

4.servlet filter


Question:
Dynamic interception of requests and responses to transform the information is done by

1.servlet container

2.servlet config

3.servlet context

4.servlet filter


Question:
If a jsp is to generate a xml page what attribute of page directive it should use?

1.contentXML

2.generateXML

3.typeXML

4.contentType


Question:
If a jsp is to generate a xml page what attribute of page directive it should use?

1.contentXML

2.generateXML

3.typeXML

4.contentType


Question:
JSP includes a mechanism for defining …………………………. or custom tags.

1. static attributes

2.local attributes

3.dynamic attributes

4.global attributes


Question:
JSP includes a mechanism for defining …………………………. or custom tags.

1. static attributes

2.local attributes

3.dynamic attributes

4.global attributes


Question:
response is instance of which class?

1.Response

2.HttpResponse

3.HttpServletResponse

4.ServletResponse


Question:
response is instance of which class?

1.Response

2.HttpResponse

3.HttpServletResponse

4.ServletResponse


Question:
The difference between Servlets and JSP is the …………….

1. compilation

2.translation

3.syntax

4.Both A and B


Question:
The difference between Servlets and JSP is the …………….

1. compilation

2.translation

3.syntax

4.Both A and B


Question:
This is a software distribution model in which applications are hosted by a vendor or service provider and made available to customers over a network typically the Internet.

1.Platform as a Service (PaaS)

2.Infrastructure as a Service (IaaS)

3.Software as a Service (SaaS)

4.None


Question:
What is JDBC?

1.java compiler

2.ava API

3.Java interpreter

4.Both A and B


Question:
What is JDBC?

1.java compiler

2.ava API

3.Java interpreter

4.Both A and B


Question:
Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page?

1.The ErrorPage Attribute

2.The IsErrorPage Attribute

3.Both A & B

4.None of the above


Question:
Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page?

1.The ErrorPage Attribute

2.The IsErrorPage Attribute

3.Both A & B

4.None of the above


Question:
Which describes best an EJB handle?

1.An EJB handle is used to handle exceptions when accessing EJB object

2.An EJB handle is used to store a reference to a specific EJB object

3. An EJB handle is part of the Home interface

4.An EJB handle is used for local references inside the EJB container


Question:
Which describes best an EJB handle?

1.An EJB handle is used to handle exceptions when accessing EJB object

2.An EJB handle is used to store a reference to a specific EJB object

3. An EJB handle is part of the Home interface

4.An EJB handle is used for local references inside the EJB container


Question:
Which is not a directive?

1. include

2.page

3.export

4.useBean


Question:
Which is not a directive?

1. include

2.page

3.export

4.useBean


Question:
Which of the following are the valid scopes in JSP?

1.request page session application

2.request page session global

3.response page session application

4.request page context application


Question:
Which of the following are the valid scopes in JSP?

1.request page session application

2.request page session global

3.response page session application

4.request page context application


Question:
Which of the following attribute is used to have uncaught run-time exceptions automatically forwarded to an error processing page?

1.error

2.errorPage

3.exception

4.exceptionPage


Question:
Which of the following attribute is used to have uncaught run-time exceptions automatically forwarded to an error processing page?

1.error

2.errorPage

3.exception

4.exceptionPage


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

1.name property

2.type id

3.name type

4.id property


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

1.name property

2.type id

3.name type

4.id property


Question:
Which of the following is true about <c:url> tag

1.The <c:url> tag formats a URL into a string and stores it into a variable.

2.The <c:url> tag automatically performs URL rewriting when necessary.

3.Both of the above.

4.None of the above.


Question:
Which of the following is true about <c:url> tag

1.The <c:url> tag formats a URL into a string and stores it into a variable.

2.The <c:url> tag automatically performs URL rewriting when necessary.

3.Both of the above.

4.None of the above.


Question:
Which of the following is true about autoFlush Attribute?A - B - C - Both of the above.D - Q 7 - 

1.The autoFlush attribute can specify that buffered output should be flushed automatically when the buffer is filled.

2.The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

3.Both of the above.

4.None of the above.


Question:
Which of the following is true about autoFlush Attribute?A - B - C - Both of the above.D - Q 7 - 

1.The autoFlush attribute can specify that buffered output should be flushed automatically when the buffer is filled.

2.The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

3.Both of the above.

4.None of the above.


Question:
Which of the following is true about isThreadSafe Attribute?

1.The isThreadSafe option marks a page as being thread-safe.

2.If you set the isThreadSafe option to false the JSP engine makes sure that only one thread at a time is executing your JSP.

3.By default all JSPs are considered thread-safe.

4.All of the above.


Question:
Which of the following is true about isThreadSafe Attribute?

1.The isThreadSafe option marks a page as being thread-safe.

2.If you set the isThreadSafe option to false the JSP engine makes sure that only one thread at a time is executing your JSP.

3.By default all JSPs are considered thread-safe.

4.All of the above.


Question:
Which of the following method can be used to read a multiple values with same name for example check box selections?

1.request.getParameter()

2.response.getParameter()

3.request.getParameterValues()

4.response.getParameterValues()


Question:
Which option is true about session scope?

1.Objects are accessible only from the page in which they are created

2.Objects are accessible only from the pages which are in same session

3.Objects are accessible only from the pages which are processing the same request

4.Objects are accessible only from the pages which reside in same application


Question:
Which option is true about session scope?

1.Objects are accessible only from the page in which they are created

2.Objects are accessible only from the pages which are in same session

3.Objects are accessible only from the pages which are processing the same request

4.Objects are accessible only from the pages which reside in same application


Question:
Why DB connections are not written directly in JSPs?

1.B. Response is slow

2.Not a standard J2EE architecture

3.Load Balancing is not possible

4.Both B and C


Question:
Why DB connections are not written directly in JSPs?

1.B. Response is slow

2.Not a standard J2EE architecture

3.Load Balancing is not possible

4.Both B and C


More MCQS

  1. JSP Fundamentals. (MCQs) Questions
  2. JSP - Java (MCQ) questions and answers
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!