Tag: programming languages

Questions Related to programming languages

  1. The included file must have jspf extension

  2. The XML syntax of include directive in .

  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.


Correct Option: D
  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.


Correct Option: A
Explanation:

To answer this question, the user needs to have knowledge about HTTP response status codes. The HTTP response status code indicates whether a request has been successfully completed or not. It is a 3-digit integer with the first digit indicating the general response class, while the last two digits do not have any categorization role.

Now, let's go through each option and explain why it is right or wrong:

A. A status of 200 to 299 signifies that the request was successful - This statement is correct. HTTP status codes 2xx indicate that the request was successfully received, understood, and accepted.

B. A status of 300 to 399 are informational messages - This statement is incorrect. HTTP status codes 3xx indicate redirection messages, not informational messages.

C. A status of 400 to 499 indicates an error in the server - This statement is incorrect. HTTP status codes 4xx indicate client errors, not server errors.

D. A status of 500 to 599 indicates an error in the client - This statement is incorrect. HTTP status codes 5xx indicate server errors, not client errors.

Therefore, the correct answer is:

The Answer is: A.

  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.


Correct Option: A,C

Using which option a dropped table can be undropped ?

  1. ROLLBACK

  2. FLASHBACK

  3. GETBACK

  4. NONE


Correct Option: B