资源简介
【摘要】 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\.myme
文件 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\ba
文件 7518 2008-04-28 22:58 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 3841 2008-04-28 22:58 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7578 2008-03-03 18:01 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 2345 2008-03-03 18:00 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 4237 2008-04-28 23:21 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7555 2008-04-28 23:18 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 2958 2008-05-08 01:32 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7387 2008-04-27 16:53 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 5988 2008-04-28 23:21 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7260 2008-04-28 23:21 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7308 2008-05-08 01:32 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7577 2008-04-28 22:59 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 5165 2008-05-08 01:32 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 7577 2008-04-28 22:59 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 26107 2008-03-03 18:01 Java.biyeshejijiaoxueguanli@www.aspjzy.com\biyesheji\src\com\jspdev\biyesheji\ba
文件 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.xm
文件 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个文件信息
- 上一篇:java 计算数学表达式
- 下一篇:哈工大同义词词林相似度计算javad代码
相关资源
- JSP+Servlet+JavaBean编程
- JAVA、Servlet、SQL Server等实现App基本功
- jsp,mvc外文翻译参考文献
- jsp实现对数据库的增删改查操作
- BBS系统,JSP做的
- JSP 期末作品
- 基于JSP的网上书店的设计与实现【源
- JSP+SQL房产中介系统(毕业设计)
- JSP+MYSQL客户关系管理系统(毕业设计
- JAVA JSP试题库组卷管理系统
- JAVA JSP大学生贷款管理系统-毕业设计
- JSP JAVA 电子相册系统-毕业设计
- JSP JAVA 学生考勤管理系统
- JSP MYSQL超市进销存管理系统
- JAVA JSP作业提交批改系统 源代码 论文
- JAVA JSP员工绩效考核管理系统 源代码
- JAVA JSP房地产销售系统 源代码 论文
- JAVA JSP仓库管理系统.源代码 论文
- 基于JSP+JavaBean的网上花店完整
- jsp选课、评分系统
- 基于struts2+JDBC的学生管理系统
- 基于jsp的宾馆客房管理系统
- 在线音乐网站JSP源码
- 学生请假系统Jsp+servlet+mssql
- jsp在线教学系统
- Jsp购物网站-TdSnacks
- 学生成绩管理系统源代码jsp+mysql+课程
- jsp+mysql:动漫网站
- 一个简单的jsp小项目
- jsp/servlet实现的旅游管理系统
评论
共有 条评论