任何人都可以解释一下这种方法之间的区别ServletContext是HttpServlet什么?
doGet( HttpServletRequest request, ... ){
getServletConfig( ).getServletContext( );
request.getSession( ).getServletContext( );
getServletContext( );
}
Run Code Online (Sandbox Code Playgroud)
性能或上下文本身有什么不同吗?如果是这样,哪种方式最好?有没有其他方法来检索上下文?