A. 求一個用java web寫的注冊登錄界面(分為兩種用戶) 用JDBC連資料庫
功能主要是登錄注冊,兩種不同的用戶登錄成功後顯示不同的畫面,資料庫Mysql
可選中1個或多個下面的關鍵詞,搜索相關資料。也可直接點「搜索資料」搜索整個問題。
登錄界面
資料庫
java
web
jdbc
B. java web如何實現:新用戶在注冊界面注冊後,點擊 submit 按鈕,自動跳轉到登陸頁面
點擊submit提交按鈕後,會找到form表單中的「action」標記, 通過action標記中的內容找到對應servlet,然後運行servlet中的doXX(dopost/doget)方法,通過方法中的業務實現,一般的實現方法是forward(跳轉)和redirect(重定向)。
C. 在寫一個簡單的JavaWeb注冊登錄頁面,jsp+servlet+service++xml+bean來實現。
你是把jsp載入到MyEclipse中打開的嗎?你應該是直接打開的吧?
你可以按照我說的方法來寫:
1,設計資料庫
2. 寫javaBean
3.在中寫方法和方法的實現
4,完成Servlet
5.寫jsp頁面
6.在XML中配置
7,啟動伺服器,運行
D. 用java web做的一個登陸注冊界面,但登陸界面做完,servlet一直報錯,jsp部分也不能進行頁面跳轉
form action 指向的位置是你在web.xml裡面配置的loginServlet的urlplattern嗎 只用填/你設置的名字 不用全路徑的 試試
E. javaweb的學生注冊登錄(學號,姓名,密碼),刪除,修改
如果不多的話就直接修改 要更新就 update table set id='19'+substring(id,1,4)+'00'+substring(id,5,3)
F. 大神,跪求java web 一個用戶用戶注冊登錄,不用連接資料庫,不要連接資料庫!!
這個簡單,定義一個static Map<String,User>,每注冊一個就往Map中put一條數據,以登錄名為key,以用戶User類為value。
登錄的時候拿著登錄名去找Map,如果有匹配到就對比密碼是否正確,密碼輸入正確就表示可以登錄成功,密碼匹配錯誤就提示密碼錯誤;
如果拿著登錄名找Map沒有找到信息,說明此登錄名沒有注冊,就是提示注冊。
G. 用java web編寫一個用戶注冊界面(只要寫出以下要求就行)
一步步更新:頁面
<form action="regist.servlet" method="post"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableAdd borTop"> <tr> <th width="14%" height="30" nowrap>用戶名</th> <td class="pl5"> <INPUT id="sName" name="name" type="text" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>密碼</th> <td class="pl5"> <INPUT name="password" type="password" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>確認密碼</th> <td class="pl5"> <INPUT name="confrimPwd" type="password" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>性別</th> <td class="pl5"> 男<INPUT name="sex" type="radio" value="1" checked="checked" size="20"> 女<INPUT name="sex" type="radio" value="0" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>愛好</th> <td class="pl5"> <INPUT name="enjoy" type="checkbox" size="20" value="籃球">籃球 <INPUT name="enjoy" type="checkbox" size="20" value="足球">足球 </td> </tr> <tr> <th width="14%" height="30" nowrap>生日</th> <td class="pl5"> <INPUT name="brithday" type="text" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>備注</th> <td class="pl5"> <textarea rows="5" cols="200" name="remark"></textarea> </td> </tr> <tr> <th width="14%" height="30" nowrap> </th> <td class="pl5"> <input type="submit" value="提交"> <input type="reset" value="重置"> </td> </tr></table></form>
資料庫部分:
import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import com.mysql.jdbc.Connection;import com.mysql.jdbc.Statement;public class DataBaseUtil { public static Connection getConnection() throws ClassNotFoundException, SQLException { Class.forName("com.mysql.jdbc.Driver"); Connection conn = (Connection) DriverManager.getConnection("jdbc:mysql://192.168.100.113/datebase", "username", "password"); return conn; } public static Statement getPS() throws ClassNotFoundException, SQLException { Statement statement = (Statement) getConnection().createStatement(); return statement; } public static void close(Connection conn,Statement st,ResultSet rs) throws SQLException{ if(rs != null) { rs.close(); } if(st != null) { st.close(); } if(conn != null) { conn.close(); } }}
H. 用javaweb寫的簡單圖書管理系統登錄注冊不管用
簡單的說存在以下錯誤
1HandleLogin里用戶名密碼不正確,無法連接到資料庫,但未做異常處理,應該把資料庫用戶密碼設置用常量,其它文件里只讀取
2login存在兩個同名的servlet,不知道你使用的是那個,系統最後調用的是myservlet.control.HandleLogin
I. javaweb用戶登錄注冊時是在前台用js校驗,還是在後台用servlet校驗好
前台校驗不需要伺服器返回數據的選項,例如密碼為空啊,郵箱不合法啊,但是也需要後台校驗,例如用戶名重復校驗,必須提交後台查詢資料庫,返回是否重復。原則就是能前台JS校驗的就前台校驗,一來快捷,二來減少伺服器的壓力。