基于javaweb的JSP+Servlet招聘平台系统(平台、企业、用户)(java+servlet+mysql+jsp)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

002223030509

012223030509

532223020509

542223020509

552223020509

572223020509

582223020509

592223020509

基于javaweb的JSP+Servlet招聘平台系统(平台、企业、用户)(java+servlet+mysql+jsp)

http://localhost:8080/xxzp

管理员(admin表):admin 123456

企业(member表):qy111 123456

用户(member表):xs111 123456

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
47
48
49
50
51
52
53
54
    }
//System.out.println("m_application.getRealPath:::" + s);
FileNames = new String[m_files.getCount()];
for(int k = 0;k < m_files.getCount();k++)
{
if(!m_files.getFile(k).isMissing())
{
// System.out.println("s + m_files.getFile(k).getFileName():" + s + m_files.getFile(k).getFileName());
m_files.getFile(k).saveAs(s + m_files.getFile(k).getFileName(),i);
FileNames[j] = s + m_files.getFile(k).getFileName();
j++;
}
}
return j;
}

//Add
private String[] FileNames;
public String[] getFileNames()
{
//Method may expose internal representation by returning array
//Returning an array value stored in one of the object's fields exposes the internal representation of the object.? For classes shared by other untrusted classes, this could potentially be a security issue.? Returning a new copy of the array is better approach in many situations.
String[] vFileNames = new String[FileNames.length];
System.arraycopy(FileNames,0,vFileNames,0,FileNames.length);
return vFileNames;
}

public int getSize()
{
return m_totalBytes;
}

public byte getBinaryData(int i)
{
byte byte0;
try
{
byte0 = m_binArray[i];
}
catch(Exception exception)
{
throw new ArrayIndexOutOfBoundsException("Index out of range (1005).");
}
return byte0;
}

public SmartFiles getFiles()
{
return m_files;
}

public SmartRequest getRequest()
{
return m_formRequest;
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


public class AdminAction extends HttpServlet {

/**
* Constructor of the object.
*/
public AdminAction() {
super();
}

/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}

/**
* 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 {

doPost(request,response);
}

/**
* The doPost method of the servlet. <br>
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
    int k;
for(;j < i;j += k)
{
try
{
k = m_request.getInputStream().read(m_binArray,j,i - j);
}
catch(Exception exception)
{
throw new SmartUploadException("Unable to upload.");
}
}

if(isVirtual(s))
{
s = m_application.getRealPath(s);
}
try
{
java.io.File file = new java.io.File(s);
FileOutputStream fileoutputstream = new FileOutputStream(file);
fileoutputstream.write(m_binArray);
fileoutputstream.close();
}
catch(Exception exception1)
{
throw new SmartUploadException("The Form cannot be saved in the specified file (1030).");
}
}

private boolean isVirtual(String s)
{
if(m_application.getRealPath(s) != null)
{
java.io.File file = new java.io.File(m_application.getRealPath(s));
return file.exists();
}
else
{
return false;
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
47
		else { 
request.setAttribute("message", "操作失败!");
request.getRequestDispatcher("index.jsp").forward(request, response);
}
}
}

else if(method.equals("delly")){ //del
String id = request.getParameter("id");
int flag = cBean.comUp("delete from ly where id='"+id+"'");
if(flag == Constant.SUCCESS){
request.setAttribute("message", "操作成功!");
request.getRequestDispatcher("member/xx/index.jsp").forward(request, response);
}
else {
request.setAttribute("message", "操作失败!");
request.getRequestDispatcher("member/xx/index.jsp").forward(request, response);
}
}
else if(method.equals("delly2")){ //del
String id = request.getParameter("id");
int flag = cBean.comUp("delete from ly where id='"+id+"'");
if(flag == Constant.SUCCESS){
request.setAttribute("message", "操作成功!");
request.getRequestDispatcher("member/xx/index2.jsp").forward(request, response);
}
else {
request.setAttribute("message", "操作失败!");
request.getRequestDispatcher("member/xx/index2.jsp").forward(request, response);
}
}

else if(method.equals("hfly")){ //回复留言
String lyid = request.getParameter("lyid");
String hf = request.getParameter("hf");
int flag = cBean.comUp("update ly set hf='"+hf+"',hfsj='"+date2+"' where id='"+lyid+"'");
if(flag == Constant.SUCCESS){
request.setAttribute("message", "操作成功!");
request.getRequestDispatcher("member/xx/index2.jsp").forward(request, response);
}
else {
request.setAttribute("message", "操作失败!");
request.getRequestDispatcher("member/xx/index2.jsp").forward(request, response);
}
}


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
47
48
49
50
51
52
final public void init(ServletConfig config) throws ServletException
{
this.config = config;
}

final public ServletConfig getServletConfig()
{
return config;
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}

/**
* 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 {

doPost(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 {

request.setCharacterEncoding(Constant.CHARACTERENCODING);
response.setContentType(Constant.CONTENTTYPE);

HttpSession session = request.getSession();
String date=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime());
String date2=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());
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
47
48
49
50
51
52
 * @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
HttpSession session = request.getSession();
ComBean cBean = new ComBean();
String date2=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());
String method = request.getParameter("method");
if(method.equals("qyJS")){ //企业信息更新 ----------注释
String mc = request.getParameter("mc");
String content = request.getParameter("content1");
String member=(String)session.getAttribute("member");
String sql= "update qy set mc='"+mc+"',content='"+content+"' where `member`='"+member+"'";

int flag = cBean.comUp(sql);
if(flag == Constant.SUCCESS){
request.setAttribute("message", "操作成功!");
request.getRequestDispatcher("member/qyxx/index.jsp").forward(request, response);
}
else {
request.setAttribute("message", "操作失败!");
request.getRequestDispatcher("member/qyxx/index.jsp").forward(request, response);
}
}



////----------------------------------------------------------------------
else if(method.equals("addZP")){ //发布招聘
//String gw = ""; String dd="";String xz=""; String xzf="";String rs="";String xx=""; String lx="";
String gw = request.getParameter("gw");
String dd = request.getParameter("dd");
String xz = request.getParameter("xz");
String xzf = request.getParameter("xzf");
String rs = request.getParameter("rs");
String xx = request.getParameter("xx");
String lx = request.getParameter("lx");

String member=(String)session.getAttribute("member");
String sql="insert into zp(gw, dd,xz,xzf,rs,xx,lx,`member`,flag) " +
"values('"+gw+"', '"+dd+"','"+xz+"','"+xzf+"','"+rs+"','"+xx+"','"+lx+"','"+member+"','未审核')";
int flag = cBean.comUp(sql);
if(flag == Constant.SUCCESS){
request.setAttribute("message", "操作成功!");
request.getRequestDispatcher("member/zp/index.jsp").forward(request, response);
}
else {
request.setAttribute("message", "操作失败!");
request.getRequestDispatcher("member/zp/index.jsp").forward(request, response);


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