• 大小: 11KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-09
  • 语言: Java
  • 标签: JSP  

资源简介

JSP猜数字游戏,简单的jsp和Servlet实例

资源截图

代码片段和文件信息

package com.briup.from;

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

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginServlet extends HttpServlet {

public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doPost(request response);
}
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
request.setCharacterEncoding(“utf-8“);
response.setCharacterEncoding(“utf-8“);
String username=request.getParameter(“username“);
request.setAttribute(“username“ username);
RequestDispatcher rd=request.getRequestDispatcher(“/guess.jsp“);
rd.forward(request response);
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        333  2011-04-01 22:59  guess_liduo\.classpath

     文件        306  2011-04-01 22:59  guess_liduo\.mymetadata

     文件       1367  2011-04-01 22:59  guess_liduo\.project

     文件        398  2011-04-01 22:59  guess_liduo\.settings\.jsdtscope

     文件        255  2011-04-01 22:59  guess_liduo\.settings\CVS\Entries

     文件         22  2011-04-01 22:59  guess_liduo\.settings\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\.settings\CVS\Root

     文件        333  2011-04-01 22:59  guess_liduo\.settings\org.eclipse.jdt.core.prefs

     文件         49  2011-04-01 22:59  guess_liduo\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2011-04-01 22:59  guess_liduo\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        168  2011-04-01 22:59  guess_liduo\CVS\Entries

     文件         12  2011-04-01 22:59  guess_liduo\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\CVS\Root

     文件         11  2011-04-01 22:59  guess_liduo\src\com\briup\CVS\Entries

     文件         26  2011-04-01 22:59  guess_liduo\src\com\briup\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\src\com\briup\CVS\Root

     文件         50  2011-04-01 22:59  guess_liduo\src\com\briup\from\CVS\Entries

     文件         31  2011-04-01 22:59  guess_liduo\src\com\briup\from\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\src\com\briup\from\CVS\Root

     文件        900  2011-04-01 22:59  guess_liduo\src\com\briup\from\LoginServlet.java

     文件         12  2011-04-01 22:59  guess_liduo\src\com\CVS\Entries

     文件         20  2011-04-01 22:59  guess_liduo\src\com\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\src\com\CVS\Root

     文件         10  2011-04-01 22:59  guess_liduo\src\CVS\Entries

     文件         16  2011-04-01 22:59  guess_liduo\src\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\src\CVS\Root

     文件       1233  2011-04-01 22:59  guess_liduo\WebRoot\.#guess.jsp.1.2

     文件        171  2011-04-01 22:59  guess_liduo\WebRoot\CVS\Entries

     文件         20  2011-04-01 22:59  guess_liduo\WebRoot\CVS\Repository

     文件         69  2011-04-01 22:59  guess_liduo\WebRoot\CVS\Root

............此处省略42个文件信息

评论

共有 条评论