资源简介
一个小型的旅游公司管理系统,可以拿来参考!基于jsp、servlet模式开发!
代码片段和文件信息
package com.bz.controller;
import com.bz.model.*;
import com.bz.*;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class OrderClServlet extends HttpServlet {
/**
* The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(“text/html“);
response.setCharacterEncoding(“utf-8“);
PrintWriter out = response.getWriter();
OrderBeanBo obb=new OrderBeanBo();
int roadno=Integer.parseInt(request.getParameter(“roadid“));
//得到购物车
MyCartBO mcb=(MyCartBO)request.getSession().getAttribute(“mycart“);
OrderInfoBean oib=obb.addOrder(mcb roadno);
if(oib!=null){
//添加ok
//准备显示订单的详细信息的数据给下个页面shopping4.jsp
request.setAttribute(“detailbean“ oib);
request.getRequestDispatcher(“suc.jsp“).forward(request response);
}else{
//添加订单失败
request.getRequestDispatcher(“err.jsp“).forward(request response);
}
}
/**
* The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
this.doGet(request response);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 623 2011-10-18 10:23 fate\.classpath
文件 285 2011-10-17 19:19 fate\.myme
文件 1410 2011-10-17 19:20 fate\.project
文件 500 2011-10-17 19:20 fate\.settings\.jsdtscope
文件 49 2011-10-17 19:20 fate\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2011-10-17 19:20 fate\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 2120 2008-12-03 18:31 fate\src\com\bz\controller\OrderClServlet.java
文件 4526 2008-12-10 20:42 fate\src\com\bz\controller\RoadClServlet.java
文件 2354 2008-11-14 20:25 fate\src\com\bz\controller\ShowRoadClServlet.java
文件 2717 2008-11-15 18:34 fate\src\com\bz\controller\ShowTraClServlet.java
文件 4738 2008-11-15 19:12 fate\src\com\bz\controller\TraClServlet.java
文件 2905 2008-11-15 16:01 fate\src\com\bz\controller\TraServlet.java
文件 2293 2008-12-06 09:00 fate\src\com\bz\controller\TuanServlet.java
文件 525 2011-10-18 10:24 fate\src\com\bz\model\ConnDB.java
文件 3113 2008-12-11 08:18 fate\src\com\bz\model\MyCartBO.java
文件 876 2008-12-03 15:58 fate\src\com\bz\model\OrderBean.java
文件 2665 2008-12-03 18:44 fate\src\com\bz\model\OrderBeanBo.java
文件 518 2008-12-03 15:59 fate\src\com\bz\model\OrderBeanDetail.java
文件 1346 2008-12-03 16:49 fate\src\com\bz\model\OrderInfoBean.java
文件 1281 2008-12-10 20:39 fate\src\com\bz\model\RoadBean.java
文件 4096 2008-12-10 20:41 fate\src\com\bz\model\RoadBeanBo.java
文件 2952 2008-12-10 20:49 fate\src\com\bz\model\RoadBeanCl.java
文件 1523 2008-11-14 15:11 fate\src\com\bz\model\TraBean.java
文件 7428 2008-12-11 08:17 fate\src\com\bz\model\TraBeanCl.java
文件 1263 2008-12-05 20:49 fate\src\com\bz\model\TuanBean.java
文件 1942 2008-12-06 09:06 fate\src\com\bz\model\TuanBeanCl.java
文件 4725 2008-11-13 13:43 fate\src\com\fate\controller\BusClServlet.java
文件 4846 2008-11-13 11:14 fate\src\com\fate\controller\CompanyClServlet.java
文件 5000 2011-10-19 15:00 fate\src\com\fate\controller\DaoClServlet.java
文件 4306 2008-11-13 10:57 fate\src\com\fate\controller\DeptClServlet.java
............此处省略379个文件信息
评论
共有 条评论