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

Jsp³£Óü¼ÇÉ:ͼƬÑéÖ¤Âë

Jsp³£Óü¼ÇÉ:ͼƬÑéÖ¤Âë
2009Äê10ÔÂ30ÈÕ ÐÇÆÚÎå 21:06
˼·
£º
ͼƬÑéÖ¤ÂëµÄʵÏÖÖ÷ÒªµÄ¼¼ÊõµãÊÇÈçºÎÉú³ÉÒ»¸öͼƬ¡£Éú³ÉͼƬ¿ÉÒÔʹÓÃjava.awt°üϵÄÀàÀ´ÊµÏÖ¡£ÎÒÃÇÏÈдһ¸ö¼òµ¥µÄÉú³ÉͼƬµÄ³ÌÐòHelloImage.java¡£ÒÔÏÂÊÇ´úÂ벿·Ö¡£
package com.vogoal.test;
import java.awt.Color;
import
java.awt.Graphics;
import java.awt.image.BufferedImage;
import
java.io.File;
import java.io.IOException;
import
javax.imageio.ImageIO;
/**
* @author SinNeR@blueidea.com
* create a
image
*/
public class HelloImage {
    public static void main(String[]
args){
        BufferedImage image = new BufferedImage(80,
25,
                BufferedImage.TYPE_INT_RGB);
        Graphics g =
image.getGraphics();
        g.setColor(new Color(255,255,255));
       
g.fillRect(0, 0, 80, 25);
        g.setColor(new Color(0,0,0));
       
g.drawString("HelloImage",6,16);
        g.dispose();
       
try{
            ImageIO.write(image, "jpeg", new
File("C:\\helloImage.jpeg"));
        }catch(IOException e){
           
e.printStackTrace();
        }
    }
}
±àÒëºó£¬ÔÚDOSϵ÷ÓÃÕâ¸ö³ÌÐò£¬Õý³£Çé¿öÏ£¬»áÔÚCÅ̸ùĿ¼ÏÂÉú³ÉÒ»ÕÅÃû×ÖhelloImage.jpegΪµÄͼƬ¡£Í¼Æ¬ÉÏÓÐÎÄ×ÖHelloImage¡£
¼òµ¥½éÉÜÏÂÉú³ÉͼƬµÄÁ÷³Ì
£º
½¨Á¢BufferedImage¶ÔÏó¡£Ö¸¶¨Í¼Æ¬µÄ³¤¶È¿í¶ÈºÍÉ«²Ê¡£
BufferedImage image = new
BufferedImage(80,25,BufferedImage.TYPE_INT_RGB);
È¡µÃGraphics¶ÔÏó£¬ÓÃÀ´»æÖÆÍ¼Æ¬¡£
Graphics g = ima


Ïà¹ØÎĵµ£º

JUnitѧϰ±Ê¼Ç16 ÓÃJSPºÍtaglib½øÐе¥Ôª²âÊÔ3

ÓÃmock objects¶Ôtaglib½øÐе¥Ôª²âÊÔ    ÒòΪJSP²»ÊÇ´¿´âµÄjava´úÂ룬ËùÒÔ£¬Ê¹ÓÃmock½øÐвâÊÔÊÇÐв»Í¨µÄ£¬µ«ÊÇ£¬taglibÈ´ÊÇ´¿´âµÄjava´úÂ룬¿ÉÒÔ²âÊÔ£¬µ«ÊÇËüÒ²ÓÐÂé·³µÄµØ·½£¬ÎÒÃÇҪΪ³éÏóµÄjavaÀàµÄPageContext´´½¨mocks¡£    ÔÚÇ°Ãæ£¬ÎÒÃÇÔøÑ§Ï°ÁËʹÓÃEasyMockºÍDynaMockµÄ¿ò¼ÜÀ´´´½¨mock£¬µ«ÊÇ£¬ ......

jspÖжÁÈ¡propertiesÎļþ

jspÖжÁÈ¡propertiesÎļþ£¬²¢°ÑÖµÉèµ½js±äÁ¿ÖУº
web_stderr.propertiesÎļþÄÚÈÝ£º
common.username.error.null = UserName can not be null.
common.username.error.invalid = UserName is invalid.
common.password.error.null = Password can not bu null.
common.password.error.invalid = Password is invalid.
......

ÔÚJSPÖÐʹÓÃpager taglib½øÐзÖÒ³´¦Àí

     ÔÚÓ¦ÓóÌÐò¿ª·¢µÄʱºò·ÖÒ³ÓÐÁ½ÖÖ:Õæ·ÖÒ³ºÍ¼Ù·ÖÒ³£¬¼Ù·ÖÒ³Òª°ÑËùÓÐÊý¾ÝÏÈÌáÈ¡³öÀ´·Åµ½Ò»¸ölist¼¯ºÏÀï»òÕß¾²Ì¬±äÁ¿ÖС£Õæ·ÖÒ³ÔòÊÇÐèÒªÓõ½¼¸ÐÐÊý¾ÝÔÙ´ÓÊý¾Ý¿âÖÐÌáÈ¡³öÀ´·Å°ÑÐèÒªÏÔʾµÄÊý¾Ý·Åµ½list¼¯ºÏÀï¡£µ«ÎÞÂÛÕæ·ÖÒ³¼Ù·ÖÒ³pager-taglib¶¼¿ÉÒԺܺõÄΪÎÒÃǽøÐд¦Àí¡£
1.ÏÂÔØpager-taglib
ÏÂÔØµØ ......

MyEclipse¸ü¸Äjsp±à¼­Ê±×ÖÌå

     Ò»Ö±ÒÔÀ´Ê¹ÓÃMyeclipse±à¼­Ê±£¬¸Ð¾õÔ­ÓеÄ×ÖÌå´óСºÜ²»ÊÊÓ¦£¬ÓÚÊÇÔÚÍøÉÏËÑÁ˹ØÓÚÔÚMyEclipseÖÐÔõÑùÐÞ¸Ä×ÖÌå´óС£¬ºÜ¶à¶¼ÊÇʹÓÃwindow-preferences-general-apperaence-colors and fonts-java-java edditor text font À´ÐÞ¸Ä×ÖÌå¡£
    ʹÓÃÕâ¸ö·½·¨ËäȻдÀàÎļþÀïÃæµÄ´óС¶¼¸ü¸ü¸ ......

JSP±à³Ì½ø¶ÈÌõÉè¼ÆÊµÀý

Ðí¶àWebÓ¦Óá¢ÆóÒµÓ¦ÓÃÉæ¼°µ½³¤Ê±¼äµÄ²Ù×÷£¬ÀýÈ縴ÔÓµÄÊý¾Ý¿â²éѯ»ò·±ÖصÄXML´¦ÀíµÈ£¬ËäÈ»ÕâЩÈÎÎñÖ÷ÒªÓÉÊý¾Ý¿âϵͳ»òÖмä¼þÍê³É£¬µ«ÈÎÎñÖ´ÐеĽá¹ûÈÔ¾ÉÒª½èÖúJSP²ÅÄÜ·¢Ë͸øÓû§¡£±¾ÎĽéÉÜÁËÒ»ÖÖͨ¹ý¸Ä½øÇ°¶Ë±íÏÖ²ãÀ´¸ÄÉÆÓû§¸Ð¾õ¡¢¼õÇá·þÎñÆ÷¸ºÔصİ취¡£
µ±JSPµ÷ÓÃÒ»¸ö±ØÐ볤ʱ¼äÔËÐеIJÙ×÷£¬ÇҸòÙ×÷µÄ½á¹û²»ÄÜ£¨ÔÚ·þÎñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