ext2.0+java ÎļþÉÏ´«
ÎļþÉÏ´«ÆäʵÊÇÒ»¸öºÜ»ù±¾µÄÒ³Ãæ²Ù×÷£¬ÒÔÇ°Ò²×ö¹ý¡£ÔÚjsp+servletʱ£¬¹Ø¼üµãÊÇÖ»ÒªÖ¸¶¨jspÓÃÓÚÌá½»ÉÏ´«Îļþ×ÊÔ´µÄformµÄenctypeÊôÐÔΪmultipart/form- data¼´¿É¡£Õâ¸öÊôÐÔ ÆäʵÊÇÉèÖÃÁËÌá½»µÄÄÚÈÝÊÇÒÔÊý¾ÝÁ÷µÄ·½Ê½Ìá½»¸øservletµÄ¡£µ±È»Ò²°üº¬ÁËÎļþµÄÁ÷£¬ÕâÑùÔÚservletÀïÀûÓÃcommon- fileupload.jarÀïµÄ½Ó¿Ú·½·¨£¬½âÎöÕâ¸öÁ÷£¬¾Í¿ÉÒÔ»ñµÃÉÏ´«µÄÎļþµÄÐÅÏ¢¡£
½ñÌìÔÚÀûÓÃextµÄjs´úÌæÁËjspʱ£¬È´Åöµ½Á˵ãСÂé·³¡£ÏÖÔÚ×ܽáÈçÏ¡£
ÆäʵÀûÓÃextʵÏÖµÄÔÀíÊÇÒ»ÑùµÄ£¬Ö»ÊDZàдjsµÄ¹ý³ÌÖÐÒªÖ÷Òª£¬µ±·¢ËÍajaxÇëÇóʱ£¬Òª±£Ö¤Ëù·¢µÄÇëÇóÊÇÔÚenctypeΪmultipart/form-dataµÄformÖУ¬·ñÔò£¬ºǫ́ÎÞ·¨½âÎöÉÏ´«ÎļþÐÅÏ¢¡£
¶ÔÓÚ±íµ¥µÄ¶¨Òå¿ÉÒÔ²ÉÓÃÈçÏ·½·¨£º
var uploadForm = new Ext.form.FormPanel({ url: "AuthManager.do?action=addCertificate",//ajaxÇëÇóµÄµØÖ· rame:true,//ÒªÉèΪtrue fileUpload:true,//Ò»¶¨ÒªÕâÒ»Ï±íÃ÷Õâ¸ö±íµ¥ÊÇ×öÎļþÉÏ´«ËùÓà id:'uploadForm', height:130, labelAlign: 'right', bodyStyle:'padding:6px 5px 0', //enctype : 'multipart/form-data', //ÆäʵÕâÒ»ÏîÊÇûÓÐÓõģ¬fileUpload:trueµÄÁîÒ»²ãÒâ˼Ҳ¾ÍÊÇÕâ¸ö items: new Ext.form.TextField({ xtype: 'textfield', //style:'margin-top:15px ', id:'upload_filepath', name:'file', allowBlank:false, fieldLabel:'Ñ¡ÔñÎļþ', inputType:'file' //ÎļþµÄÐÎʽ }) })
ÔÚÐèÒªÍê³ÉÌá¼Û¹¦ÄܵÄʱºò£¬¿ÉÒÔÕâôµ÷ÓÃuploadForm.getForm().submit();
ÕâÀïÐèÒªÖ¸³öµÄÊÇ£¬ÓÐÒ»ÖÖ×ö·¨»áµ¼ÖÂÉÏ´«Ê§°ÜµÄ£ºformÒÀ¾ÉÊÇÈçÉϵÄд·¨£¬Ö»ÊÇÀïÃæûÓÐurlÕâÒ»¸öÊôÐÔ£¬formÊÇÔÚ·¢ËÍajaxÇëÇóʱµ÷Óõģº
var uploadWin = new Ext.Window({ title:'<span style="\" mce_style="\""font-size:12px\">ÉÏ´«Îļþ</span>', width:400, height:130, items:[uploadForm],//ÒýÈëÁËÉÏ´«ÎļþµÄ±íµ¥ buttonAlign :'center', buttons:[{ text:'<span style="\" mce_style="\""font-size:12px\">ÉÏ´«</span>', handler:uploadFile//µ÷Óú¯ÊýÍê³ÉÌá½»¶¯×÷ }] }); //µ¼ÈëÖ¤Ê麯Êýfunction uploadFile(){
Ext.Ajax.request({ url: "AuthManager.do?action=addCertificate",
....})
}
ÕâÑù·¢³öµÄÇëÇó¸úµÚÒ»ÖÖÊÇһģһÑùµÄ£¬µ«ÊÇÈ´»áµ¼ÖÂÉÏ´«µÄʧ°Ü¡£´ÓÅ׳öµÄÒì³££º
Ïà¹ØÎĵµ£º
¿Î³ÌÃèÊö£º
±¾¿Î³Ì´ÓJavaÓïÑÔ¿ªÊ¼£¬ÉîÈëdz³ö£¬ÑÐò½¥½ø£¬ÀíÂÛÓëʵ¼ùÏà½áºÏ£¬Ã¿¸ö֪ʶµã£¬Ã¿¸ö½×¶Î¶¼ÅäÓÐÓëʵ¼ÊÓ¦ÓýӽüµÄʵսÁ·Ï°£¬×îÖÕÄ¿±êΪϵͳÕÆÎÕÕû¸öJavaÌåϵ£¬Äܹ»ÊìÁ·Ê¹ÓÃ×îÁ÷ÐУ¬×îÈÈÃŵÄJava EEÏà¹Ø¼¼Êõ¼°Æ俪·¢¹¤¾ß¿ª·¢ÆóÒµ¼¶Ó¦Óá£
Ô¤±¸ÖªÊ¶£º
l ......
¡¡¡¡1¡¢Ê²Ã´ÊÇJavaBean£¿
¡¡¡¡JavaBeanÊÇÃèÊöJavaµÄÈí¼þ×é¼þÄ£ÐÍ£¬ÓеãÀàËÆÓÚMicrosoftµÄCOM×é¼þ¸ÅÄî¡£ÔÚJavaÄ£ÐÍÖУ¬Í¨¹ýJavaBean¿ÉÒÔÎÞÏÞÀ©³äJava³ÌÐòµÄ¹¦ÄÜ£¬Í¨¹ýJavaBeanµÄ×éºÏ¿ÉÒÔ¿ìËÙµÄÉú³ÉеÄÓ¦ÓóÌÐò¡£¶ÔÓÚ³ÌÐòÔ±À´Ëµ£¬×îºÃµÄÒ»µã¾ÍÊÇJavaBean¿ÉÒÔʵÏÖ´úÂëµÄÖظ´ÀûÓ ......
ÏÂÃæÊÇÎÒÈÏΪÕýÈ·µÄ×ö·¨£¨½áºÏ×Ô¼ºµÄ¾ÑéдµÄ£¬Èç¹û²»ÕýÈ·£¬Çë´ó¼ÒÖ¸Õý£©£º
ÎҵĻæͼ¿Ø¼þÊÇJPanel£¬
³öÏÖ¹ö¶¯ÌõµÄÇ°Ìᣬ±ØÐëÈûæͼ¿Ø¼þ·ÅÔÚJScrollPaneÉÏ£¬
¶ÔÓÚJScrollPaneµÄLayout£¬Ã»ÓÐÌØÊâÒªÇó£¬ÏÂÃæÕâÑù¼´¿É£º
jScrollPane1.setViewportView(jPanel1);
È»ºó£¬ÁíÍâά³ÖÒ»¸öBufferedImage£¨¼ÙÉè½Ðimage1£©£¬¸÷ÖÖÍ¼Ï ......
ÔÚ
Java SE1.5
ÖУ¬
Ôö¼ÓÁËÒ»¸öеÄÌØÐÔ£º·ºÐÍ£¨ÈÕ±¾ÓïÖеÄ×ܳÆÐÍ£©¡£ºÎν·ºÐÍÄØ£¿Í¨Ë×µÄ˵£¬¾ÍÊÇ·º·ºµÄÖ¸¶¨¶ÔÏóËù²Ù×÷µÄÀàÐÍ£¬¶ø²»Ïñ³£¹æ·½Ê½Ò»ÑùʹÓÃijÖ̶ֹ¨µÄÀàÐÍÈ¥Ö¸¶¨¡£
·ºÐ͵ı¾ÖʾÍÊǽ«Ëù²Ù×÷µÄÊý¾ÝÀàÐͲÎÊý»¯£¬Ò²¾ÍÊÇ˵£¬¸ÃÊý¾ÝÀàÐͱ»Ö¸¶¨ÎªÒ»¸ö²ÎÊý¡£ÕâÖÖ²ÎÊýÀàÐÍ¿ÉÒÔʹÓÃÔÚÀà¡¢½Ó¿ÚÒÔ¼°·½·¨¶¨ÒåÖС£
......
Map´æ´¢µÄÊÇkey->valueµÄÖµ¶Ô£¬keyµÄÖµÊÇΨһµÄ£¬¶øvalueµÄÖµ¿ÉÒÔÖظ´¡£Í¨³£Ê¹ÓõÄÊÇHashMap»òTreeMap£¬Èç¹û¿¼ÂÇÐÔÄÜ£¬Ê¹ÓÃHashMap¡£TreeMapʹÓúìºÚÊ÷ʵÏÖ£¬±£ÁôÓÐkeyֵ˳ÐòÐÔ£¬»á×Ô¶¯°´ÕÕkeyÖµÅÅÐò¡£
ĬÈÏÊÇ°´ÕÕkeyÖµµÄÉýÐòÅÅÐò£¬keyÖµ±ØÐëʵÏÖ Comparator½Ó¿Ú¡£Èç¹ûÏ£Íû°´ÕÒÒ»¶¨¹æÔòÅÅÐò£¬ÔòÐèÒªÖØж¨Òåcompareº¯Êý ......