后面引用<%=pi.petID%>时
petId= " + <%=pi.petID%> + ""

解决方案 »

  1.   

    petservlet?add=del&petId= <%=pi.petID%>
    这里把action的全名写全试试,如:/xxx/petservlet?……
      

  2.   

    很明显,HTTP 方法 GET 不支持这个URL
      

  3.   

    换个方法吧!<td> <a href="javascript:submit_del(); "> 删除 </a> </td> <hidden name=add value=del>
    <hidden name=petId value=<%=pi.petID%> >function submit_del(){
     document.form1.action='petservlet';
     document.form1.submit();
    }
    在servlet里
    request.getParameter("add");
    request.getParameter("petId ");
      

  4.   

    不要用URL重写,很多情况下,用URL重写会出错,比如你传一个中文,get方法可能就出错,这就涉及到编码的问题啦。
      

  5.   

    HTTP method GET is not supported by this URL 
    这个URL不支持GET方法
    确认一下你的Servlet(petservlet.java)里有doGet方法
      

  6.   

    <td> <a href="/petservlet.do?method=del&petId= <%=pi.petID%> "> 删除 </a> </td> 这样传送action请求吧