资源简介
本系统有三类用户,教师,学生,管理员,教师功能分为注册功能、修改个人信息、发布本学期开设的课程、查看某一门课程的选课情况、将选择自己课程的学生以Excel 的形式导出,学生功能分为注册、修改个人信息、选课,管理员功能是:审核老师发布的课程
代码片段和文件信息
package control;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import model.dao.StudentDAO;
import model.dao.TeacherDAO;
import model.vo.Teacher;
import com.google.gson.Gson;
public class fillteacher 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;charset=gb2312“);
PrintWriter out = response.getWriter();
TeacherDAO dao=new TeacherDAO();
List list=dao.queryTeacher();
String outStr=““;
for(Teacher dept:list){
String s=dept.getTid()+““+dept.getName();
outStr+=s+“|“;
}
outStr=outStr.substring(0 outStr.length()-1);
System.out.println(outStr);
out.println(outStr);
out.flush();
out.close();
}
/**
* 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(“text/html“);
PrintWriter out = response.getWriter();
out.println(““);
out.println(““);
out.println(“ tle>A Servlet tle>“);
out.println(“ “);
out.print(“ This is “);
out.print(this.getClass());
out.println(“ using the POST method“);
out.println(“ “);
out.println(““);
out.flush();
out.close();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 371527 2018-01-08 21:27 单一琳-1504240901\Java-单一琳.docx
文件 5309 2018-01-08 21:22 单一琳-1504240901\sylxk.sql
目录 0 2018-01-08 21:23 单一琳-1504240901\sylxk\
文件 1469 2017-12-27 14:19 单一琳-1504240901\sylxk\.classpath
文件 1188 2017-12-26 10:20 单一琳-1504240901\sylxk\.project
目录 0 2018-01-08 21:23 单一琳-1504240901\sylxk\.settings\
文件 522 2017-12-26 10:20 单一琳-1504240901\sylxk\.settings\.jsdtscope
文件 67 2017-12-26 12:03 单一琳-1504240901\sylxk\.settings\org.eclipse.core.resources.prefs
文件 364 2017-12-26 10:20 单一琳-1504240901\sylxk\.settings\org.eclipse.jdt.core.prefs
文件 474 2017-12-26 10:20 单一琳-1504240901\sylxk\.settings\org.eclipse.wst.common.component
文件 414 2017-12-26 10:20 单一琳-1504240901\sylxk\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-12-26 10:20 单一琳-1504240901\sylxk\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-12-26 10:20 单一琳-1504240901\sylxk\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 66 2017-12-26 10:21 单一琳-1504240901\sylxk\.tern-project
目录 0 2018-01-08 21:23 单一琳-1504240901\sylxk\src\
目录 0 2018-01-08 21:23 单一琳-1504240901\sylxk\src\control\
文件 2401 2017-12-27 12:08 单一琳-1504240901\sylxk\src\control\fillteacher.java
文件 2875 2018-01-01 23:28 单一琳-1504240901\sylxk\src\control\logincontrol.java
文件 1946 2018-01-01 16:06 单一琳-1504240901\sylxk\src\control\pass.java
文件 3953 2017-12-27 14:33 单一琳-1504240901\sylxk\src\control\printexcel.java
文件 2883 2018-01-01 16:06 单一琳-1504240901\sylxk\src\control\pubclass.java
文件 2622 2017-12-27 12:01 单一琳-1504240901\sylxk\src\control\queryteacou.java
文件 2353 2018-01-01 16:06 单一琳-1504240901\sylxk\src\control\selectclass.java
文件 3385 2017-12-26 20:30 单一琳-1504240901\sylxk\src\control\showcourse.java
文件 2718 2017-12-26 21:55 单一琳-1504240901\sylxk\src\control\showpasscourse.java
文件 2943 2017-12-27 13:22 单一琳-1504240901\sylxk\src\control\showstudent.java
文件 2763 2018-01-01 16:06 单一琳-1504240901\sylxk\src\control\signupstu.java
文件 2797 2018-01-01 16:06 单一琳-1504240901\sylxk\src\control\signuptea.java
文件 2607 2018-01-01 15:56 单一琳-1504240901\sylxk\src\control\stuchange.java
文件 2070 2018-01-01 16:06 单一琳-1504240901\sylxk\src\control\teachange.java
文件 3038 2017-12-27 13:49 单一琳-1504240901\sylxk\src\control\test.java
............此处省略424个文件信息
- 上一篇:基于视频的运动目标提取算法研究
- 下一篇:bright spark 1.10 汉化版
评论
共有 条评论