锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品蜜芽在线观看,亚洲欧美日韩中文视频,av电影在线播放高清免费观看http://www.aygfsteel.com/apl330/archive/2011/04/14/348267.htmljack zhaijack zhaiThu, 14 Apr 2011 00:45:00 GMThttp://www.aygfsteel.com/apl330/archive/2011/04/14/348267.htmlhttp://www.aygfsteel.com/apl330/comments/348267.htmlhttp://www.aygfsteel.com/apl330/archive/2011/04/14/348267.html#Feedback0http://www.aygfsteel.com/apl330/comments/commentRss/348267.htmlhttp://www.aygfsteel.com/apl330/services/trackbacks/348267.html涓銆亀eb.xml涓殑閰嶇疆

 1<web-app>
 2  <servlet>
 3    <servlet-name>velocity</servlet-name>
 4    <servlet-class>org.apache.velocity.tools.view.VelocityViewServlet</servlet-class>
 5  </servlet>
 6  <servlet-mapping>
 7    <servlet-name>velocity</servlet-name>
 8    <url-pattern>*.vm</url-pattern>
 9  </servlet-mapping>
10  <welcome-file-list>
11    <welcome-file>index.vm</welcome-file>
12  </welcome-file-list>
13</web-app>


浜屻佸彲閫夐厤緗畉ools.xml

<tools>
    
<data type="boolean" key="xhtml" value="true"/>
    
<data type="boolean" key="isSimple" value="true"/>
    
<data type="number" key="version" value="3.3.0"/>
    
<data key="foo">this is foo</data>
    
<data key="bar">this is bar.</data>
    
<toolbox scope="request">
        
<tool key="toytool" class="ToyTool" restrictTo="index*"/>
    
</toolbox>
    
<toolbox scope="session">
        
<tool key="map" class="java.util.HashMap"/>
    
</toolbox>
</tools>




 



jack zhai 2011-04-14 08:45 鍙戣〃璇勮
]]>
commons-FileUpload涓婁紶榪囩▼http://www.aygfsteel.com/apl330/archive/2011/03/23/346849.htmljack zhaijack zhaiWed, 23 Mar 2011 05:01:00 GMThttp://www.aygfsteel.com/apl330/archive/2011/03/23/346849.htmlhttp://www.aygfsteel.com/apl330/comments/346849.htmlhttp://www.aygfsteel.com/apl330/archive/2011/03/23/346849.html#Feedback0http://www.aygfsteel.com/apl330/comments/commentRss/346849.htmlhttp://www.aygfsteel.com/apl330/services/trackbacks/346849.html1銆?/p>

ServletFileUpload.isMultipartContent(request)

媯嫻媟equest涓槸鍚﹀寘鍚湁multipart鍐呭

2銆佸鏋滄湁錛岀敓鎴怐iskFileItemFactory宸ュ巶灝嗚繘琛岀浉鍏崇殑璁劇疆

         DiskFileItemFactory factory = new DiskFileItemFactory();
        // maximum size that will be stored in memory
        factory.setSizeThreshold(maxMemSize);
        // Location to save data that is larger than maxMemSize.
        factory.setRepository(new File("d:/"));

3銆佺敓鎴愪笂浼燬ervletFileUpload綾伙紝騫跺皢DiskFileFactory宸ュ巶浼犵粰瀹冿紝騫跺ServletFileUpload榪涜閰嶇疆

       // Create a new file upload handler
        ServletFileUpload upload = new ServletFileUpload(factory);
        // maximum file size to be uploaded.
        upload.setSizeMax(maxFileSize);

4銆佷粠request寰楀埌涓婁紶鐨勬枃浠跺垪琛?/p>

            // Parse the request to get file items.
            List fileItems = upload.parseRequest(request);

            // Process the uploaded file items
            Iterator i = fileItems.iterator();

5銆佸鐞嗘枃浠訛細鍐欏叆鎴栬呭叾浠栨搷浣?/p>

while (i.hasNext()) {
                FileItem fi = (FileItem) i.next();
                if (!fi.isFormField()) {
                    // Get the uploaded file parameters
                    String fieldName = fi.getFieldName();
                    String fileName = fi.getName();
                    String contentType = fi.getContentType();
                    boolean isInMemory = fi.isInMemory();
                    long sizeInBytes = fi.getSize();
                    // Write the file
                    if (fileName.lastIndexOf("\\") >= 0) {
                        file = new File(
                                filePath
                                        + fileName.substring(fileName
                                                .lastIndexOf("\\")));
                    } else {
                        file = new File(
                                filePath
                                        + fileName.substring(fileName
                                                .lastIndexOf("\\") + 1));
                    }
                    fi.write(file);
                    out.println("Uploaded Filename: " + fileName + "<br>");
                }
            }

}

 

