奇怪的错误HTTP Status 405 - HTTP method GET is not supported by this URL
package com.flight.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import org.apache.commons.beanutils.BeanUtils;
import com.flight.bean.City;
import com.flight.bean.flight;
import com.flight.dao.searchflightDao;
public class ticketsearchServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response, String String)
throws ServletException, IOException {
doPost(request,response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
String action=request.getParameter("action");
searchflightDao sfdao=new searchflightDao();
if(action.equals("list")){
String flight_id = request.getParameter("flight_id");
String datetime = request.getParameter("datetime");
request.setAttribute("fmList", sfdao.findBy(flight_id,datetime));
request.getRequestDispatcher("ticketstatus.jsp").forward(request, response);
}
}
public void init() throws ServletException {
// Put your code here
}
}
表单的提交方式检查过了是post方式提交的,请高手们帮忙看看是怎么回事?急用啊!!!