Oracle SQL and Java J2EE Web Development Quiz

Quiz covering Oracle SQL database concepts (indexing, functions, DDL/DML/DCL) and Java J2EE web development (Servlets, JSP, WAR files, HTTP status codes)

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

A JSP file that uses a tag library must declare the tag library first. The tag library is defined using the taglib directive - <%= taglib uri="..." prefix="..."%> Which of the following specifies the correct purpose of prefix attribute. Select the one correct answer.

  1. A. The prefix defines the name of the tag that may be used for a tag library
  2. B. The prefix attribute defines the location of the tag library descriptor file.
  3. C. The prefix attribute should refer to the short name attribute of the tag library file that is defined by the uri attribute of taglib directive.
  4. D. The prefix attribute is used in front of a tagname of a tag defined within the tag library.
Question 2 Multiple Choice (Multiple Answers)

Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers.

  1. name
  2. description
  3. validator
  4. tag-class
  5. display-name
Question 3 Multiple Choice (Single Answer)

Which of the following JSP variables are not available within a JSP expression. Select the one correct answer.

  1. out
  2. session
  3. request
  4. response
  5. httpsession
  6. page
Question 4 Multiple Choice (Multiple Answers)

Which of the following represents a correct syntax for usebean. Select the two correct answers.

  1. G. <jsp:usebean id="fruit scope ="page"/>
  2. H. <jsp:usebean id="fruit type ="String"/>
  3. I. <jsp:usebean id="fruit type ="String" beanName="Fruit"/>
  4. J. <jsp:usebean id="fruit class="Fruit" beanName="Fruit"/>
Question 5 Multiple Choice (Single Answer)

Which of these is true about include directive. Select the one correct answer.

  1. The included file must have jspf extension
  2. The XML syntax of include directive in <jsp:include file="fileName"/> .
  3. The content of file included using include directive, cannot refer to variables local to the original page
  4. When using the include directive, the JSP container treats the file to be included as if it was part of the original file.
Question 6 Multiple Choice (Single Answer)

Which of the following statements are correct about the status of the Http response. Select the one correct answer.

  1. A. A status of 200 to 299 signifies that the request was successful
  2. B. A status of 300 to 399 are informational messages
  3. C. A status of 400 to 499 indicates an error in the server.
  4. D. A status of 500 to 599 indicates an error in the client.
Question 7 Multiple Choice (Multiple Answers)

Which of the following are correct statements? Select the two correct answers.

  1. A. The getRequestDispatcher method of ServletContext class takes the full path of the servlet, whereas the getRequestDispatcher method of HttpServletRequest class takes the path of the servlet relative to the ServletContext.
  2. B. The include method defined in the RequestDispatcher class can be used to access one servlet from another. But it can be invoked only if no output has been sent to the server.
  3. C. The getRequestDispatcher(String URL) is defined in both ServletContext and HttpServletRequest method
  4. D. The getNamedDispatcher(String) defined in HttpServletRequest class takes the name of the servlet and returns an object of RequestDispatcher class.
Question 8 Multiple Choice (Single Answer)

Name the location of compiled class files within a war file? Select the one correct answer.

  1. /META-INF/classes
  2. /classes
  3. /WEB-INF/classes
  4. /root/classes
Question 9 Multiple Choice (Single Answer)

In WebLogic clusters, what is the load balancing algorithm ?

  1. RoundRobin
  2. FIFO
  3. LIFO
  4. None
Question 10 True/False

Truncate is a Data Definition Language.

  1. True
  2. False
Question 11 True/False

Delete is faster than Truncate.

  1. True
  2. False
Question 12 Multiple Choice (Single Answer)

Using which option a dropped table can be undropped ?

  1. ROLLBACK
  2. FLASHBACK
  3. GETBACK
  4. NONE
Question 13 Multiple Choice (Single Answer)

What is returned from the query SELECT NVL2(NULL,'V1','V2') from DUAL;

  1. V1
  2. NULL
  3. V2
  4. None
Question 14 True/False

COUNT will consider NULL values in the column while counting.

  1. True
  2. False
Question 15 True/False

ROWNUM is the physical address of the row.

  1. True
  2. False
Question 16 Multiple Choice (Single Answer)

GRANT and REVOKE are part of

  1. DDL
  2. DML
  3. DCL
  4. None
Question 17 Multiple Choice (Single Answer)

What is the result of the query SELECT add_months('15-Jan-2011',-2) from DUAL ?

  1. 15-Dec-2010
  2. 15-Nov-2010
  3. 15-Mar-2011
  4. 15-Nov-2011
Question 18 Multiple Choice (Single Answer)

What is the result of the query SELECT FLOOR(-4.6)+CEIL(3.9) from DUAL ?

  1. -2
  2. 0
  3. 1
  4. -1
Question 19 Multiple Choice (Single Answer)

How many comparisons can be written in a CASE statement ?

  1. 127
  2. 255
  3. 63
  4. 511
Question 20 Multiple Choice (Single Answer)

Which is the Defualt Index ?

  1. BITMAP
  2. B-TREE
  3. FUNCTION BASED
  4. None