Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Jsp ÏÂÔØÔ¶³ÌÎļþÖÁ·þÎñÆ÷

ÎÒÊÇÔÚÒÔÏÂÕâÁ½ÖÖÇé¿öÏÂʹÓõ½Õâ¸öÎļþµÄ£º
µ±ÄãÐèÒªÏò·þÎñÆ÷ÉÏ´«Ò»¸öÎļþ£¬µ«ÊÇÕâ¸öÎļþ²¢²»ÔÚÄãµÄ±¾»úÉÏ£¬¶øÇÒÔÚÁíһ̨·þÎñÆ÷ÉÏ£¬µ«ÊÇÄãÓÖûÓб¾Ì¨·þÎñÆ÷µÄÔ¶³Ì×ÀÃæµÄȨÏÞÈÃËüÈ¥ÏÂÔØÄǸöÎļþ£¬ÕâʱÄã¾Í¿ÉÒÔʹÓôËÎļþÈ¥ÏÂÔØ¡£
¶þ¾ÍÊÇÄ¿±ê·þÎñÆ÷µÄÉÏ´«Ëٶȷdz£µÄÂý£¬ÓÚÊÇÎÒ½«ÎļþÏÈ´«µ½ÁËÁíһ̨ÉÏ´«ËٶȽϿìµÄ·þÎñÆ÷ÉÏ£¬È»ºóÈÃÄ¿±ê·þÎñÆ÷ÀûÓÃÕâ¸öÎļþÈ¥ÄÇ̨ËٶȽϿìµÄ·þÎñÆ÷ÏÂÔØ¡£¡£
¼ÇµÃÒÔǰµÄºÚ¿ÍÔÓÖ¾ÉÏ×ÜÊÇд×ÅÄÇȺÈËÃÇÔÚÉÏ´«Îļþµ½ÒªÈëÇֵķþÎñÆ÷µÄʱºò¾ÍÊÇÀûÓõÄÀàËÆµÄ·½·¨¡£Ö»²»¹ýÓõÄÊÇVBS¾Ó¶à¡£
 ÏÂÃæÁ½¸ö¶¼¿ÉÒÔÓ㬾ÍÊÇÏÔʾµÄЧ¹û²»Ò»Ñù¡£¡£
