日期:2014-05-17 浏览次数:20852 次
$.ajax({ type : "post", url : "CompareProgramServlet", data : {catID:$('#oneCate').val(),docLibID_PUB:$('#docLib_PUB').val}, success : function (data){ alert(typeof data); } });
public class CompareProgramServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("!!!!!!!!!!!"); request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); String catID=request.getParameter("catID"); String docLibID_PUB = request.getParameter("docLibID_PUB");
<servlet> <servlet-name>CompareProgramServlet</servlet-name> <servlet-class>compareProgram.CompareProgramServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>CompareProgramServlet</servlet-name> <url-pattern>/servlet/CompareProgramServlet</url-pattern> </servlet-mapping>
$.ajax({ type : "post", url : "CompareProgramServlet", data : {catID:$('#oneCate').val(),docLibID_PUB:$('#docLib_PUB').val[color=#FF0000]()[/color]}, success : function (data){ alert(typeof data); } });