• 大小: 1.84MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-06
  • 语言: Java
  • 标签: 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\.settings\org.eclipse.core.resources.prefs
     文件         364  2017-12-27 14:24  exam\.settings\org.eclipse.jdt.core.prefs
     文件         464  2017-12-27 14:24  exam\.settings\org.eclipse.wst.common.component
     文件         345  2017-12-27 14:24  exam\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-12-27 14:24  exam\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-12-27 14:24  exam\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-12-28 23:31  exam\WebContent\
     文件        1148  2017-12-28 18:44  exam\WebContent\LoginSuccess.jsp
     目录           0  2017-12-27 23:34  exam\WebContent\meta-INF\
     文件        1033  2017-12-27 15:01  exam\WebContent\meta-INF\LoginSuccess.jsp
     文件          39  2017-12-27 14:24  exam\WebContent\meta-INF\MANIFEST.MF
     目录           0  2017-12-28 19:51  exam\WebContent\WEB-INF\
     目录           0  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\
     文件      231320  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\commons-beanutils-1.8.0.jar
     文件      575389  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\commons-collections-3.2.1.jar
     文件      279193  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\commons-lang-2.5.jar
     文件       60686  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\commons-logging-1.1.1.jar
     文件       86487  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\ezmorph-1.0.6.jar
     文件      159123  2017-12-28 21:36  exam\WebContent\WEB-INF\lib\json-lib-2.4-jdk15.jar
     文件      584207  2017-12-27 17:00  exam\WebContent\WEB-INF\lib\sqljdbc4.jar
     文件         652  2017-12-28 21:50  exam\WebContent\WEB-INF\web.xml
     文件        2120  2017-12-28 21:55  exam\WebContent\ajax.jsp
     文件        1639  2017-12-28 19:50  exam\WebContent\index.js
     文件        2083  2017-12-28 18:06  exam\WebContent\infojieshou.jsp
     文件      268039  2017-12-28 21:46  exam\WebContent\jquery-3.2.1.js
     文件         559  2017-12-27 15:02  exam\WebContent\login.jsp
............此处省略35个文件信息

评论

共有 条评论