Welcome to CHOOLS JSP ASSESSMENT (YOU HAVE ONLY 30 MINUTES TO COMPLETE THIS PART [20 Questions]) **** Wishing You All The Best **** Instructions : To start the quiz, please provide your name, email id and phone number. All questions are mandatory* Answering each question is required before going on to the next page of questions. Your response is subject to change at any time. After completed the quiz click the submit button. If, once the time is up, it will be automatically submitted. The report will be mailed to your email address after the quiz is finished. 1. What is the purpose of the directive in a JSP page? Java class Includes the content of another JSP file Defines a custom tag Configures session attributes2. How do you declare a JSP custom tag library in a JSP page? <taglib:declare> <taglib:uri> <jsp:taglib> <%@ taglib uri="..." prefix="..." %>3. In JSP, how can you declare a reusable fragment of code? <jsp:fragment> <jsp:code> <jsp:include> <jsp:scriptlet>4. In JSP, what is the default scope of a variable declared using the syntax? Page scope Request scope Session scope Application scope5. How do you include a Java code snippet in a JSP page? <jsp:code> <scriptlet> <java-code> <code>6. Which tag is used to define a custom JSP tag? <custom:tag> <define:tag> <jsp:custom> <taglib:tag>7. What is the correct syntax for declaring a JSP variable with page scope? <jsp:declare> <jsp:variable> <% int x = 5; %> <% page int x = 5; %>8. How do you access a session attribute in a JSP page? <% request.getSession().getAttribute("attributeName"); %> <% session.getAttribute("attributeName"); %> <% attribute.getAttribute("attributeName"); %> <% pageContext.getSession().getAttribute("attributeName"); %>9. How do you iterate over a collection in JSP? <for> <loop> <c:forEach> <jsp:iterate>10. What is the purpose of the tag in JSP? Creates a new JavaBean instance or retrieves an existing one Declares a JavaBean class Declares a JavaBean class Configures session attributes11. Which JSP tag is used for handling exceptions? <error> <exception> <try- catch> <jsp:catch>12. Which implicit object represents the HTTP request in JSP? request response session application13. What does JSP stand for? Java Standard Protocol Java Server Pages JavaScript Pages Java Server Protocols14. How do you retrieve a parameter passed in the URL in a JSP page? request.getParameter("paramName") page.getParameter("paramName") param.getParameter("paramName") jsp.getParameter("paramName")15. What is the correct syntax for declaring a JSP variable with session scope? <jsp:sessionVar> <session:variable> <% session.setAttribute("name", value); %> <% page session.setAttribute("name", value); %>16. Which directive is used to import a Java class in JSP? <include> <import> <jsp:import> <page:import>17. What is the purpose of the tag in JSP? Declares a Java class Includes a JavaScript code block Defines a custom JSP tag Embeds Java code in the page18. Which of the following files is used to configure JSP in a web application? web.xml jsp.xml config.jsp jsp-config.xml19. What is the correct syntax for expressing scriptlet comments in JSP? <!-- Comment --> /* Comment */ <%-- Comment --%> // Comment20. What is the purpose of the tag in JSP? Includes the content of another JSP page during translation time Imports a Java class Configures session attributes Defines a custom JSP tag5 out of 4Time is Up!