902c481d733b001d12f483999dc4cf57
来自「自己做的一个火车票售票网站是课程设计 用的是servlet+jsp 数据库是m」· 代码 · 共 39 行
TXT
39 行
package com.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Collection;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.factory.CheciFactory;
import com.vo.ChezhanVO;
public class ChezhanServlet extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String[] str =null;
request.setCharacterEncoding("utf-8");
String selectChezhanName = request.getParameter("ChezhanName");
PrintWriter out =response.getWriter();
out.print(selectChezhanName);
try{
ChezhanVO vo1 =null;
vo1=CheciFactory.getChezhanDAOImpl().cheZhanNumber(selectChezhanName);
int tempInt=vo1.getChezhanNumber();
}
catch(Exception e){
}
//int tempInt=CheciFactory.getChezhanDAOImpl().chezhanNumber(selectChezhanName).getChezhanNumber();
//out.print(tempInt);
/*str =CheciFactory.getRelationDAOImpl().getRelationVO(tempInt);
request.setAttribute("getChiziNumber",str);
request.getRequestDispatcher("/CheciServlet").forward(request, response);*/
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?