基于javaweb+mysql的jsp+servlet医院挂号管理系统(java+jsp+javascript+servlet+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的JSP+Servlet医院挂号管理系统(java+jsp+javascript+servlet+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项目:否;
技术栈
JSP+CSS+JavaScript+servlet+mysql
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中util/DBO.java配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/jsp_yiyuanguahaosys登录
/**
* 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 {
response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
HttpSession session = request.getSession();
MemberBean memberBean = new MemberBean();
String method = Filter.escapeHTMLTags(request.getParameter("method").trim());
if(method.equals("PAGEUSERLOGIN")){//登陆页面会员登陆
String username = Filter.escapeHTMLTags(request.getParameter("username").trim());
String password = Filter.escapeHTMLTags(request.getParameter("password").trim());
String reg_type = Filter.escapeHTMLTags(request.getParameter("reg_type").trim());
String lastip = request.getRemoteAddr();
int flag = memberBean.memberLogin(username, password, reg_type);
if(flag == Constant.SUCCESS){//登陆成功
String info = memberBean.getLastTimeIP(username);
int flag2 = memberBean.upmemberLogin(username, lastip);
if(flag2 == Constant.SUCCESS){
session.setAttribute("member", username);
session.setAttribute("type", reg_type);
session.setAttribute("info", info);
request.getRequestDispatcher("member/index.jsp").forward(request, response);
}
else{
session.setAttribute("member", username);
session.setAttribute("type", reg_type);
session.setAttribute("info", info);
session.setAttribute("message", "登陆成功,登陆信息更新失败!");
request.getRequestDispatcher("member/index.jsp").forward(request, response);
}
}
else if(flag == Constant.NAME_ERROR){//用户名错误
request.setAttribute("reg_user", username);
String s4 = ""; //new String();
String s5 = ""; //new String();
String s6 = ""; //new String();
String s7 = ""; //new String();
String s8 = ""; //new String();
String s9 = ""; //new String();
String s10 = ""; //new String();
m_totalBytes = m_request.getContentLength();
m_binArray = new byte[m_totalBytes];
int j;
for(;i < m_totalBytes;i += j)
{
try
{
m_request.getInputStream();
j = m_request.getInputStream().read(m_binArray,i,m_totalBytes - i);
}
catch(Exception exception)
{
throw new SmartUploadException("Unable to upload.");
}
}
for(;!flag1 && m_currentIndex < m_totalBytes;m_currentIndex++)
{
if(m_binArray[m_currentIndex] == 13)
{
flag1 = true;
}
else
{
m_boundary = m_boundary + (char)m_binArray[m_currentIndex];
}
}
if(m_currentIndex == 1)
{
return;
}
for(m_currentIndex++;m_currentIndex < m_totalBytes;m_currentIndex = m_currentIndex + 2)
{
long now=new java.util.Date().getTime();
String s1 = getDataHeader();
m_currentIndex = m_currentIndex + 2;
boolean flag3 = s1.indexOf("filename") > 0;
*/
public void init() throws ServletException {
// Put your code here
}
}
/**
*
* 网站后台管理注册会员 查询 冻结 删除会员
*/
public class MemberManageAction extends HttpServlet {
/**
* Constructor of the object.
*/
public MemberManageAction() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
{
m_application = servletconfig.getServletContext();
}
/**
* @deprecated Method service is deprecated
*/
public void service(HttpServletRequest httpservletrequest,HttpServletResponse httpservletresponse) throws ServletException,IOException
{
m_request = httpservletrequest;
m_response = httpservletresponse;
}
public final void initialize(ServletConfig servletconfig,HttpServletRequest httpservletrequest,HttpServletResponse httpservletresponse) throws ServletException
{
m_application = servletconfig.getServletContext();
m_request = httpservletrequest;
m_response = httpservletresponse;
}
public final void initialize(PageContext pagecontext) throws ServletException
{
m_application = pagecontext.getServletContext();
m_request = (HttpServletRequest)pagecontext.getRequest();
m_response = (HttpServletResponse)pagecontext.getResponse();
}
/**
* @deprecated Method initialize is deprecated
*/
public final void initialize(ServletContext servletcontext,HttpSession httpsession,HttpServletRequest httpservletrequest,HttpServletResponse httpservletresponse,JspWriter jspwriter) throws ServletException
{
m_application = servletcontext;
m_request = httpservletrequest;
m_response = httpservletresponse;
}
public void upload() throws ServletException,IOException,SmartUploadException
{
int i = 0;
//boolean flag = false;
boolean flag1 = false;
//boolean flag2 = false;
long l = 0L;
//String s = "";//new String();
//String s2 = "";//new String();
String s4 = ""; //new String();
String s5 = ""; //new String();
String s6 = ""; //new String();
String s7 = ""; //new String();
String s8 = ""; //new String();
String s9 = ""; //new String();
String s10 = ""; //new String();
m_totalBytes = m_request.getContentLength();
getDataSection();
if(flag3 && s4.length() > 0)
{
if(m_deniedFilesList.contains(s5))
{
throw new SecurityException("The extension of the file is denied to be uploaded (1015).");
}
if(!m_allowedFilesList.isEmpty() && !m_allowedFilesList.contains(s5))
{
throw new SecurityException("The extension of the file is not allowed to be uploaded (1010).");
}
if(m_maxFileSize > 0L && (long)((m_endData - m_startData) + 1) > m_maxFileSize)
{
throw new SecurityException("Size exceeded for this file : " + s4 + " (1105).");
}
l += (m_endData - m_startData) + 1;
if(m_totalMaxFileSize > 0L && l > m_totalMaxFileSize)
{
throw new SecurityException("Total File Size exceeded (1110).");
}
}
if(flag3)
{
SmartFile file = new SmartFile();
file.setParent(this);
file.setFieldName(s3);
file.setFileName(s4);
file.setFileExt(s5);
file.setFilePathName(s6);
file.setIsMissing(s6.length() == 0);
file.setContentType(s7);
file.setContentDisp(s8);
file.setTypeMIME(s9);
file.setSubTypeMIME(s10);
if(s7.indexOf("application/x-macbinary") > 0)
{
m_startData = m_startData + 128;
}
file.setSize((m_endData - m_startData) + 1);
file.setStartData(m_startData);
m_application = pagecontext.getServletContext();
m_request = (HttpServletRequest)pagecontext.getRequest();
m_response = (HttpServletResponse)pagecontext.getResponse();
}
/**
* @deprecated Method initialize is deprecated
*/
public final void initialize(ServletContext servletcontext,HttpSession httpsession,HttpServletRequest httpservletrequest,HttpServletResponse httpservletresponse,JspWriter jspwriter) throws ServletException
{
m_application = servletcontext;
m_request = httpservletrequest;
m_response = httpservletresponse;
}
public void upload() throws ServletException,IOException,SmartUploadException
{
int i = 0;
//boolean flag = false;
boolean flag1 = false;
//boolean flag2 = false;
long l = 0L;
//String s = "";//new String();
//String s2 = "";//new String();
String s4 = ""; //new String();
String s5 = ""; //new String();
String s6 = ""; //new String();
String s7 = ""; //new String();
String s8 = ""; //new String();
String s9 = ""; //new String();
String s10 = ""; //new String();
m_totalBytes = m_request.getContentLength();
m_binArray = new byte[m_totalBytes];
int j;
for(;i < m_totalBytes;i += j)
{
try
{
m_request.getInputStream();
j = m_request.getInputStream().read(m_binArray,i,m_totalBytes - i);
}
catch(Exception exception)
{
throw new SmartUploadException("Unable to upload.");
/**
* 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 {
response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
HttpSession session = request.getSession();
MemberBean memberBean = new MemberBean();
String method = Filter.escapeHTMLTags(request.getParameter("method").trim());
/*********************************************
* 会员注册通用(检查用户名 修改密码 reg2.jsp页面跳转)
*********************************************/
if(method.equals("reg2")){//会员注册 reg2.jsp
String username = Filter.escapeHTMLTags(request.getParameter("username").trim());
String password = Filter.escapeHTMLTags(request.getParameter("password").trim());
String reg_type = Filter.escapeHTMLTags(request.getParameter("reg_type").trim());
request.setAttribute("username", username);
request.setAttribute("password", password);
request.setAttribute("reg_type", reg_type);
if(username.trim().equals("admin")){
request.setAttribute("username", username);
request.setAttribute("message", "非法的用户名,请重新选择!");
request.getRequestDispatcher("reg2.jsp").forward(request, response);
}
{
m_deniedFilesList = null;
}
}
public void setAllowedFilesList(String s)
{
//String s1 = "";
if(s != null)
{
String s2 = "";
for(int i = 0;i < s.length();i++)
{
if(s.charAt(i) == ',')
{
if(!m_allowedFilesList.contains(s2))
{
m_allowedFilesList.addElement(s2);
}
s2 = "";
}
else
{
s2 = s2 + s.charAt(i);
}
}
//if(s2 != "")
if(!s2.equals(""))
{
m_allowedFilesList.addElement(s2);
}
}
else
{
m_allowedFilesList = null;
}
}
public void setDenyPhysicalPath(boolean flag)
{
m_denyPhysicalPath = flag;
}
public void setForcePhysicalPath(boolean flag)
{
//m_forcePhysicalPath = flag;
}
public void setContentDisposition(String s)
{
m_contentDisposition = s;
}
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;
}
}
}
public class ComServlet extends HttpServlet {
/**
* Constructor of the object.
*/
public ComServlet() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
* @throws ServletException if an error occure
*/
public void init() throws ServletException {
// Put your code here
}
}
/**
* 前台会员登陆 退出
*
*/
public class LoginAction extends HttpServlet {
/**
* Constructor of the object.
*/
public LoginAction() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}
for(m_currentIndex++;m_currentIndex < m_totalBytes;m_currentIndex = m_currentIndex + 2)
{
long now=new java.util.Date().getTime();
String s1 = getDataHeader();
m_currentIndex = m_currentIndex + 2;
boolean flag3 = s1.indexOf("filename") > 0;
String s3 = getDataFieldValue(s1,"name");
if(flag3)
{
s6 = getDataFieldValue(s1,"filename");
s4 = now+getFileName(s6);
s5 = getFileExt(s4);
s7 = getContentType(s1);
s8 = getContentDisp(s1);
s9 = getTypeMIME(s7);
s10 = getSubTypeMIME(s7);
}
getDataSection();
if(flag3 && s4.length() > 0)
{
if(m_deniedFilesList.contains(s5))
{
throw new SecurityException("The extension of the file is denied to be uploaded (1015).");
}
if(!m_allowedFilesList.isEmpty() && !m_allowedFilesList.contains(s5))
{
throw new SecurityException("The extension of the file is not allowed to be uploaded (1010).");
}
if(m_maxFileSize > 0L && (long)((m_endData - m_startData) + 1) > m_maxFileSize)
{
throw new SecurityException("Size exceeded for this file : " + s4 + " (1105).");
}
l += (m_endData - m_startData) + 1;
if(m_totalMaxFileSize > 0L && l > m_totalMaxFileSize)
{
throw new SecurityException("Total File Size exceeded (1110).");
}
}
if(flag3)
{
SmartFile file = new SmartFile();
file.setParent(this);
file.setFieldName(s3);
file.setFileName(s4);
file.setFileExt(s5);
file.setFilePathName(s6);
file.setIsMissing(s6.length() == 0);
file.setContentType(s7);
file.setContentDisp(s8);
file.setTypeMIME(s9);
file.setSubTypeMIME(s10);
if(s7.indexOf("application/x-macbinary") > 0)
{
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 {
response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
String sysdir = new SystemBean().getDir();
HttpSession session = request.getSession();
try{
String username2 = (String)session.getAttribute("user");
if(username2 == null){
request.getRequestDispatcher("error.jsp").forward(request, response);
}
else{
String method = Filter.escapeHTMLTags(request.getParameter("method").trim());
MemberManageBean mmBean = new MemberManageBean();
if(method.equals("DELMEMBER")||method.equals("DELCO")||method.equals("DELTODAY")
||method.equals("DELALLCLOSE")||method.equals("DELALLUSE")){//删除来自后台各个页面的会员
* 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);
String sysdir = new SystemBean().getDir();
HttpSession session = request.getSession();
String date=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
try{
String s = new String(m_binArray,i,(j - i) + 1);
return s;
}
private String getFileName(String s)
{
//String s1 = ""; // = new String();
//String s2 = ""; // = new String();
//boolean flag = false;
//boolean flag1 = false;
//boolean flag2 = false;
int i = 0;
i = s.lastIndexOf('/');
if(i != -1)
{
return s.substring(i + 1,s.length());
}
i = s.lastIndexOf('\\');
if(i != -1)
{
return s.substring(i + 1,s.length());
}
else
{
return s;
}
}
public void setDeniedFilesList(String s) throws ServletException,IOException,SQLException
{
//String s1 = "";
if(s != null)
{
String s2 = "";
for(int i = 0;i < s.length();i++)
{
if(s.charAt(i) == ',')
{
if(!m_deniedFilesList.contains(s2))
{
m_deniedFilesList.addElement(s2);
}
s2 = "";
}
else
{
s2 = s2 + s.charAt(i);
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>
*
* 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
*/
if(method.equals("DELMEMBER")||method.equals("DELCO")||method.equals("DELTODAY")
||method.equals("DELALLCLOSE")||method.equals("DELALLUSE")){//删除来自后台各个页面的会员
String check[] = request.getParameterValues("checkit");
if(check == null){
if(method.equals("DELMEMBER")){//来自所有个人会员页面
request.setAttribute("message", "请选择要删除的记录!");
request.getRequestDispatcher(sysdir+"/member/person.jsp").forward(request, response);
}
else if(method.equals("DELCO")){//来自所有企业会员页面
request.setAttribute("message", "请选择要删除的记录!");
request.getRequestDispatcher(sysdir+"/member/co.jsp").forward(request, response);
}
else if(method.equals("DELTODAY")){//来自今日注册会员页面
request.setAttribute("message", "请选择要删除的记录!");
request.getRequestDispatcher(sysdir+"/member/today.jsp").forward(request, response);
}
else if(method.equals("DELALLCLOSE")){//来自所有冻结会员页面
request.setAttribute("message", "请选择要删除的记录!");
request.getRequestDispatcher(sysdir+"/member/close.jsp").forward(request, response);
}
else if(method.equals("DELALLUSE")){//来自所有在用会员页面
request.setAttribute("message", "请选择要删除的记录!");
request.getRequestDispatcher(sysdir+"/member/using.jsp").forward(request, response);
}
}
else{
int id[]= new int[check.length];
for(int i = 0;i<check.length;i++){
int s = Integer.parseInt(check[i]);
id[i] = s;
}
int flag = mmBean.delMember(id);
if(flag == Constant.SUCCESS){
if(method.equals("DELMEMBER")){//来自所有个人会员页面
request.getRequestDispatcher(sysdir+"/member/person.jsp").forward(request, response);
}
else if(method.equals("DELCO")){//来自所有企业会员页面
request.getRequestDispatcher(sysdir+"/member/co.jsp").forward(request, response);
}
else if(method.equals("DELTODAY")){//来自今日注册会员页面
request.getRequestDispatcher(sysdir+"/member/today.jsp").forward(request, response);
}
else if(method.equals("DELALLCLOSE")){//来自所有冻结会员页面
request.getRequestDispatcher(sysdir+"/member/close.jsp").forward(request, response);
}
else if(method.equals("DELALLUSE")){//来自所有在用会员页面
int flag = memberBean.personReg(username, password, type, realname, sex, bir,sheng,city, telphone, email, question, answer, lastip, off,address);
if(flag == Constant.SUCCESS){
List siteList = new SystemBean().getSiteInfo();
String sitename = siteList.get(0).toString();
request.setAttribute("message", "注册成功!恭喜您成为"+sitename+"的注册会员!");
request.getRequestDispatcher("login.jsp").forward(request, response);
}
else{
request.setAttribute("message", "系统维护中,请稍后再试!");
request.getRequestDispatcher("personreg.jsp").forward(request, response);
}
}
else{
request.setAttribute("message", "该身份证已经被注册!");
request.getRequestDispatcher("personreg.jsp").forward(request, response);
}
}
else if(method.equals("UPREGINFO")){//个人会员修改资料
String member=(String)session.getAttribute("member");
String type=(String)session.getAttribute("type");
if(member==null||type==null){
response.sendRedirect("error.jsp");
}
else{
String realname = Filter.escapeHTMLTags(request.getParameter("realname").trim());
String sex = Filter.escapeHTMLTags(request.getParameter("sex").trim());
String sheng = Filter.escapeHTMLTags(request.getParameter("sheng").trim());
String city = Filter.escapeHTMLTags(request.getParameter("city").trim());
String bir = Filter.escapeHTMLTags(request.getParameter("bir").trim());
String telphone = Filter.escapeHTMLTags(request.getParameter("telphone").trim());
String email = Filter.escapeHTMLTags(request.getParameter("email").trim());
String question = Filter.escapeHTMLTags(request.getParameter("question").trim());
String answer = Filter.escapeHTMLTags(request.getParameter("answer").trim());
String address = Filter.escapeHTMLTags(request.getParameter("address").trim());
int flag = memberBean.uppersonReg(member, realname, sex, bir, sheng, city, telphone, email, question, answer,address);
if(flag == Constant.SUCCESS){
request.setAttribute("message", "操作成功!");
request.getRequestDispatcher("member/info/info.jsp").forward(request, response);
}
else{
request.setAttribute("message", "系统维护中,请稍后再试!");
request.getRequestDispatcher("member/info/info.jsp").forward(request, response);
}
}
*/
public MemberManageAction() {
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>
*
* 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(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
String sysdir = new SystemBean().getDir();
HttpSession session = request.getSession();
try{
String username2 = (String)session.getAttribute("user");
if(username2 == null){