方法多了。
如果你用了spring框架可以通过一下方式获取(注解直接依赖注入应该也可以):
HttpServletRequest req = (HttpServletRequest)request;
HttpServletResponse resp = (HttpServletResponse)response;
ServletContext sc = req.getSession().getServletContext();
ApplicationContext cxt = WebApplicationContextUtils.getWebApplicationContext(sc);
service = (Service) cxt.getBean("usersService");
如果没有使用任何框架可以利用Java反射机制来实现。
当然,最简单的方法就是直接new一个。