基于javaweb和mysql的jsp+servlet大学生求职招聘管理系统(java+jsp+javascript+ajax+mysql)
基于javaweb和mysql的jsp+servlet大学生求职招聘管理系统(java+jsp+javascript+ajax+mysql)
私信源码获取及调试交流
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的JSP+Servlet大学生求职招聘管理系统(java+jsp+javascript+ajax+mysql)
项目介绍
本项目分为管理员、求职者、企业用户三种角色, 管理员角色包含以下功能: 招聘信息管理,求职信息管理,工作地点管理,求职技巧管理,职场咨询管理,系统简介管理,友情链接管理,关于我们管理,留言板管理和回复,求职者管理,企业信息管理,管理员信息管理,修改个人信息和密码等功能。
求职者角色包含以下功能: 求职者首页,求职者登录注册,招聘信息查看,企业资料查看,企业推荐查看,查看求职技巧,系统简介,留言板查看,个人简历管理,个人基本信息管理,我的工作申请,企业和工作推荐查看,企业来信查看,查看收藏的职位等功能。
企业用户角色包含以下功能: 企业登录注册,招聘信息管理,求职信息管理,人才推荐管理,企业详情管理等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本; 6.是否Maven项目:否;
技术栈
- 后端:Servlet 2. 前端:JSP+JavaScript+JQuery+CSS+Ajax
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中dbconnection.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/jsp_qzzp_sys/ 登录 注:Tomcat中配置的路径必须为/jsp_qzzp_sys 管理员账号/密码:admin/admin 求职者账号/密码:qiuzhi/123456 企业账号/密码:qiye/123456
def getZopeRootContext(self):
if self.zopeRootContext is None:
self.zopeRootContext = self.context.getPhysicalRoot()
return self.zopeRootContext
def getZopeUploadContext(self):
if self.zopeUploadContext is None:
folderNames = self.userFilesFolder.split("/")
c = self.getZopeRootContext()
for folderName in folderNames:
if (folderName <> ""):
c = c[folderName]
self.zopeUploadContext = c
return self.zopeUploadContext
def setHeader(self, key, value):
self.context.REQUEST.RESPONSE.setHeader(key, value)
def getFolders(self, resourceType, currentFolder):
# Open the folders node
s = ""
s += """<Folders>"""
zopeFolder = self.findZopeFolder(resourceType, currentFolder)
for (name, o) in zopeFolder.objectItems(["Folder"]):
s += """<Folder name="%s" />""" % (
convertToXmlAttribute(name)
)
# Close the folders node
s += """</Folders>"""
return s
def getZopeFoldersAndFiles(self, resourceType, currentFolder):
folders = self.getZopeFolders(resourceType, currentFolder)
files = self.getZopeFiles(resourceType, currentFolder)
s = folders + files
return s
def getZopeFiles(self, resourceType, currentFolder):
# Open the files node
s = ""
s += """<Files>"""
zopeFolder = self.findZopeFolder(resourceType, currentFolder)
for (name, o) in zopeFolder.objectItems(["File","Image"]):
s += """<File name="%s" size="%s" />""" % (
convertToXmlAttribute(name),
((o.get_size() / 1024) + 1)
)
# Close the files node
s += """</Files>"""
return s
if(rs.next())
{
i = rs.getInt(1);
}
st.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return i;
}
public double getDouble(String sql)
{
double i = 0;
try {
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(sql);
if(rs.next())
{
i = rs.getDouble(1);
}
st.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return i;
}
public void commOper(String sql)
{
System.out.println("bb=="+sql);
try {
System.out.println(sql);
Statement st = conn.createStatement();
st.execute(sql);
st.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void commOperSqls(ArrayList<String> sql)
{
try {
conn.setAutoCommit(false);
grc.add(GregorianCalendar.DAY_OF_MONTH,day);
String resu = dateFormat.format(grc.getTime());
String t[]= resu.split("-");
String sesuu = "";
for(int i=0;i<t.length;i++)
{
if(t[i].length()==1)
{
t[i]="0"+t[i];
}
sesuu += t[i]+"-";
}
return sesuu.substring(0,10);
}
/**
* 计算两个时期之间的天数
*
*/
public static int dayToday(String DATE1, String DATE2) {
int i = 0;
if(DATE1.indexOf(" ")>-1)
DATE1 = DATE1.substring(0,DATE1.indexOf(" "));
if(DATE2.indexOf(" ")>-1)
DATE2 = DATE2.substring(0,DATE2.indexOf(" "));
String[] d1 = DATE1.split("-");
if(d1[1].length()==1)
{
DATE1 = d1[0]+"-0"+d1[1];
}else{
DATE1 = d1[0]+"-"+d1[1];
}
if(d1[2].length()==1)
{
DATE1 = DATE1+"-0"+d1[2];
}else{
DATE1 = DATE1+"-"+d1[2];
}
String[] d2 = DATE2.split("-");
if(d2[1].length()==1)
{
DATE2 = d2[0]+"-0"+d2[1];
}else{
DATE2 = d2[0]+"-"+d2[1];
}
if(d2[2].length()==1)
/**
* 计算两个时期之间的天数
*
*/
public static int dayToday(String DATE1, String DATE2) {
int i = 0;
if(DATE1.indexOf(" ")>-1)
DATE1 = DATE1.substring(0,DATE1.indexOf(" "));
if(DATE2.indexOf(" ")>-1)
DATE2 = DATE2.substring(0,DATE2.indexOf(" "));
String[] d1 = DATE1.split("-");
if(d1[1].length()==1)
{
DATE1 = d1[0]+"-0"+d1[1];
}else{
DATE1 = d1[0]+"-"+d1[1];
}
if(d1[2].length()==1)
{
DATE1 = DATE1+"-0"+d1[2];
}else{
DATE1 = DATE1+"-"+d1[2];
}
String[] d2 = DATE2.split("-");
if(d2[1].length()==1)
{
DATE2 = d2[0]+"-0"+d2[1];
}else{
DATE2 = d2[0]+"-"+d2[1];
}
if(d2[2].length()==1)
{
DATE2 = DATE2+"-0"+d2[2];
}else{
DATE2 = DATE2+"-"+d2[2];
}
for(int j=0;j<10000;j++)
{
i=j;
String gday = Info.getDay(DATE1, j);
if(gday.equals(DATE2))
{
break;
}
}
// Clean up resources
public void destroy() {
}
}
#!/usr/bin/env python
"""
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Configuration file for the File Manager Connector for Python
"""
# INSTALLATION NOTE: You must set up your server environment accordingly to run
# python scripts. This connector requires Python 2.4 or greater.
#
# Supported operation modes:
# * WSGI (recommended): You'll need apache + mod_python + modpython_gateway
# or any web server capable of the WSGI python standard
# * Plain Old CGI: Any server capable of running standard python scripts
# (although mod_python is recommended for performance)
# This was the previous connector version operation mode
#
# If you're using Apache web server, replace the htaccess.txt to to .htaccess,
# and set the proper options and paths.
# For WSGI and mod_python, you may need to download modpython_gateway from:
# http://projects.amor.org/misc/svn/modpython_gateway.py and copy it in this
# directory.
# SECURITY: You must explicitly enable this "connector". (Set it to "True").
# WARNING: don't just set "ConfigIsEnabled = True", you must be sure that only
# authenticated users can access this file or use some kind of session checking.
Enabled = False
# Path to user files relative to the document root.
UserFilesPath = '/userfiles/'
public static String getImgUpInfoext3(int height)
{
String jscode = "";
jscode+="<img style=\"cursor: hand\" onclick=\"uploadimg3()\" src=\"/jsp_qzzp_sys/js/nopic.jpg\" id=txt3 height=\""+height+"\"/>";
jscode+="<input type=hidden name=\"filename3\" id=\"filename3\" value=\"\" />";
return jscode;
}
public static String getImgUpInfo(int height)
{
String jscode = "";
jscode+="<img style=\"cursor: hand\" onclick=\"uploadimg()\" src=\"/jsp_qzzp_sys/js/nopic.jpg\" id=txt height=\""+height+"\"/>";
jscode+="<input type=hidden name=\"filename\" id=\"filename\" value=\"\" />";
return jscode;
}
public static String getImgUpInfo2(int height)
{
String jscode = "";
jscode+="<img style=\"cursor: hand\" onclick=\"uploadimg2()\" src=\"/jsp_qzzp_sys/js/nopic.jpg\" id=txt2 height=\""+height+"\"/>";
jscode+="<input type=hidden name=\"filename2\" id=\"filename2\" value=\"\" />";
return jscode;
}
public static String getImgUpInfo3(int height)
{
String jscode = "";
jscode+="<img style=\"cursor: hand\" onclick=\"uploadimg3()\" src=\"/jsp_qzzp_sys/js/nopic.jpg\" id=txt3 height=\""+height+"\"/>";
jscode+="<input type=hidden name=\"filename3\" id=\"filename3\" value=\"\" />";
return jscode;
}
public static String getImgUpInfo4(int height)
{
String jscode = "";
jscode+="<img style=\"cursor: hand\" onclick=\"uploadimg4()\" src=\"/jsp_qzzp_sys/js/nopic.jpg\" id=txt4 height=\""+height+"\"/>";
jscode+="<input type=hidden name=\"filename4\" id=\"filename4\" value=\"\" />";
return jscode;
}
}
public long getCount() {
return count;
}
public int getCurrentPage() {
return currentPage;
}
public long getPageNumber() {
return pageNumber;
}
public int getPageSize() {
return pageSize;
}
public String getInfo() {
return info;
}
public static ArrayList<HashMap> getPages(String url,int pagesize,String sql,HttpServletRequest request )
{
PageManager pageManager = PageManager.getPage(url, pagesize, request);
pageManager.doList(sql);
PageManager bean = (PageManager) request.getAttribute("page");
ArrayList<HashMap> nlist = (ArrayList) bean.getCollection();
return nlist;
}
}
label1.setString(pros[i]);
ws.addCell(label1);
}
} catch (RowsExceededException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (WriteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
//下面开始添加单元格
int i=1;
for(List t:list){
try {
Iterator it = t.iterator();
int jj=0;
while(it.hasNext())
{
Label label1 = new Label(jj, i,"");
String a = it.next().toString();
label1.setString(a);
ws.addCell(label1);
jj++;
}
i++;
} catch (RowsExceededException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (WriteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
try {
//从内存中写入文件中
wwb.write();
//关闭资源,释放内存
wwb.close();
} catch (IOException e) {
/**
*
* @param 下一页的分页链接
* @param 一页最大记录数
* @param 当前HttpServletRequest对象
* @param 数据库操作对象
*/
protected PageManager(String path, int pageSize, HttpServletRequest request) {
// 任意一个dao都行
this.currentPage = 1;
this.pageNumber = 1;
this.count = 0;
this.pageSize = pageSize <= 0 ? DEFAULTPAGESIZE : pageSize;
this.request = request;
this.path = path;
request.setAttribute("page", this);
try {
this.currentPage = Integer.parseInt(request
.getParameter("currentPage")) <= 0 ? 1 : Integer
.parseInt(request.getParameter("currentPage"));
} catch (Exception e) {
try {
this.currentPage = Integer.parseInt((String) request
.getSession().getAttribute("currentPage"));
} catch (Exception e1) {
this.currentPage = 1;
}
}
}
/**
this.path = path;
request.setAttribute("page", this);
try {
this.currentPage = Integer.parseInt(request
.getParameter("currentPage")) <= 0 ? 1 : Integer
.parseInt(request.getParameter("currentPage"));
} catch (Exception e) {
try {
this.currentPage = Integer.parseInt((String) request
.getSession().getAttribute("currentPage"));
} catch (Exception e1) {
this.currentPage = 1;
}
}
}
/**
*
* @param 下一页的分页链接
* @param 一页最大记录数
* @param 当前HttpServletRequest对象
* @param 数据库操作对象
*/
public static PageManager getPage(String path, int pageSize,
HttpServletRequest request) {
return new PageManager(path, pageSize, request);
}
List<HashMap> list = dao
.select("select * from sysuser where uname='"
+ username + "'");
if (list.size() == 1) {
HashMap map = list.get(0);
List<HashMap> ulist = dao
.select("select * from sysuser where uname='"
+ username + "' and upass='" + password
+ "'");
if (ulist.size() == 1&& password.equals(map.get("upass").toString())) {
request.getSession().setAttribute("admin", map);
gor("/jsp_qzzp_sys/index.jsp", request, response);
} else {
request.setAttribute("error", "");
go("/index.jsp", request, response);
}
} else {
request.setAttribute("error", "");
go("/index.jsp", request, response);
}
}
//修改密码
if(ac.equals("uppass"))
{
String olduserpass = request.getParameter("olduserpass");
String userpass = request.getParameter("userpass");
String copyuserpass = request.getParameter("copyuserpass");
user = dao.getmap(Info.getUser(request).get("id").toString(), "sysuser");
if(!(((String)user.get("upass")).equals(olduserpass)))
{
request.setAttribute("error", "");
go("/admin/uppass.jsp", request, response);
}else{
String id = (String)user.get("id");
String sql = "update sysuser set upass='"+userpass+"' where id="+id;
dao.commOper(sql);
request.setAttribute("suc", "");
go("/admin/uppass.jsp", request, response);
}
}
if(ac.equals("uploaddoc"))
if(zdname.split(";").length==1){
optionstr=permap.get(zdname.split("~")[0]).toString();
}else{
for(String str:zdname.split(";"))
{
String zdstr = str.split("~")[0];
String zdnamestr = str.split("~")[1].equals("无名")?"":(str.split("~")[1]+":");
optionstr+=zdnamestr+permap.get(zdstr)+" - ";
}
}
if(optionstr.indexOf(" - ")>-1)optionstr=optionstr.substring(0,optionstr.length()-3);
select+="<option value=\""+optionstr+"\">"+optionstr+"</option>";
}
select+="</select>";
return select;
}
public static String getradio(String name,String tablename,String zdname,String where)
{
String radio="";
int dxii = 0;
for(HashMap permap:new CommDAO().select("select * from "+tablename+" where "+where+" order by id desc")){
String check="";
if(dxii==0)check="checked=checked";
String optionstr = "";
for(String str:zdname.split(";"))
{
String zdstr = str.split("~")[0];
String zdnamestr = str.split("~")[1].equals("无名")?"":(str.split("~")[1]+":");
optionstr+=zdnamestr+permap.get(zdstr)+" - ";
}
if(optionstr.length()>0)optionstr=optionstr.substring(0,optionstr.length()-3);
radio+="<label><input type='radio' name='"+name+"' "+check+" value=\""+optionstr+"\">"+optionstr+"</label>\n";
dxii++;
}
return radio;
}
public static void writeExcel(String fileName,String prosstr,java.util.List<List> list,HttpServletRequest request, HttpServletResponse response){
WritableWorkbook wwb = null;
String cols = "";
jscode+="if(document.getElementById(\"txt\"))\n";
jscode+="{\n";
jscode+="document.getElementById(\"txt\").src=\"/jsp_qzzp_sys/upfile/"+map.get("filename")+"\";\n";
jscode+="}\n";
jscode+="if(document.getElementById(\"txt2\"))\n";
jscode+="{\n";
jscode+="document.getElementById(\"txt2\").src=\"/jsp_qzzp_sys/upfile/"+map.get("filename2")+"\";\n";
jscode+="}\n";
jscode+="if(document.getElementById(\"txt3\"))\n";
jscode+="{\n";
jscode+="document.getElementById(\"txt3\").src=\"/jsp_qzzp_sys/upfile/"+map.get("filename3")+"\";\n";
jscode+="}\n";
jscode+="if(document.getElementById(\"txt4\"))\n";
jscode+="{\n";
jscode+="document.getElementById(\"txt4\").src=\"/jsp_qzzp_sys/upfile/"+map.get("filename4")+"\";\n";
jscode+="}\n";
jscode+="if(document.getElementById(\"txt5\"))\n";
jscode+="{\n";
jscode+="document.getElementById(\"txt5\").src=\"/jsp_qzzp_sys/upfile/"+map.get("filename5")+"\";\n";
jscode+="}\n";
}
}
jscode+="}\n";
jscode+=" getPvalue();\n";
jscode+="</script>\n";
}catch (Exception e) {
e.printStackTrace();
}
return jscode;
}
public static String generalFileName(String srcFileName) {
try{
int index=srcFileName.lastIndexOf(".");
return StrUtil.generalSrid()+srcFileName.substring(index).toLowerCase();
}catch(Exception e){
return StrUtil.generalSrid();
}
}
public synchronized static String subStr(String source,int length) {
if(source.length()>length)
{
source=source.substring(0,length)+"...";
}
return source;
}
public static String getDateStr(){
String dateString="";
try{//yyyyMMddHHmmss
java.text.SimpleDateFormat formatter=new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
java.util.Date currentTime_1=new java.util.Date();
dateString=formatter.format(currentTime_1);
}catch(Exception e){
}
return dateString;
}
public static String getUTFStr(String str) {
if(str==null){
return "";
}
try {
str = new String(str.getBytes("ISO-8859-1"),"utf-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return str;
}
public static String getGBKStr(String str) throws UnsupportedEncodingException{
if(str==null){
return "";
}
return new String(str.getBytes("ISO-8859-1"),"GBK");
}
public static String getGB2312Str(String str) throws UnsupportedEncodingException{
if(str==null){
return "";
# Open the files node
s = ""
s += """<Files>"""
zopeFolder = self.findZopeFolder(resourceType, currentFolder)
for (name, o) in zopeFolder.objectItems(["File","Image"]):
s += """<File name="%s" size="%s" />""" % (
convertToXmlAttribute(name),
((o.get_size() / 1024) + 1)
)
# Close the files node
s += """</Files>"""
return s
def findZopeFolder(self, resourceType, folderName):
# returns the context of the resource / folder
zopeFolder = self.getZopeUploadContext()
folderName = self.removeFromStart(folderName, "/")
folderName = self.removeFromEnd(folderName, "/")
if (resourceType <> ""):
try:
zopeFolder = zopeFolder[resourceType]
except:
zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=resourceType, title=resourceType)
zopeFolder = zopeFolder[resourceType]
if (folderName <> ""):
folderNames = folderName.split("/")
for folderName in folderNames:
zopeFolder = zopeFolder[folderName]
return zopeFolder
def createFolder(self, resourceType, currentFolder):
# Find out where we are
zopeFolder = self.findZopeFolder(resourceType, currentFolder)
errorNo = 0
errorMsg = ""
if self.request.has_key("NewFolderName"):
newFolder = self.request.get("NewFolderName", None)
zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=newFolder, title=newFolder)
else:
errorNo = 102
return self.sendErrorNode ( errorNo, errorMsg )
def uploadFile(self, resourceType, currentFolder, count=None):
zopeFolder = self.findZopeFolder(resourceType, currentFolder)
file = self.request.get("NewFile", None)
fileName = self.getFileName(file.filename)
fileNameOnly = self.removeExtension(fileName)
fileExtension = self.getExtension(fileName).lower()
if (count):
nid = "%s.%s.%s" % (fileNameOnly, count, fileExtension)
else:
public class MainCtrl extends HttpServlet {
public MainCtrl() {
super();
}
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}
public void doGet(HttpServletRequest request, HttpServletResponse response)
- GNU Lesser General Public License Version 2.1 or later (the "LGPL")
http://www.gnu.org/licenses/lgpl.html
- Mozilla Public License Version 1.1 or later (the "MPL")
http://www.mozilla.org/MPL/MPL-1.1.html
== END LICENSE ==
Connector for Python and Zope.
This code was not tested at all.
It just was ported from pre 2.5 release, so for further reference see
\editor\filemanager\browser\default\connectors\py\connector.py in previous
releases.
"""
class FCKeditorConnectorZope(FCKeditorConnector):
"""
Zope versiof FCKeditorConnector
"""
# Allow access (Zope)
__allow_access_to_unprotected_subobjects__ = 1
def __init__(self, context=None):
"""
Constructor
"""
FCKeditorConnector.__init__(self, environ=None) # call superclass constructor
# Instance Attributes
self.context = context
self.request = FCKeditorRequest(context)
def getZopeRootContext(self):
if self.zopeRootContext is None:
self.zopeRootContext = self.context.getPhysicalRoot()
return self.zopeRootContext
def getZopeUploadContext(self):
if self.zopeUploadContext is None:
folderNames = self.userFilesFolder.split("/")
c = self.getZopeRootContext()







更多推荐




所有评论(0)