热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Servlets 面试题与答案

Test your skills through the online practice test: Servlets Quiz Online Practice Test

相关差异对比

JSP vs Servlets

问题 31. When we don't write any constructor for the servlet, how does container create an instance of servlet?

Container creates instance of servlet by calling Class.forName(className).newInstance().

这有帮助吗? 添加评论 查看评论
 

问题 32. Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

Yes, but Before calling the destroy() method, the servlet container waits for the remaining threads that are executing the servlet?s service() method to finish.

这有帮助吗? 添加评论 查看评论
 

问题 33. What is the difference between callling a RequestDispatcher using ServletRequest and ServletContext?

>We can give relative URL when we use ServletRequest and not while using ServletContext.

这有帮助吗? 添加评论 查看评论
 

问题 34. Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

Since ServletRequest has the current request path to evaluae the relative path while ServletContext does not.

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。