国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > AJAX > 正文

JQuery+Ajax+Struts2+Hibernate框架整合實現完整的登錄注冊

2024-09-01 08:28:20
字體:
來源:轉載
供稿:網友

最近在仿造一個書城的網站: http://www.yousuu.com ,UI直接拿來用,前端后端自己寫,目前大部分功能已經實現,

就把具體的 登錄注冊功能 拿來分享一下。PS:又寫登錄注冊會不會被人噴啊=。=

一、開發環境的部署

程序結構:

BootStrap+Ajax+Struts2+Hibernate+MySql

僅供參考:能實現相關功能即可

操作系統:ubuntu 14.10

前端框架:BootStrap   注:此框架只是為了實現用戶界面,和具體功能無關

數據庫:mysql-5.5 數據庫工具:emma

服務器:tomcat 服務器工具:Myeclipse 10(已配置好Struts2和Hibernate環境)

注意:

程序調試過程可能會產生亂碼,只需保持所有工具編碼方式相同即可。

二、項目文件配置

1、新建Web Project,命名為ROOT

2、配置/WebRoot/WEB-INF/web.xml

<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>ROOT</display-name> <filter>  <filter-name>struts2</filter-name>  <filter-class>     org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter   </filter-class> </filter> <filter-mapping>  <filter-name>struts2</filter-name>  <url-pattern>/*</url-pattern> </filter-mapping> <error-page>  <error-code>404</error-code>  <location>/error.jsp</location> </error-page> <error-page>  <error-code>500</error-code>  <location>/error.jsp</location> </error-page> <welcome-file-list>  <welcome-file>index.html</welcome-file>  <welcome-file>index.htm</welcome-file>  <welcome-file>index.jsp</welcome-file>  <welcome-file>default.html</welcome-file>  <welcome-file>default.htm</welcome-file>  <welcome-file>default.jsp</welcome-file> </welcome-file-list></web-app>

3 、 配置/src/struts.xml(struts配置文件),其他的action和interceptor被我刪了,這點夠用了。

<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"><struts> <package name="default" namespace="/" extends="struts-default">  <!-- 登錄 -->  <action name="login" class="com.action.Login" method="login"></action>  <!-- 登出 -->  <action name="logout" class="com.action.Logout" method="logout"></action>  <!-- 注冊 -->   <action name="register" class="com.action.Register" method="register"></action>  <!-- 郵件發送 -->   <action name="sendmail" class="com.action.SendMail" method="sendmail"></action> </package></struts>             
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 灵寿县| 大洼县| 安仁县| 赫章县| 乌苏市| 大宁县| 林甸县| 甘谷县| 巴里| 靖宇县| 邯郸县| 通许县| 那曲县| 西乌| 永济市| 云安县| 恩平市| 射阳县| 皮山县| 南丹县| 高淳县| 会理县| 甘德县| 宜良县| 河间市| 高青县| 临澧县| 黄浦区| 大连市| 东乡族自治县| 平江县| 响水县| 开鲁县| 诏安县| 东台市| 五家渠市| 尼木县| 神池县| 马关县| 嘉兴市| 通化市|