基于javaweb的JSP+Servlet网络招聘系统求职招聘工作(java+servlet+mysql+jsp)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

222023372309

232023372309

242023372309

252023372309

262023372309

272023372309

282023372309

292023372309

302023372309

312023372309

基于javaweb的JSP+Servlet网络招聘系统求职招聘工作(java+servlet+mysql+jsp)

首页:
http://localhost:8080/servlet/MainPageServlet

管理员:
admin 123456

企业:
ep1 123456
ep2 123456
ep3 123456

学生:
stu1 123456
stu2 123456
stu3 123456

注意:每个公司只能发布一个职位(职位表有公司名唯一约束:tb_eppostjob)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
			}
} catch (SQLException e) {
e.printStackTrace();
}
//转向EPHome.jsp页面
request.getRequestDispatcher("../EPHome.jsp").forward(request, response);
}

/**
* The doPost method of the servlet. <br>
*
* 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(request,response);
}

}

/**
* 企业界面查询符合要求的毕业生信息servlet
*/


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36



public class EPShowStoreServlet extends HttpServlet {

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

/**
* The doGet method of the servlet. <br>
*
* 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 {

//创建收藏的毕业生用户名list
ArrayList<String> arrStuUsername = new ArrayList<String>();
//创建EPStoreDao数据库操作对象
EPStoreDao epsd = new EPStoreDao();
//从session中获取该公司的EPUser
HttpSession session = request.getSession();
String epUsername = (String) session.getAttribute("EPUser");
//查询出该公司收藏的公司
try {
arrStuUsername = epsd.queryEPStore(epUsername);
session.setAttribute("storeStuUsernames", arrStuUsername);
//判断是否为空
if(arrStuUsername.size() == 0){
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
			e.printStackTrace();
}
}
}else{
System.out.println(false);
request.setAttribute("error", "请先进行搜索框搜索");
return;
}

//使用符合条件的username查询出EPData和EPPostJob
//将ArrayList epds转化为json
JSONObject json = new JSONObject();
JSONArray array = new JSONArray();
JSONObject member = null;
if(usernames != null){
//创建EPDataDao数据库操作对象进行查找
EPDataDao epdd = new EPDataDao();
//创建EPPostJobDao数据库操作对象进行查找
EPPostJobDao eppjd = new EPPostJobDao();
for (String username : usernames) {
member = new JSONObject();
member.put("epUsername", username);
EPData epd = new EPData();
EPPostJob eppj = new EPPostJob();
try {
epd = epdd.getEPData(username);
member.put("epName", epd.getEPname());
member.put("epAddr", epd.getEPaddr());
} catch (SQLException e) {
e.printStackTrace();
}
try {
eppj = eppjd.getEPPostJob(username);
member.put("jobName", eppj.getJobname());
member.put("salary", eppj.getJobsalary());
} catch (SQLException e) {
e.printStackTrace();
}
array.add(member);
}
json.put("result", array);
PrintWriter pw = response.getWriter();
pw.print(json.toString());
}else{
System.out.println(false);
request.setAttribute("error", "未找到结果");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
			int status = eppj.getStatus();
if(status == 0){
request.setAttribute("auth", "(下架状态)");
}else{
request.setAttribute("auth", "(上架状态)");
}
}
//转向EPShowPostJob.jsp页面
request.getRequestDispatcher("../EPShowPostJob.jsp").forward(request, response);
}

/**
* The doPost method of the servlet. <br>
*
* 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(request,response);
}

}

/**
* 将数据库中原先的简历信息填写到表单中servlet,方便修改
*/



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
			request.setAttribute("strRecommends", arrRecommend.toString());
}

//显示该公司现有的评论
CommentDao cd = new CommentDao();
ArrayList<Comment> arrComm = new ArrayList<Comment>();
try {
arrComm = cd.queryComment(EPusername);
} catch (SQLException e) {
e.printStackTrace();
}
if(arrComm.size() > 0){
request.setAttribute("comments", arrComm);
}
//转向stuJobDetile.jsp页面
request.getRequestDispatcher("../stuJobDetail.jsp").forward(request, response);
}

/**
* The doPost method of the servlet. <br>
*
* 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(request,response);
}

}

/**
* 处理修改后的简历servlet
*/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38




public class EPSelectServlet extends HttpServlet {

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

/**
* The doGet method of the servlet. <br>
*
* 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");
response.setCharacterEncoding("utf-8");
request.setCharacterEncoding("utf-8");
//取得json中的筛选条件
String address = request.getParameter("address");
String trade = request.getParameter("trade");
String salary = request.getParameter("salary");
String diploma = request.getParameter("diploma");
// System.out.println(address + " " + trade + " " + salary + " " + diploma);
//创建JobIntentionDao数据库操作对象
JobIntentionDao jid = new JobIntentionDao();
//查询符合要求的毕业生用户名
ArrayList<String> arrStuUsername = new ArrayList<String>();


项目链接:
https://javayms.github.io?id=212023372309201fd
https://javayms.pages.dev?id=212023372309201fd