JSP Nihileswaran No Comment 12Feb Share 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 tag in JSP? Embeds a Java applet in the page Includes an external JavaScript file Configures browser plugins Defines a custom JSP tag2. Which implicit object represents the HTTP request in JSP? request response session application3. How do you iterate over a collection in JSP? <for> <loop> <c:forEach> <jsp:iterate>4. In JSP, how can you declare a reusable fragment of code? <jsp:fragment> <jsp:code> <jsp:include> <jsp:scriptlet>5. 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 tag6. Which tag is used to include content dynamically in a JSP page based on a condition? <jsp:if> <c:choose> <choose> <if:condition>7. What does JSP stand for? Java Standard Protocol Java Server Pages JavaScript Pages Java Server Protocols8. Which tag is used to define a custom JSP tag? <custom:tag> <define:tag> <jsp:custom> <taglib:tag>9. 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"); %>10. What is the correct syntax for expressing scriptlet comments in JSP? <!-- Comment --> /* Comment */ <%-- Comment --%> // Comment11. How do you declare a JSP custom tag library in a JSP page? <taglib:declare> <taglib:uri> <jsp:taglib> <%@ taglib uri="..." prefix="..." %>12. Which attribute is used to specify the MIME type of the response in a JSP page? contentType responseType outputType pageType13. What is the correct syntax for declaring a JSP variable with page scope? <jsp:declare> <jsp:variable> <% int x = 5; %> <% page int x = 5; %>14. 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 attributes15. Which tag is used to iterate over a collection in JSP? <c:for> <c:forEach> <jsp:loop> <jsp:iterate>16. Which JSP tag is used to set the content type of the response? <set:content> <page:content> <jsp:contentType> <%@ page contentType="text/html;charset=UTF-8" %>17. Which directive is used to import a Java class in JSP? <include> <import> <jsp:import> <page:import>18. How can you prevent a JSP page from being cached by the browser? <%@ page cache="false" %> <meta http-equiv="Cache-Control" content="no-cache"> <jsp:cache enable="false"> <cache-control value="no-cache">19. What is the purpose of the tag in JSP? Specifies the programming language for the page Configures page-level attributes Imports a Java class Defines a custom JSP tag20. How can you include static content (like HTML) in a JSP page? <jsp:static> <jsp:include> <jsp:content> <static:include>5 out of 4Time is Up! Previous Elasticsearch February 12, 2024 Next R February 12, 2024 You Might Also Like Hello world CHOOLS No Comment How to Disable Avast Antivirus CHOOLS No Comment AVG Review — Is the Absolutely free Version As effective as the Premium Version? CHOOLS No Comment Understanding the Limitations of Models of Managing CHOOLS No Comment Careers Similar To Teaching CHOOLS No Comment