在eclipse中ServletActionContext.getServletContext()报找不到getServletContext()方法。
我在我导入的struts2-core.jar中找到了getServletContext()但还是提示ServletActionContext里没有getServletContext()方法。后来经过搜索才知道原来是少了servlet-api架包,导入servlet-api.jar既可解决!
在eclipse中ServletActionContext.getServletContext()报找不到getServletContext()方法。
我在我导入的struts2-core.jar中找到了getServletContext()但还是提示ServletActionContext里没有getServletContext()方法。后来经过搜索才知道原来是少了servlet-api架包,导入servlet-api.jar既可解决!
转载于:https://www.cnblogs.com/zengsong-restService/archive/2013/04/08/3006692.html