璇存槑錛?/font>

FileItem鎺ュ彛鏄鐢ㄦ埛涓婁紶鏂囦歡鐨勫皝瑁?/font>

DiskFileItemFactory瀹炵幇浜咶ileItemFactory鎺ュ彛錛屼富瑕佹柟娉曟湁public FileItem createItem(String fieldName, String contentType, boolean isFormField, String fileName)

ServletFileUpload浠嶧ileUpload緇ф壙錛岃孎ileUpload鍙堜粠FileUploadBase緇ф壙錛屽姛鑳斤細鍒嗘瀽浼犲叆鐨剅equest瀵硅薄銆佸緱鍒版枃浠跺垪琛‵ileItemIterator鈥︹?/font>



jack zhai 2011-03-23 13:01 鍙戣〃璇勮
]]>
浣跨敤Dbcp鍜孌bUtils鐨勭畝鍗曞疄渚?/title><link>http://www.aygfsteel.com/apl330/archive/2011/02/22/344788.html</link><dc:creator>jack zhai</dc:creator><author>jack zhai</author><pubDate>Mon, 21 Feb 2011 16:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/apl330/archive/2011/02/22/344788.html</guid><wfw:comment>http://www.aygfsteel.com/apl330/comments/344788.html</wfw:comment><comments>http://www.aygfsteel.com/apl330/archive/2011/02/22/344788.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/apl330/comments/commentRss/344788.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/apl330/services/trackbacks/344788.html</trackback:ping><description><![CDATA[    鍙湁娉ㄥ唽鐢ㄦ埛鐧誨綍鍚庢墠鑳介槄璇昏鏂囥?a href='http://www.aygfsteel.com/apl330/archive/2011/02/22/344788.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/apl330/aggbug/344788.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/apl330/" target="_blank">jack zhai</a> 2011-02-22 00:02 <a href="http://www.aygfsteel.com/apl330/archive/2011/02/22/344788.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">咸宁市</a>| <a href="http://" target="_blank">揭阳市</a>| <a href="http://" target="_blank">葫芦岛市</a>| <a href="http://" target="_blank">虎林市</a>| <a href="http://" target="_blank">岳普湖县</a>| <a href="http://" target="_blank">南漳县</a>| <a href="http://" target="_blank">普兰县</a>| <a href="http://" target="_blank">邯郸县</a>| <a href="http://" target="_blank">陈巴尔虎旗</a>| <a href="http://" target="_blank">仲巴县</a>| <a href="http://" target="_blank">西充县</a>| <a href="http://" target="_blank">清流县</a>| <a href="http://" target="_blank">四平市</a>| <a href="http://" target="_blank">维西</a>| <a href="http://" target="_blank">昌吉市</a>| <a href="http://" target="_blank">荔波县</a>| <a href="http://" target="_blank">静安区</a>| <a href="http://" target="_blank">阿城市</a>| <a href="http://" target="_blank">措勤县</a>| <a href="http://" target="_blank">呼玛县</a>| <a href="http://" target="_blank">新源县</a>| <a href="http://" target="_blank">闸北区</a>| <a href="http://" target="_blank">长垣县</a>| <a href="http://" target="_blank">松桃</a>| <a href="http://" target="_blank">延寿县</a>| <a href="http://" target="_blank">龙岩市</a>| <a href="http://" target="_blank">怀化市</a>| <a href="http://" target="_blank">江华</a>| <a href="http://" target="_blank">新平</a>| <a href="http://" target="_blank">西贡区</a>| <a href="http://" target="_blank">新河县</a>| <a href="http://" target="_blank">北辰区</a>| <a href="http://" target="_blank">齐齐哈尔市</a>| <a href="http://" target="_blank">宜州市</a>| <a href="http://" target="_blank">县级市</a>| <a href="http://" target="_blank">西昌市</a>| <a href="http://" target="_blank">祁阳县</a>| <a href="http://" target="_blank">东台市</a>| <a href="http://" target="_blank">镶黄旗</a>| <a href="http://" target="_blank">轮台县</a>| <a href="http://" target="_blank">鹿邑县</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>