<td  valign="middle"><a href="a.jsp?id=<%=rs.getInt("gldid")%>">确定 </a></td>
我不传a.jsp我要传我的ActionServle(是个servle)应该怎么写.?

解决方案 »

  1.   

    <td  valign="middle"> <a href="<%=request.getContextPath()%>/ActionServle?id= <%=rs.getInt("gldid")%>">确定 </a> </td> 
      

  2.   

    <a href="/ActionServle?id= <%=rs.getInt("gldid")%>">确定 </a>
      

  3.   

    HTTP Status 405 - HTTP method GET is not supported by this URL
    怎么出现了405错误啊
    我的doGet也写了啊
      

  4.   

    在工程的web.xml文件中找到对应ActionServle的Servlet-mapping配置节点,拷贝Servlet-mapping下的URL-pattern
    配置节点值到href属性值中,去掉“/”就可以了。
      

  5.   

    这要看你Servlet-mapping下的URL-pattern 是怎么写的了,按照5楼的方法就可以了
      

  6.   


    把你Servlet-mapping下的URL-pattern发来看看
      

  7.   

            <td  valign="middle"> <a href=" <%=request.getContextPath()%>/ActionServle?id= <%=rs.getInt("gldid")%>">确定 </a> </td>          <servlet-mapping>
        <servlet-name>ActionServlet</servlet-name>
        <url-pattern>/action</url-pattern>
    </servlet-mapping>
            <servlet-mapping>
        <servlet-name>ActionServlet</servlet-name>
        <url-pattern>/ActionServlet</url-pattern>
    </servlet-mapping>
      

  8.   

    http://localhost:8080/Fish1.0/action?id=1079
    HTTP Status 405 - HTTP method GET is not supported by this URL--------------------------------------------------------------------------------type Status reportmessage HTTP method GET is not supported by this URLdescription The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).
    --------------------------------------------------------------------------------Apache Tomcat/6.0.14
      

  9.   

    <td  valign="middle"> <a href=" <%=request.getContextPath()%>/action?id= <%=rs.getInt("gldid")%>">确定 </a> </td> 
      

  10.   

    你 doGet()方法里是怎么写的?我一般的话写个doPost()方法,然后doGet()方法里调用一下doPost()就可以了
      

  11.   

    doGet没写东西...
    doGet 里怎么调用doPost
      

  12.   

    没写当然会报错啦,如果你doPost()方法写了的话,doGet()方法这样就可以了
    public void doGet(HttpServletRequest request, HttpServletResponse response) {
    doPost(request, response);
    }
      

  13.   

    <td  valign="middle"> <a href=" <%=request.getContextPath()%>/ActionServle?id= <%=rs.getInt("gldid")%>">确定 </a> </td> XML里也要相应的设置