🎴 Flashcard Mode

Java Servlets, JSP and C Programming Quiz

Card1 / 20
Mastered0
Review0
QuestionClick to flip

Given the following jsp line select the correct statements: <% public void jspInit() { ...java code...} %>

AnswerClick to flip back
A
1) It is a valid line that can be used to initialize the servlet that implements the jsp file.
💡 Explanation:

The jspInit() method is the correct JSP lifecycle method for initialization. You can declare it in a declaration element <%! ... %> as shown, and the JSP container will call it when the servlet is initialized. Option B is incorrect because identifiers can start with jsp. Option C is wrong because the method name is jspInit(), not _jspInit() (which is for internal implementation details).

Change Mode