基于UML技术的在线图书销售系统的设计及实现(8)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

基于UML技术的在线图书销售系统的设计及实现(8)


4.5  Servlet文件
    在本系统中,Servlet文件存放于edu.ccniit.jspCourse.servlet包中,在每个Servlet文件中,均实现了doGet和doPost方法,用于处理HTTP的GET和POST请求。本系统具体包的Servlet在web.xml中主要配置如下:
 /**
  *处理图书信息的相关servlet类
*/
<servlet>
    <servlet-name>BookServlet</servlet-name>
<servlet-class>edu.ccniit.jspCourse.servlet.BookServlet</servlet-class>
  </servlet>
/**
  *处理用户注册、登录、修改密码等操作的相关servlet类
*/
  <servlet>
    <servlet-name>UserServlet</servlet-name>
<servlet-class>edu.ccniit.jspCourse.servlet.UserServlet</servlet-class>
  </servlet>
/**
  *处理订单信息的相关servlet类
*/
  <servlet>
    <servlet-name>OrderServlet</servlet-name>
<servlet-class>edu.ccniit.jspCourse.servlet.OrderServlet</servlet-class>
  </servlet>
/**
  *处理管理员登录验证的相关servlet类
*/
  <servlet>
<servlet-name>AdminServlet</servlet-name>
<servlet-class>edu.ccniit.jspCourse.servlet.AdminServlet</servlet-class>
  </servlet>
/**
  *管理员查看、删除用户的相关servlet类
*/
  <servlet>
  <servlet-name>CustomerServlet</servlet-name>
<servlet-class>edu.ccniit.jspCourse.servlet.CustomerServlet</servlet-class>
  </servlet>
/**
  *上传图书图片的相关servlet类
*/
  <servlet>
    <servlet-name>BookUpload</servlet-name>
<servlet-class>edu.ccniit.jspCourse.servlet.BookUpload</servlet-class>
  </servlet>
相关的url路径如下:
  <servlet-mapping>
    <servlet-name>CurrentTime</servlet-name>
    <url-pattern>/CurrentTime</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>BookServlet</servlet-name>
    <url-pattern>/Book/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>UserServlet</servlet-name>
    <url-pattern>/UserServlet/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>OrderServlet</servlet-name>
    <url-pattern>/OrderManage/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AdminServlet</servlet-name>
    <url-pattern>/Admin/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ClientServlet</servlet-name>
    <url-pattern>/Client/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>CustomerServlet</servlet-name>
    <url-pattern>/Customer/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>BookUpload</servlet-name>
    <url-pattern>/bookUpload.do</url-pattern>
  </servlet-mapping>
</web-app>
4.6  前台用户模块设计 (责任编辑:qin)