1、ServletContext
(1)Servlet三大域对象的应用 request、session、application(ServletContext);
(2) String path = context.getContextPath(); //获取上下文路径
2、ServletRegistration注册区域,可以添加路径
ServletRegistration defaultServlet = context.getServletRegistration("default");
defaultServlet.addMapping("/index.html");
defaultServlet.addMapping("/favicon.ico");
String wwwPath = FrameworkConstant.WWW_PATH;
if (StringUtil.isNotEmpty(wwwPath)) {
defaultServlet.addMapping(wwwPath + "*");
}