MCQOPTIONS
Saved Bookmarks
This section includes 13 Mcqs, each offering curated multiple-choice questions to sharpen your Advanced Java knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following is not a directive in JSP? |
| A. | page directive |
| B. | include directive |
| C. | taglib directive |
| D. | command directive |
| Answer» E. | |
| 2. |
Java code is embedded under which tag in JSP? |
| A. | Declaration |
| B. | Scriptlet |
| C. | Expression |
| D. | Comment |
| Answer» C. Expression | |
| 3. |
Can and be used alternatively in JSP? |
| A. | True |
| B. | False |
| Answer» C. | |
| 4. |
Which tag is used to set a value of a JavaBean? |
| A. | <c:set> |
| B. | <c:param> |
| C. | <c:choose> |
| D. | <c:forward> |
| Answer» B. <c:param> | |
| 5. |
What temporarily redirects response to the browser? |
| A. | <jsp:forward> |
| B. | <%@directive%> |
| C. | response.sendRedirect(URL) |
| D. | response.setRedirect(URL) |
| Answer» D. response.setRedirect(URL) | |
| 6. |
Which object stores references to the request and response objects? |
| A. | sessionContext |
| B. | pageContext |
| C. | HttpSession |
| D. | sessionAttribute |
| Answer» C. HttpSession | |
| 7. |
“out” is implicit object of which class? |
| A. | javax.servlet.jsp.PrintWriter |
| B. | javax.servlet.jsp.SessionWriter |
| C. | javax.servlet.jsp.SessionPrinter |
| D. | javax.servlet.jsp.JspWriter |
| Answer» E. | |
| 8. |
Which of the following action variable is used to include a file in JSP? |
| A. | jsp:setProperty |
| B. | jsp:getProperty |
| C. | jsp:include |
| D. | jsp:plugin |
| Answer» D. jsp:plugin | |
| 9. |
Which one of the following is correct for directive in JSP? |
| A. | <%@directive%> |
| B. | <%!directive%> |
| C. | <%directive%> |
| D. | <%=directive%> |
| Answer» B. <%!directive%> | |
| 10. |
WHICH_OF_THE_FOLLOWING_IS_NOT_A_DIRECTIVE_IN_JSP??$ |
| A. | page directive |
| B. | include directive |
| C. | taglib directive |
| D. | command directive |
| Answer» E. | |
| 11. |
Can and be used alternatively in JSP?$ |
| A. | True |
| B. | False |
| Answer» C. | |
| 12. |
“out” is implicit object of which class?$ |
| A. | javax.servlet.jsp.PrintWriter |
| B. | javax.servlet.jsp.SessionWriter |
| C. | javax.servlet.jsp.SessionPrinter |
| D. | javax.servlet.jsp.JspWriter |
| Answer» E. | |
| 13. |
Which attribute uniquely identification element? |
| A. | ID |
| B. | Class |
| C. | Name |
| D. | Scope |
| Answer» B. Class | |