diyÃæÏòÇëÇóµÄjava¿ò¼Ü
Õâ¸ö¿ò¼ÜÒ²ÊÇΪgoogle app engine×¼±¸µÄ¡£µ±Ê±¸Ð¾õÖ±½ÓÔÚgaeÉÏsevletÌ«·³ÈËÁË£¬¾Í·â×°¸ö¼òÒ׵Ŀò¼Ü¡£Ê¹ÓõÄʱºòÖ»ÐèÒªÅäÖÃweb.xmlÖÐDispacherSevletºÍpackage.propertiesÖеÄpackage.path£¨Ä¬ÈÏɨÃèµÄ°ü£©¼´¿É
gaeÀý×Ó£ºhttp://orzblogs.appspot.com/Home.htm
´óѧµÄʱºòºÜBS java£¬Ñ§ÁËÖ®ºó¾ÍÈÓµôÁË£¬ÏÖÔÚ¹¤×÷Á˲ſªÊ¼½Ó´¥java¡£
javaÔÚweb·½ÃæÈç¹û²»ÊÇ¿ªÔ´£¬²»ÊÇÖÚ¶àµÄjava¿ò¼ÜÖ§³Ö£¬ÄÇôËüȷʵûʲôֵµÃ³ÆµÀµÄ¡£
µ¹ÊÇjvm±»ÓÅ»¯µÄ²»´í¡£
java web¿ò¼Ü±¾ÖÊÉ϶¼ÊÇsevlet£¬ËùÓеÄÄÇôweb¿ò¼Ü¶¼ÊǶÔsevlet½øÐÐÁË·â×°£¬È»ºó¶ÔwebÏà¹ØµÄ½øÐаü×°¡£ÄÇôÎÒÃÇÒ²¿ÉÒÔÀ´diy¸ö¼òÒ×µÄweb¿ò¼Ü£¬ÎªµÄÊÇÌåÑéÕâ¸öÖмäµÄ¹ý³Ì£¬¿ÉÄÜ¿ò¼Ü²»ÊµÓã¬ÉõÖÁ²»ÄܳÆ×÷¿ò¼Ü£¬ÆäʵΪµÄ¾ÍÊǼõÉÙÒ»µãÅäÖã¬ËäÈ»ÏÖÔÚspringMVCͨ¹ý×¢½â¾Í¿ÉÒÔ¼õÉÙweb²ãµÄÅäÖã¬ÕâÀïËù×öµÄÒ²ÊÇͬÑùµÄÊ£¬ÐÔÄܿ϶¨ºÜ²î£¬µ«ÊÇÒ²ÊÇÒ»ÖÖ·½·¨£¬Ôö¼ÓÀí½â¶øÒÑ¡£
Ê×ÏÈÈκÎweb¿ò¼ÜµÄÈë¿Ú»ù±¾É϶¼ÊÇÒ»¸öXXdispatcher¡£ÓÃÀ´½øÐÐÇëÇóurlµÄת·¢¡£
OK£¬ÄÇôÎÒÃǾÍÀ´×öÒ»¸öÃæÏòwebÇëÇóµÄ¼òÒ׵IJ»ÄܳÆΪ¿ò¼ÜµÄ¿ò¼Ü¡£Ç°¶ËʹÓÃvelicity½øÐÐäÖȾ¡£
µ±È»Ò»¶¨Òª°Ñspring¸ø¼¯³É½øÀ´£¬Òª²»Ë¸øÎÒÃdz־û¯beanÄØ¡£
Ê×ÏÈͨ¹ýDispacherSevletÀ´½øÐÐÇëÇóµÄת·¢¡£È»ºó¸ù¾ÝÇëÇóµÄÃû³Æ¼ÓÔØbean¡£È»ºóͨ¹ý·´É佫beanµÄÏà¹ØÊôÐÔ×¢È롣ȻºóÖ´ÐÐbean¡£È»ºó»ñÈ¡ÐèÒªäÖȾµÄÄ£°å¡£äÖȾ¡£·µ»Ø½á¹û¸øÓû§¡£
Java´úÂë
public String doGet(HttpRequest request, HttpResponse response, Map<String, Object> context)
public String doPost(HttpRequest request, HttpResponse response, Map<String, Object> context)
public String doGet(HttpRequest request, HttpResponse response, Map<String, Object> context)
public String doPost(HttpRequest request, HttpResponse response, Map<String, Object> context)
Óû§ÇëÇó/Home.htmÈ»ºó»ñÈ¡µ½¶ÔÓ¦µÄcontrollerΪHome¡£È»ºó´Ó¿ò¼ÜIOCÖлñÈ¡Home¡£Èç¹û»ñÈ¡²»µ½¾Íͨ¹ýbean¼ÓÔØÆ÷À´¼ÓÔØHome£¬È»ºóͨ¹ýHomeµÄdopost»òÕßdoget·½·¨À´´¦ÀíÓ¦Óá£dopostºÍdogetÖлá·ÅÈëÓ³Éä½øÈ¥Ò»¸ömap<string,object>À´´æÒ³ÃæµÄÉÏÏÂÎÄ¡£µ±´¦ÀíÍê±Ïºó¸ù¾ÝHome·µ»ØµÄÒ³Ãæ·¾¶À´½øÐÐÒ³ÃæäÖȾ£¬²¢½«½á¹û·µ»Ø¸øÓû§¡£
ϸ½Ú£º
1.ά»¤Ò»¸ö×Ô¼ºµÄ
Ïà¹ØÎĵµ£º
Java ÖÐÄÚ²¿¶¯Ì¬Àà(ûÓÐstatic)¹Ø¼ü×ÖºÍÄÚ²¿¾²Ì¬ÀàµÄ¾ÍÔÚÓÚÄÚ²¿¶¯Ì¬À಻Äܶ¨Ò徲̬±äÁ¿»òÊǾ²Ì¬·½·¨,Èç¹ûÒªÔÚÄÚ²¿ÀàÖÐʹÓþ²Ì¬³ÉÔ±,±ØÐ뽫ÀàÉùÃ÷Ϊ¾²Ì¬Àà. ÄÚ²¿ÀàÖеľ²Ì¬·½·¨¿ÉÒÔ·ÃÎÊÍⲿÀàµÄ¾²Ì¬·½·¨ºÍ±¾ÀàÖеľ²Ì¬·½·¨»ò³ÉÔ±, ·Ç¾²Ì¬·½·¨¿ÉÒÔ·ÃÎÊÆäËûËùÓеķ½·¨»ò³ÉÔ± ......
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class Temp {
public Temp() {
JFrame J = new JFrame("MENU");
Container C = J. ......
ÊäÈëÒ»ÐÐÊý×Ö£¬Èç¹ûÎÒÃÇ°ÑÕâÐÐÊý×ÖÖеđ5’¶¼¿´³É¿Õ¸ñ£¬ÄÇô¾ÍµÃµ½Ò»ÐÐÓÿոñ·Ö¸îµÄÈô¸É·Ç¸ºÕûÊý£¨¿ÉÄÜÓÐЩÕûÊýÒÔ‘0’¿ªÍ·£¬ÕâЩͷ²¿µÄ‘0’Ó¦¸Ã±»ºöÂÔµô£¬³ý·ÇÕâ¸öÕûÊý¾ÍÊÇÓÉÈô¸É¸ö‘0’×é³ÉµÄ£¬ÕâʱÕâ¸öÕûÊý¾ÍÊÇ0£©¡£
ÄãµÄÈÎÎñÊÇ£º¶ÔÕâЩ·Ö¸îµÃµ½µÄÕûÊý£¬ÒÀ´ÓСµ½´óµÄ˳ÐòÅÅÐ ......
ÓÃRobotдJava´úÀí
Rational RobotÊÇͨ¹ý¼ÖÆÓû§²Ù×÷½øÐй¦ÄÜ£¬ÐÔÄܺͼæÈÝÐÔ²âÊÔµÄ×Ô¶¯»¯²âÊÔ¹¤¾ß¡£Í¨¹ý»Ø·Å¼Öƽű¾½øÐй¦ÄܺͿɿ¿ÐÔ²âÊÔ¡£±¾ÎÄÖ÷Òª½éÉÜRational RobotÕë¶Ôjava³ÌÐòºÍappletsÈçºÎ½øÐй¦ÄܲâÊÔ¡£
Rational Robotµ±Ç°°æ±¾Ö§³ÖÓÃÒÔÏÂÀà¿â¿ª·¢µÄJava³ÌÐòºÍapplet³ÌÐò£º
lJava Foundation Classes(JFCs)
l ......
֮ǰÔÚ×öfindbugsµÄʱºò¾³£»á²é¿´×Ö½ÚÂ룬¶¼ÊÇÒ»Öª°ë½âµÄ
ÄÇÌì¿´µ½Ò»¸öÎÊÌ⣬¸ÕºÃ¿ÉÒÔ´Ó×Ö½ÚÂëÀ´½âÊÍ
ÕâЩÌâÄ¿³£¼ûÓÚÃæÊÔÌ⣬ͨ³£ÒªÊÇ˸ÒÕâôд´úÂ룬ÍêÈ«ÊÇÔÚÕÒËÀ¡£¡£
Java´úÂë
public class Test {
public static void main(String[]  ......