资源简介

【摘要】 J2EE技术无疑是当今因特网应用的最佳技术方案之一,围绕J2EE技术的应用性,也产生了大量的Web开发框架、中间层开发框架、数据层开发框架,它们极大地提升了J2EE技术的易用性[1]。本文描述了J2EE的相关技术,比如Servlet,JSP,Struts,Hibernate等,并用这些技术完成一个基于Web的教学管理系统。 【关键词】 Servlet,JSP,Struts,Hibernate,MVC,教学管理系统。

资源截图

代码片段和文件信息

package com.jspdev.biyesheji;

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 addStudentServlet extends HttpServlet {

/**
 * 
 */
private static final long serialVersionUID = 1L;

/**
 * Constructor of the object.
 */
public addStudentServlet() {
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 {

response.setContentType(“text/html“);
// PrintWriter out = response.getWriter();
try{
Student student=new Student();
student.setId(request.getParameter(“id“));
student.setName(request.getParameter(“name“));
student.setSex(request.getParameter(“sex“));
student.setCollege(request.getParameter(“college“));
student.setDepartment(request.getParameter(“department“));
student.setInTime(request.getParameter(“inTime“));
student.setOutTime(request.getParameter(“outTime“));
student.setPassword(request.getParameter(“id“));
student.setAge(Long.parseLong(“0“));
student.setAddress(““);
student.setPhone(““);
if(!(student.isTrue(request.getParameter(“id“))))
Student.addStudent(student);
}
catch(Exception e){}
javax.servlet.RequestDispatcher dis=request.getRequestDispatcher(“../form/addStudent.jsp“);
dis.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 {

doGet(requestresponse);
}

/**
 * Initialization of the servlet. 

 *
 * @throws ServletException if an error occurs
 */
public void init() throws ServletException {
// Put your code here
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        976  2008-04-29 22:06  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\.classpath

     文件        193  2008-04-28 22:56  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\.hibernateSynchronizer3\config.properties

     文件        499  2008-03-03 17:56  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\.myhibernatedata

     文件        300  2008-05-11 12:16  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\.mymetadata

     文件        262  2008-03-03 17:54  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\.mystrutsdata

     文件       1512  2008-04-27 17:25  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\.project

     文件       2787  2008-05-20 22:39  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\addStudentServlet.java

     文件       2664  2008-05-20 22:42  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\addTeacherServlet.java

     文件       5432  2008-04-28 22:58  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseCourse.java

     文件       7518  2008-04-28 22:58  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseCourseDAO.java

     文件       3841  2008-04-28 22:58  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseGrade.java

     文件       7578  2008-03-03 18:01  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseGradeDAO.java

     文件       2345  2008-03-03 18:00  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseGradePK.java

     文件       4237  2008-04-28 23:21  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseMessage.java

     文件       7555  2008-04-28 23:18  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseMessageDAO.java

     文件       2958  2008-05-08 01:32  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseNote.java

     文件       7387  2008-04-27 16:53  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseNoteDAO.java

     文件       5988  2008-04-28 23:21  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseSc.java

     文件       7260  2008-04-28 23:21  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseScDAO.java

     文件       7308  2008-05-08 01:32  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseStudent.java

     文件       7577  2008-04-28 22:59  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseStudentDAO.java

     文件       5165  2008-05-08 01:32  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseTeacher.java

     文件       7577  2008-04-28 22:59  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\baseTeacherDAO.java

     文件      26107  2008-03-03 18:01  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\base\_baseRootDAO.java

     文件       2325  2008-05-18 19:53  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\changeGradeServlet.java

     文件       1285  2008-05-06 03:12  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\Course.hbm.xml

     文件       2990  2008-05-20 22:34  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\Course.java

     文件       2710  2008-05-19 02:01  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\courseInfoServlet.java

     文件        320  2008-03-03 18:01  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\dao\CourseDAO.java

     文件        314  2008-03-03 18:01  Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\dao\GradeDAO.java

............此处省略312个文件信息

评论

共有 条评论