锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩亚洲免费,日韩有码在线观看,最新欧美精品一区二区三区http://www.aygfsteel.com/hurray/category/31481.htmlzh-cnThu, 15 May 2008 15:05:36 GMTThu, 15 May 2008 15:05:36 GMT60[杞琞getAttribute鍜実etParameter鐨勫尯鍒?/title><link>http://www.aygfsteel.com/hurray/archive/2008/05/15/200666.html</link><dc:creator>hurray</dc:creator><author>hurray</author><pubDate>Thu, 15 May 2008 08:03:00 GMT</pubDate><guid>http://www.aygfsteel.com/hurray/archive/2008/05/15/200666.html</guid><wfw:comment>http://www.aygfsteel.com/hurray/comments/200666.html</wfw:comment><comments>http://www.aygfsteel.com/hurray/archive/2008/05/15/200666.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/hurray/comments/commentRss/200666.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/hurray/services/trackbacks/200666.html</trackback:ping><description><![CDATA[<p><span style="font-size: 12pt"><span style="font-size: 12pt">getAttribute鍜実etParameter鐨勫尯鍒?/span></span></p> <p><span style="font-size: 10pt"><span style="font-size: 12pt">1.getAttribute鏄彇寰梛sp涓敤setAttribute璦畾鐨刟ttribute<br /> 2.parameter寰楀埌鐨勬槸string錛沘ttribute寰楀埌鐨勬槸object<br /> 3.request.getParameter()鏂規硶浼犻掔殑鏁版嵁錛屼細浠嶹eb瀹㈡埛绔紶鍒癢eb鏈嶅姟鍣ㄧ錛屼唬琛℉TTP璇鋒眰鏁版嵁錛況equest.setAttribute()鍜実etAttribute()鏂規硶浼犻掔殑鏁版嵁鍙細瀛樺湪浜嶹eb瀹瑰櫒鍐呴儴錛屽湪鍏鋒湁杞彂鍏崇郴鐨刉eb緇勪歡涔嬮棿鍏變韓銆傚嵆request.getAttribute()鏂規硶榪斿洖request鑼冨洿鍐呭瓨鍦ㄧ殑瀵硅薄錛岃宺equest.getParameter()鏂規硶鏄幏鍙杊ttp鎻愪氦榪囨潵鐨勬暟鎹?/span></span></p> <p><span style="font-size: 10pt"><span style="font-size: 12pt">JSP涓璯etParameter涓巊etAttribute鏈変綍鍖哄埆錛?br /> 鈥斺旇瀹炶瘽錛岃繖涓棶棰樺綋鍒濇垜涔熷洶鎯戝緢涔咃紝鎴戜篃鐭ラ亾鎬庝箞鐢紝鍙槸鍒板簳鏈変粈涔堝尯鍒紝鎴戜篃涓嶆槸寰堟竻妤氾紝鍚庢潵鎵句簡寰堝璧勬枡鎵嶆槑鐧姐傛槰澶╁張鏈変竴浣嶆湅鍙嬮棶鎴戣繖涓棶棰橈紝鎯蟲垜褰撳垵鍚屾牱涔熷洶鎯戣繃錛屼簬鏄垜灝辨妸榪欎釜闂璐村嚭鏉ワ紝璁╁悓鏍峰洶鎯戠殑鏈嬪弸瑙f儜銆?br /> 鈥斺攇etParameter寰楀埌鐨勯兘鏄疭tring綾誨瀷鐨勩傛垨鑰呮槸http://a.jsp?id=123涓殑123錛屾垨鑰呮槸鏌愪釜琛ㄥ崟鎻愪氦榪囧幓鐨勬暟鎹?br /> 鈥斺攇etAttribute鍒欏彲浠ユ槸瀵硅薄銆?br /> 鈥斺攇etParameter()鏄幏鍙朠OST/GET浼犻掔殑鍙傛暟鍊鹼紱<br /> 鈥斺攇etAttribute()鏄幏鍙栧璞″鍣ㄤ腑鐨勬暟鎹鹼紱<br /> 鈥斺攇etParameter錛氱敤浜庡鎴風閲嶅畾鍚戞椂錛屽嵆鐐瑰嚮浜嗛摼鎺ユ垨鎻愪氦鎸夋壄鏃朵紶鍊肩敤錛屽嵆鐢ㄤ簬鍦ㄧ敤琛ㄥ崟鎴杣rl閲嶅畾鍚戜紶鍊兼椂鎺ユ敹鏁版嵁鐢ㄣ?br /> 鈥斺攇etAttribute錛氱敤浜庢湇鍔″櫒绔噸瀹氬悜鏃訛紝鍗沖湪sevlet涓嬌鐢ㄤ簡forward鍑芥暟,鎴杝truts涓嬌鐢ㄤ簡mapping.findForward銆俫etAttribute鍙兘鏀跺埌紼嬪簭鐢╯etAttribute浼犺繃鏉ョ殑鍊箋?br /> 鈥斺攇etParameter()鏄幏鍙朠OST/GET浼犻掔殑鍙傛暟鍊鹼紱<br /> 鈥斺攇etAttribute()鏄幏鍙朣ESSION鐨勫鹼紱<br /> 鍙﹀錛屽彲浠ョ敤setAttribute,getAttribute鍙戦佹帴鏀跺璞?鑰実etParameter鏄劇劧鍙兘浼犲瓧絎︿覆銆?br /> setAttribute 鏄簲鐢ㄦ湇鍔″櫒鎶婅繖涓璞℃斁鍦ㄨ欏甸潰鎵瀵瑰簲鐨勪竴鍧楀唴瀛樹腑鍘伙紝褰撲綘鐨勯〉闈㈡湇鍔″櫒閲嶅畾鍚戝埌鍙︿竴涓〉闈㈡椂錛屽簲鐢ㄦ湇鍔″櫒浼氭妸榪欏潡鍐呭瓨鎷瘋礉鍙︿竴涓〉闈㈡墍瀵瑰簲鐨勫唴瀛樹腑銆傝繖鏍穏etAttribute灝辮兘鍙栧緱浣犳墍璁句笅鐨勫鹼紝褰撶劧榪欑鏂規硶鍙互浼犲璞°俿ession涔熶竴鏍鳳紝鍙槸瀵硅薄鍦ㄥ唴瀛樹腑鐨勭敓鍛藉懆鏈熶笉涓鏍瘋屽凡銆?br /> getParameter鍙槸搴旂敤鏈嶅姟鍣ㄥ湪鍒嗘瀽浣犻佷笂鏉ョ殑request欏甸潰鐨勬枃鏈椂錛屽彇寰椾綘璁懼湪琛ㄥ崟鎴杣rl閲嶅畾鍚戞椂鐨勫箋?/span></span></p> <p><span style="font-size: 10pt"><span style="font-size: 12pt">getParameter <wbr> <wbr> 榪斿洖鐨勬槸String, <wbr> <wbr> 鐢ㄤ簬璇誨彇鎻愪氦鐨勮〃鍗曚腑鐨勫? <wbr> <wbr> <wbr> <wbr> <wbr> <wbr><br /> getAttribute <wbr> <wbr> 榪斿洖鐨勬槸Object錛岄渶榪涜杞崲,鍙敤setAttribute璁劇疆鎴愪換鎰忓璞★紝浣跨敤寰堢伒媧伙紝鍙殢鏃剁敤錛?br /> <br /> <br /> <span style="font-size: 10pt">鍘熸枃鍦板潃: http://blog.sina.com.cn/s/blog_3e3cdc09010009g2.html</span></span></span></p> <img src ="http://www.aygfsteel.com/hurray/aggbug/200666.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/hurray/" target="_blank">hurray</a> 2008-05-15 16:03 <a href="http://www.aygfsteel.com/hurray/archive/2008/05/15/200666.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MyEclipse涓嬪紑鍙慗DBC渚嬪瓙http://www.aygfsteel.com/hurray/archive/2008/05/14/200421.htmlhurrayhurrayWed, 14 May 2008 08:30:00 GMThttp://www.aygfsteel.com/hurray/archive/2008/05/14/200421.htmlhttp://www.aygfsteel.com/hurray/comments/200421.htmlhttp://www.aygfsteel.com/hurray/archive/2008/05/14/200421.html#Feedback0http://www.aygfsteel.com/hurray/comments/commentRss/200421.htmlhttp://www.aygfsteel.com/hurray/services/trackbacks/200421.html濂戒箙娌″ソ濂藉噣涓嬪績鏉ュ啓浠g爜浜?涔犳儻浜哻trl+c,ctrl+v,鍙戠幇鐜板湪榪炴渶綆鍗曠殑jdbc榪炴帴閮藉繕璁版庝箞鍐欎簡,鎰熻阿beansoft鐨勫鐚?鍊熺潃鐔熸倝MyEclipse涓嬬殑寮鍙?濂藉ソ鍐欏啓浠g爜.灝辮繖涔堜釜綆鍗曠殑渚嬪瓙,涔熸槸鍐欏啓鍋滃仠鐨?鐪嬫潵榪樿鍕ゅ姞緇冧範鍟?

