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