public class add extends HttpServlet {
//添加
/**
*
*/
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws
ServletException,IOException {
doPost(request,response);
}
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws
ServletException,IOException{
String username=request.getParameter("username");
String password=request.getParameter("password");
Admin admin=new Admin();
admin.setUsername(new String(username.getBytes("ISO-8859-1"),"UTF-8"));
admin.setPassword(new String(password.getBytes("ISo-8859-1"),"UTF-8"));
All dao=new All();
dao.add(admin);
request.getRequestDispatcher("show").forward(request, response);
}
}
HTTP Status 404 – Not Found
Type Status Report
Message /%E7%BB%83%E4%B9%A0/show
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
是没有配置web.xml么?
怎么配置?