有关getServletContext
lyj57 2013-04-24 11:52:27 public void parseRequest(HttpServletRequest request){
System.out.println("parseRequest:"+request.getParameter("username"));
System.out.println("realPath:"+request.getServletContext().getRealPath("/"));
path=request.getServletContext().getRealPath("/test_db.accdb");
ConnectAccessFile(request.getParameter("username"));
}
上面是TestAction.java中的几句,运行提示错误
The method getServletContext() is undefined for the type HttpServletRequest
The method getServletContext() is undefined for the type HttpServletRequest
求助啊!这要怎么解决