package biz;

import java.sql.*;

public class JDBCHelloWorld{
    
public static void main(String[] args){
        
try{
            Class.forName(
"com.mysql.jdbc.Driver");
        }
catch(ClassNotFoundException e) {
            
// TODO Auto-generated catch block
            e.printStackTrace();
        }

        Connection conn 
= null;
        Statement stmt 
= null;
        ResultSet rs 
= null;
        
try{
            conn 
= java.sql.DriverManager.getConnection("jdbc:mysql://localhost:3306/test?useUnicode=true&charcterEnconding=GBK","root",null);
            stmt 
= conn.createStatement();
            stmt.executeUpdate(
"insert into student(username,password,age) values('鐜嬩簲','1234',25)");
            rs 
= stmt.executeQuery("select id,username,password,age from student");
            
while(rs.next()){
                System.out.println(
"濮撳悕=" + rs.getString("username"));
                System.out.println(
"瀵嗙爜=" + rs.getString("password"));
                System.out.println(
"騫撮緞=" + rs.getString("age"));
            }

        }
catch(SQLException e){
            e.printStackTrace();
        }
finally{
            
try{
                rs.close();
            }
catch(SQLException e) {
                
// TODO Auto-generated catch block
                e.printStackTrace();
            }

            
try{
                stmt.close();
            }
catch(SQLException e) {
                
// TODO Auto-generated catch block
                e.printStackTrace();
            }

            
try{
                conn.close();
            }
catch(SQLException e) {
                
// TODO Auto-generated catch block
                e.printStackTrace();
            }

        }

        
    }

}



hurray 2008-05-14 16:30 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 梅河口市| 黑河市| 麻栗坡县| 英德市| 合江县| 天津市| 沛县| 鄂托克前旗| 甘谷县| 金堂县| 昌都县| 邯郸市| 界首市| 茶陵县| 民丰县| 玉树县| 伊吾县| 古浪县| 富顺县| 安仁县| 玛纳斯县| 通海县| 常德市| 蛟河市| 苗栗市| 吴堡县| 莱阳市| 汽车| 剑川县| 祁门县| 林周县| 四子王旗| 张家界市| 吴桥县| 连江县| 独山县| 疏勒县| 密山市| 宜昌市| 即墨市| 子洲县|