資源簡介
概述:實現(xiàn)登錄功能,用戶輸入帳號和密碼,通過form表單提交至后臺處理,查詢數(shù)據(jù)庫,如果用戶名和密碼均正確,則彈框提示用戶登錄成功,否則提示登錄失敗。
開發(fā)工具:eclipse Mars.2 Release (4.5.2)
服務(wù)器 :apache-tomcat-7.0.68
數(shù)據(jù)庫:MySql
前臺源碼:用到了簡單的 bootstrap 和 jquery
后臺代碼:使用了servlet
開發(fā)工具:eclipse Mars.2 Release (4.5.2)
服務(wù)器 :apache-tomcat-7.0.68
數(shù)據(jù)庫:MySql
前臺源碼:用到了簡單的 bootstrap 和 jquery
后臺代碼:使用了servlet
代碼片段和文件信息
/*
?*?Licensed?to?the?Apache?Software?Foundation?(ASF)?under?one?or?more
?*?contributor?license?agreements.??See?the?NOTICE?file?distributed?with
?*?this?work?for?additional?information?regarding?copyright?ownership.
?*?The?ASF?licenses?this?file?to?You?under?the?Apache?License?Version?2.0
?*?(the?“License“);?you?may?not?use?this?file?except?in?compliance?with
?*?the?License.??You?may?obtain?a?copy?of?the?License?at
?*
?*??????http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/
package?mypackage;
import?java.io.IOException;
import?java.io.PrintWriter;
import?javax.servlet.ServletException;
import?javax.servlet.http.HttpServlet;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
/**
?*?Simple?servlet?to?validate?that?the?Hello?World?example?can
?*?execute?servlets.??In?the?web?application?deployment?descriptor
?*?this?servlet?must?be?mapped?to?correspond?to?the?link?in?the
?*?“index.html“?file.
?*
?*?@author?Craig?R.?McClanahan?
?*/
public?final?class?Hello?extends?HttpServlet?{
????private?static?final?long?serialVersionUID?=?1L;
????/**
?????*?Respond?to?a?GET?request?for?the?content?produced?by
?????*?this?servlet.
?????*
?????*?@param?request?The?servlet?request?we?are?processing
?????*?@param?response?The?servlet?response?we?are?producing
?????*
?????*?@exception?IOException?if?an?input/output?error?occurs
?????*?@exception?ServletException?if?a?servlet?error?occurs
?????*/
????@Override
????public?void?doGet(HttpServletRequest?request
??????????????????????HttpServletResponse?response)
??????throws?IOException?ServletException?{
????????response.setContentType(“text/html“);
????????PrintWriter?writer?=?response.getWriter();
????????writer.println(““);
????????writer.println(““);
????????writer.println(“tle>Sample?Application?Servlet?Page tle>“);
????????writer.println(““);
????????writer.println(““);
????????writer.println(““);
????????writer.println(““);
????????writer.println(““);
????????writer.println(“
“);
????????writer.println(“ “);
????????writer.println(““);
????????writer.println(“Sample?Application?Servlet
“);
????????writer.println(“This?is?the?output?of?a?servlet?that?is?part?of“);
????????writer.println(“the?Hello?World?application.“);
????????writer.println(“ “);
????????writer.println(“ “);
????????writer.println(“
“);
????????writer.println(““);
????????writer.println(““);
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????838??2017-06-25?11:45??javaweb\mysql數(shù)據(jù)庫\test.sql
?????文件????????305??2020-09-11?11:39??javaweb\readme.txt
?????文件????????955??2019-05-22?12:36??javaweb\sourcecode\mysqlTest\.classpath
?????文件???????1042??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\.project
?????文件????????567??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\.settings\.jsdtscope
?????文件????????364??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\.settings\org.eclipse.jdt.core.prefs
?????文件????????479??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\.settings\org.eclipse.wst.common.component
?????文件????????345??2019-05-22?12:36??javaweb\sourcecode\mysqlTest\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件???????3860??2019-06-02?10:46??javaweb\sourcecode\mysqlTest\build\classes\com\test\LoginServlet.class
?????文件???????3640??2019-05-30?14:45??javaweb\sourcecode\mysqlTest\src\com\test\LoginServlet.java
?????文件?????141182??2017-06-25?10:19??javaweb\sourcecode\mysqlTest\WebContent\css\bootstrap.css
?????文件???????1676??2017-06-25?11:26??javaweb\sourcecode\mysqlTest\WebContent\index.jsp
?????文件??????70843??2017-06-25?10:19??javaweb\sourcecode\mysqlTest\WebContent\js\jquery.js
?????文件?????????39??2017-06-25?10:12??javaweb\sourcecode\mysqlTest\WebContent\me
?????文件?????536609??2017-06-02?09:08??javaweb\sourcecode\mysqlTest\WebContent\WEB-INF\lib\mysql-connector-java-5.0.7-bin.jar
?????文件???????1012??2017-06-25?10:47??javaweb\sourcecode\mysqlTest\WebContent\WEB-INF\web.xm
?????目錄??????????0??2019-06-02?10:46??javaweb\sourcecode\mysqlTest\build\classes\com\test
?????目錄??????????0??2019-06-02?10:46??javaweb\sourcecode\mysqlTest\build\classes\com
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\src\com\test
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\WebContent\WEB-INF\lib
?????目錄??????????0??2019-06-02?10:46??javaweb\sourcecode\mysqlTest\build\classes
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\src\com
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\WebContent\css
?????目錄??????????0??2017-06-25?10:19??javaweb\sourcecode\mysqlTest\WebContent\img
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\WebContent\js
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\WebContent\me
?????目錄??????????0??2017-06-25?11:44??javaweb\sourcecode\mysqlTest\WebContent\WEB-INF
?????目錄??????????0??2019-05-22?12:36??javaweb\sourcecode\mysqlTest\.settings
............此處省略888個文件信息
評論
共有 條評論