PRJ301_-_RE_-_SU_2023_554.webp
golden_star

PRJ301_-_RE_-_SU_2023_554.webp

(Choose 1 answer)
Given the following deployment descriptor:
<web-app>
<servlet>
<servlet-name>InitParams</servlet-name>
<servlet-class>com.osborne.c02.InitParamsServlet</servlet-class>
<init-param>
<param-name>initParm</param-name>
<param-value>Final Test</param-value>
</init-param>
</servlet>
</web-app>
What is the outcome of running the following servlet?
public class InitParamsServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletContext sc = this.getServletContext();PrintWriter out = response.getWriter();out.write("Initialization Parameter is: " + sc.getInitParameter("initParm"));}
}
A. A runtime error
B. "Initialization Parameter is: Final Test" returned to the requester
C. "Initialization Parameter is: null" returned to the requester
D. "Initialization Parameter is: null" written to the console

Exit 14

Thông tin

Category
PRJ301
Thêm bởi
golden_star
Ngày thêm
Lượt xem
2,728
Lượt bình luận
20
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRJ301_-_RE_-_SU_2023_554.webp
File size
72.7 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom