期末javaweb的一个项目


这是我的一个期末项目,是关于Javaweb的,主要实现的功能是用户的注册,用户的登陆,和连接数据库时的检验数据是否存在,和将数据写入数据库。
资源截图
代码片段和文件信息
package edu.njpi.info.soft;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@WebServlet(“/CheckCode“)
public class CheckCode extends HttpServlet {
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding(“utf-8“);
        String inCode = request.getParameter(“input_code“);
        HttpSession session = request.getSession();
        int result = 0;
        if(session.getAttribute(“code“).toString().equalsIgnoreCase(inCode)){
            result = 1;
        } 
        response.setCharacterEncoding(“utf-8“);
        response.setContentType(“text“);
        PrintWriter out = response.getWriter();
        out.println(result);
        out.flush();
}

protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
doGet(request response);
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-27 14:24  exam
     文件        1455  2017-12-28 21:37  exam.classpath
     文件         904  2017-12-27 14:24  exam.project
     目录           0  2017-12-27 14:43  exam.settings
     文件         567  2017-12-27 14:24  exam.settings.jsdtscope
     文件          72  2017-12-28 21:48  exam.settingsorg.eclipse.core.resources.prefs
     文件         364  2017-12-27 14:24  exam.settingsorg.eclipse.jdt.core.prefs
     文件         464  2017-12-27 14:24  exam.settingsorg.eclipse.wst.common.component
     文件         345  2017-12-27 14:24  exam.settingsorg.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-12-27 14:24  exam.settingsorg.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-12-27 14:24  exam.settingsorg.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-12-28 23:31  examWebContent
     文件        1148  2017-12-28 18:44  examWebContentLoginSuccess.jsp
     目录           0  2017-12-27 23:34  examWebContentmeta-INF
     文件        1033  2017-12-27 15:01  examWebContentmeta-INFLoginSuccess.jsp
     文件          39  2017-12-27 14:24  examWebContentmeta-INFMANIFEST.MF
     目录           0  2017-12-28 19:51  examWebContentWEB-INF
     目录           0  2017-12-28 21:36  examWebContentWEB-INFlib
     文件      231320  2017-12-28 21:36  examWebContentWEB-INFlibcommons-beanutils-1.8.0.jar
     文件      575389  2017-12-28 21:36  examWebContentWEB-INFlibcommons-collections-3.2.1.jar
     文件      279193  2017-12-28 21:36  examWebContentWEB-INFlibcommons-lang-2.5.jar
     文件       60686  2017-12-28 21:36  examWebContentWEB-INFlibcommons-logging-1.1.1.jar
     文件       86487  2017-12-28 21:36  examWebContentWEB-INFlibezmorph-1.0.6.jar
     文件      159123  2017-12-28 21:36  examWebContentWEB-INFlibjson-lib-2.4-jdk15.jar
     文件      584207  2017-12-27 17:00  examWebContentWEB-INFlibsqljdbc4.jar
     文件         652  2017-12-28 21:50  examWebContentWEB-INFweb.xml
     文件        2120  2017-12-28 21:55  examWebContentajax.jsp
     文件        1639  2017-12-28 19:50  examWebContentindex.js
     文件        2083  2017-12-28 18:06  examWebContentinfojieshou.jsp
     文件      268039  2017-12-28 21:46  examWebContentjquery-3.2.1.js
     文件         559  2017-12-27 15:02  examWebContentlogin.jsp
............此处省略35个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)