1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What will happen if you forget to close a PrintWriter in a servlet?
A. Servlet crashes
B. Compilation error
C. Possible memory leak or incomplete response
D. JSP stops working
C. Possible memory leak or incomplete response
Which of these can handle both GET
and POST
methods in a servlet?
A. doService()
B. doRequest()
C. doProcess()
D. doGet()
and doPost()
D. doGet()
and doPost()
What tag defines a custom error page in JSP?
A. <jsp:error>
B. <%@ errorPage %>
C. <jsp:exception>
D. <errorPage>
B. <%@ errorPage %>
Which tag is used to display conditional content?
A. <c:loop>
B. <c:if>
C. <c:eval>
D. <c:out>
B. <c:if>
What does fn:length(list)
return?
A. Number of items in list
B. Length of longest string
C. Boolean
D. Loop index
A. Number of items in list
Which EJB is designed to be used across multiple users with a shared state?
A. Stateless
B. Stateful
C. Singleton
D. Message-Driven
C. Singleton
What does @EJB
do in a servlet?
A. Declares an EJB as local
B. Injects an EJB instance
C. Defines a remote interface
D. Replaces @Bean
B. Injects an EJB instance