资源简介
设计利用JSP 开发工具和SQL Server 2000数据库来开发这个火车票售票系统。该系统要解决的是火车站网上售票工作所要解决的问题,可以满足火车站网上售票的基本要求,包括查询、售票、退票等三个方面的功能。该系统能运用到火车站售票的工作中,根据用户的需求,设置其权限,并快捷方便的为用户提供服务。

代码片段和文件信息
package com.action;
/**
* 管理员登陆 增加 修改 删除 删除登陆日志
*/
import java.io.IOException;
import java.util.List;
import java.util.StringTokenizer;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.bean.AdminBean;
import com.bean.SystemBean;
import com.util.Constant;
import com.util.MD5;
public class AdminServlet extends HttpServlet {
/**
* Constructor of the object.
*/
public AdminServlet() {
super();
}
/**
* Destruction of the servlet.
*/
public void destroy() {
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}
/**
* 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 {
doPost(requestresponse);
}
/**
* 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 {
response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
try{
String method=request.getParameter(“method“).trim();
AdminBean loginbean = new AdminBean();
HttpSession session = request.getSession();
session.setMaxInactiveInterval(1200);
SystemBean systembean = new SystemBean();
String sysdir = systembean.getDir();
if(method.equals(“one“)){//admin登录
String username = request.getParameter(“username“);
String password = request.getParameter(“password“);
if(username == null||username.trim().equals(““)){
request.setAttribute(“message“ “请正确输入用户名!“);
request.getRequestDispatcher(sysdir+“/login.jsp“).forward(request response);
}
else if(password == null||password.trim().equals(““)){
request.setAttribute(“message“ “请输入密码!“);
request.getRequestDispatcher(sysdir+“/login.jsp“).forward(request response);
}
else{
String md5password = MD5.MD5(password);
String agent = request.getHeader(“user-agent“);
StringTokenizer st = new StringTokenizer(agent“;“);
String useros=st.nextToken();
String loginip = request.getRemot
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-12-29 14:04 JSP 火车票售票系统\
文件 2097152 2011-02-26 13:56 JSP 火车票售票系统\cpyd.mdf
文件 2097152 2011-02-26 13:56 JSP 火车票售票系统\cpyd_log.ldf
文件 162 2010-05-22 00:21 JSP 火车票售票系统\~$论文.doc
文件 613376 2010-05-22 00:20 JSP 火车票售票系统\~WRL0002.tmp
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\
文件 2097152 2008-04-12 13:18 JSP 火车票售票系统\火车票售票系统\cpyd.mdf
文件 2097152 2008-04-12 13:18 JSP 火车票售票系统\火车票售票系统\cpyd_log.ldf
文件 373 2008-04-06 10:04 JSP 火车票售票系统\火车票售票系统\readme.txt
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\源文件\
目录 0 2010-12-29 02:32 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\
文件 781 2010-12-29 02:51 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.classpath
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.myeclipse\
文件 285 2010-12-30 03:06 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.myme
文件 1410 2010-12-30 03:03 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.project
目录 0 2010-12-29 02:36 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.settings\
文件 500 2010-12-29 02:32 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.settings\.jsdtscope
文件 151 2010-12-29 02:36 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.settings\com.genuitec.eclipse.core.prefs
文件 49 2010-12-29 02:32 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2010-12-29 02:32 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\action\
文件 10175 2008-04-10 17:31 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\action\AdminServlet.java
文件 7426 2008-04-10 17:31 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\action\JobServlet.java
文件 6060 2008-04-10 17:31 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\action\LoginServlet.java
文件 6522 2008-04-04 11:39 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\action\MemberManageServlet.java
文件 13552 2008-04-04 11:39 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\action\MemberServlet.java
目录 0 2010-06-23 07:25 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\bean\
文件 7947 2008-04-04 11:39 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\bean\AdminBean.java
文件 14426 2010-12-30 00:01 JSP 火车票售票系统\火车票售票系统\源文件\Cpyd\src\com\bean\MemberBean.java
............此处省略431个文件信息
相关资源
- 微博系统(Java源码,servlet+jsp),适
- JSP企业人事管理系统设计(源代码+论
- 实现一个图书管理系统
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- JSP,SQL,MVC的选课系统
- 基于JSP的学生宿舍管理系统(源码 数
- JSP选课管理系统
- mysql jsp网站源码下载
- JSP做的化妆品商城
- Jsp购物车实例
- 基于JSP的校友信息管理系统(添加数
- 基于jsp的bbs论坛 非常详细
- jsp oracle通讯录
- JSP学生信息管理系统 Mysql数据库
- 使用jsp servlet做的投票系统
- JSP登陆验证 实现JSP用户名 密码 验
- jsp基于servlet 图书馆管理系统
- jsp学生成绩管理系统.rar
- 在线考试系统源代码(jsp)
- 超级好的纯jsp写的聊天室
- JSP 网上购物网页项目
- JSP+mysql新闻发布系统.rar
- jsp 学生信息管理系统设计与实现
- jsp与SQL Server数据库实现的客户注册登
- 简易教学管理系统(jsp spring struts h
- 学生信息管理系统 JSP MySQL
- jsp ajax 三级联动菜单
- jsp新闻公告与最新消息系统(具备添
- JSP课程设计-留言本 jsp mysql tomcat实现
评论
共有 条评论