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",
....})
}
ÕâÑù·¢³öµÄÇëÇó¸úµÚÒ»ÖÖÊÇһģһÑùµÄ£¬µ«ÊÇÈ´»áµ¼ÖÂÉÏ´«µÄʧ°Ü¡£´ÓÅ׳öµÄÒì³££º
Ïà¹ØÎĵµ£º
ÔÚ½øÈëÎÒÃǽñÌìµÄ»°ÌâÇ°£¬ÏÈÀ´¿´¿´ÏÂÃæÕâ¶Î´úÂ룬ÄãÖªµÀËüµÄ½á¹ûÂð£¿
³ÌÐò´úÂë
public class StringTest1{
public static void main(String[] args) {
String str1 = "abc";
String str2 = "abc";
&nbs ......
import java.util.Arrays;
/**
* ÇóÒ»¸öÊý×éµÄÈ«ÅÅÁÐËã·¨
* @author Administrator
*/
public class Pai {
public void pai(char[] array,int start,int end){
System.out.println(" -- ×éºÏ "+start+" µ½ "+end+" --");
if(start==end){
  ......
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOExc ......
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.FileOutputStream;
import java.util.Random;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
/**
* ¹¦ÄÜÃèÊö ......
±¾ÎÄÑÝʾÁËÈçºÎͨ¹ý Java µ÷Óà Apache Ant ¹¹½¨Îļþ¡£Äú½«¼ì²é±ØÒªµÄ Java ´úÂë²¢Á˽âÈçºÎÔÚ WebSphere Application Developer ÖÐÔËÐд˴úÂë¡£
ÒýÑÔ
Apache
Ant ÊÇÒ»¸ö»ùÓÚ Java µÄ¿ª·ÅÔ´´úÂë¹¹½¨ÊµÓù¤¾ß¡£ÈËÃdz£°ÑËüÓë Make ½øÐбȽϣ¬Make
³¤ÆÚÒÔÀ´Ò»Ö±ÓÃÓÚ°ïÖú×Ô¶¯Íê³É¹¹½¨¹ý³Ì¡£¾¹ý²»Í¬°æ±¾µÄ¸Ä½ø£¬Ant Ò ......