01.<%@page pageEncoding="utf-8" import="java.io.*,java.net.*"%>
02.<HTML>
03.<HEAD>
04.<SCRIPT TYPE="text/javascript">
05. var dataSize = 0;
06. function update(total) {
07. document.body.innerHTML = "ÒÑÏÂÔØ"+total+"/"+dataSize+"×Ö½Ú£¡";
08. }
09.</SCRIPT>
10.</HEAD>
11.<BODY>
12.<%
13.try {
14. String downFileUrl = request.getParameter("url"); //ÒªÏÂÔØµÄÎļþµÄURL¡£
15. String savePath = request.getParameter("savepath"); //ÒªÁí´æÎªµÄ·¾¶
16. String fileName = request.getParameter("filename"); //ÒªÁí´æÎªµÄÎļþÃû
17.
18. fileName = fileName != null ? fileName : downFileUrl.substring(downFileUrl.lastIndexOf("/") + 1); //È¡ÎļþÃû
19. savePath = (savePath) != null ? savePath + "/" + fileName : application.getRealPath("") + "/" + fileName; //È¡±£´æÂ·¾¶µÄ¾ø¶ÔµØÖ·
20.
21. URL downUrl = new URL(downFileUrl);
22. URLConnection conn = downUrl.openConnection();
23.
24. int dataSize = conn.getContentLength(); //È¡µÃÒªÏÂÔØµÄÊý¾ÝµÄ³¤¶È
25. out.println("<SCRIPT>dataSize = "+dataSize+";</SCRIPT>");
26.
27. BufferedInputStream in = new BufferedInputStream(conn.getInputStream());
28. BufferedOutputStream outS = new BufferedOutputStream(new FileOutputStream(new File(savePath)));
29.
30. byte[] data = new byte[1024];
31. long total = 0;
32.


Ïà¹ØÎĵµ£º

xml£¬jsp,dtd,xsd ÌáʾÐÅÏ¢

½øÈëMyEclipse6.XÏÂ
Ð޸ģºeclipse.ini Îļþ
-Duser.language=en
¸Ä³É
-Duser.language=zh
µ¯³öÌáʾ£ºCtrl+"/"
dtd ÃüÃû¿Õ¼äµÄÌáʾÐÅÏ¢
window-->Preference-->xml-->XML Catalog-->add
Location :sql-map-2.dtd
key type :pubic ID
key:-//ibatis.apache.org//DTD SQL Map 2.0//EN (XMLÎļþÃüÃû¿Õ¼ ......

jfreechartʹÓÃÐĵÃÓëÀý×Ó(jsp)

jsp JFreeChartʹÓÃÐĵÃÓëÀý×Ó
2009-07-01 10:27
Ò»¡¢JFreeChartµÄ½éÉÜÓë»ñÈ¡ JFreeChart¿ª·¢°üÊÇÒ»¸ö¿ªÔ´µÄJavaͼÐοª·¢°ü,Ëü´ÓÖùÐÎͼ£¬±ýÐÎͼ£¬µ½À×´ïͼ£¬À¯ÖòͼµÈµÈÎÞËù²»°ü,¿ÉÒÔÔÚc/s,b/s,ÉõÖÁÊÇʵʱ»·¾³¶¼ÄÜÒ»ÏÔÉíÊÖ¡£
µ±Ç°µÄJFreeChartµÄ×îа汾Ϊjfreechart-1.0.11.zip¡£¿ÉÒÔµ½http://www.jfree.org/jfreechart/ ......

tomcatÏÂjsp²»Äܸüд¦Àí

ij¸öjspÒ³ÃæµÚÒ»´ÎÔËÐÐʱ£¬tomcat»á°ÑËü±àÒë³ÉjavaÎļþ£¬ÒÔºóÔËÐиÃÒ³ÃæÊ±£¬tomcat»á¶Ô±ÈjspºÍjavaÎļþµÄÈÕÆÚ£¬Èç¹ûСÓÚ»òµÈÓÚjavaÎļþÔòÈÏΪÊÇjavaÎļþÊÇ×îеÄ,¾ÍÖ±½ÓÔËÐÐÁË
tomcat ÏÂÓиöworkĿ¼,ÀïÃæÓÐÄãËùÓÐÓ¦ÓÃ./tomcat6/work/Catalina/localhost¡£ËùÓеÄjspÒ³ÃæÊ×ÏÈÒª±»±àÒë³É.class
ÔÚÔËÐÐʱ,tomcat»áÖ±½Ó¼ÓÔØcl ......

jsp£¬java¼ÓͼƬˮӡ,ÎÄ×Öˮӡ

Õâ¸öÊǼÓͼƬˮӡµÄ!
package com.pic;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.awt.image.*;
import org.w3c.dom.*;
import com.sun.image.codec.jpeg.*;
import javax.imageio.*;
public class ImgBean_i{
public void ImgBean_i(){
}
public void ImgYin(S ......

´«ÖDz¥¿Í 2010 1 6 ¾Å¡¢JSP(1)_JSP¼¼Êõ


       JSP£¨Java Server Pages£©ÊÇÒ»ÖÖ¶¯Ì¬web×ÊÔ´µÄ¿ª·¢¼¼Êõ£¬servlet¼¼ÊõÄÜÍê³ÉµÄËùÓй¦ÄÜ£¬Ê¹ÓÃJSP¼¼ÊõͬÑùÒ²¿ÉÒÔÍê³É¡£µ«ÔÚ³¤ÆÚµÄÈí¼þʵ¼ùÖУ¬¸ù¾Ýservlet¼¼ÊõºÍJSP¼¼Êõ¸÷×ÔµÄÌØµã£¬ÈËÃÇÖð½¥°Ñservlet×÷ΪwebÓ¦ÓÃÖеĿØÖÆÆ÷×é¼þÀ´Ê¹Ó㬶ø°ÑJSP¼¼Êõ×÷ΪÊý¾ÝÏÔʾģ°åÀ´Ê¹Óá£
Ò»¡¢JSP ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