Java±à³ÌËöÊ£¨4£©——JavaÀàÖе÷ÓÃServlet
Ò»¡¢JavaÖе÷ÓÃservlet˵Ã÷£º
ÎÒÃÇÓÐʱ¿ÉÄÜÐèÒªÔÚJavaÀàÖе÷ÓÃServlet´Ó¶øʵÏÖijЩÌØÊâµÄ¹¦ÄÜ£¬ÔÚJavaAPIÖÐÌṩÁËÒ»¸öURLµÄÀ࣬ÆäÖÐopenStream( )·½·¨¿ÉÒÔ´ò¿ªURLµÄÁ¬½Ó£¬²¢·µ»ØÒ»¸öÓÃÓÚ¸ÃÁ¬½Ó¶ÁÈëµÄInputStream¡£
¶þ¡¢JavaÖе÷ÓÃservletÓ¦ÓþÙÀý£º
package com.solid.test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class TestCallServlet {
//servlet·¾¶
private static final String path = "http://localhost:8080/test/servlet/TestServlet";
/**
* ²âÊÔµ÷ÓÃservlet·½·¨
* @param args
*/
public static void main(String[] args) {
try {
URL url = new URL(path);
url.openStream();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Èý¡¢¶Áȡij¸öÒ³ÃæÔ´´úÂëµÄÓ¦ÓþÙÀý£º
package com.solid.test;
import java.io.Bu
Ïà¹ØÎĵµ£º
Èç¹ûÄãÊÇÒ»ÃûJava³ÌÐòÔ±£¬²¢ÇÒ¹Ø×¢Õâ±à³ÌÓïÑÔ·½ÃæµÄ·¢Õ¹£¬±ÈÈç¾³£È¥TIOBEÍøÕ¾Á˽â±à³ÌÓïÑÔÁ÷ÐжÈÅÅÐУ¬ÄÇôÄãÓ¦¸ÃÌý˵¹ýScala£¬Èç¹ûÄ㻹ûÓпªÊ¼Ñ§Ï°Scala£¬»òÕß´òËãϸöÀñ°Ý¿ªÊ¼Ñ§µÄ»°£¬ÇëÏÈ¿´¿´ÏÂÃæÕâƪÎÄÕ£¬¿´¿´Äܲ»ÄܸıäÄãµÄÏë·¨¡£
ScalaÊÇΪÄã×¼±¸µÄÂð?Äã±ØÐë×Ô¼º¿´Ã÷°×²¢×ö¾ö¶¨¡£³ýÁËÉìÕ¹ÐÔÖ®Í⣬ÎÒÃÇ·¢ÏÖϲ»¶ÓÃS ......
Java¶ÔÏó¼°ÒýÓÃ
Java¶ÔÏó¼°ÒýÓÃÊÇÈÝÒ×»ìÏýÈ´ÓÖ±ØÐëÕÆÎյĻù´¡ÖªÊ¶£¬±¾Õ²ûÊöJava¶ÔÏóºÍÒýÓõĸÅÄÒÔ¼°ÓëÆäÃÜÇÐÏà¹ØµÄ²ÎÊý´«µÝ¡£
ÏÈ¿´ÏÂÃæµÄ³ÌÐò£º
StringBuffer s;
s = new StringBuffer("Hello World!");
µÚÒ»¸ö ......
¡¡¡¡ËäÈ»JavaScriptÓëJavaÓнôÃܵÄÁªÏµ£¬µ«È´ÊÇÁ½¸ö¹«Ë¾¿ª·¢µÄ²»Í¬µÄÁ½¸ö²úÆ·¡£JavaÊÇSUN¹«Ë¾ÍƳöµÄÐÂÒ»´úÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬ÌرðÊʺÏÓÚInternetÓ¦ÓóÌÐò¿ª·¢£»¶øJavaScriptÊÇNetscape¹«Ë¾µÄ²úÆ·£¬ÆäÄ¿µÄÊÇΪÁËÀ©Õ¹Netscape Navigator¹¦ÄÜ,¶ø¿ª·¢µÄÒ»ÖÖ¿ÉÒÔǶÈëWebÒ³ÃæÖеĻùÓÚ¶ÔÏóºÍʼþÇý¶¯µÄ½âÊÍÐÔÓïÑÔ, ËüµÄÇ°ÉíÊ ......
1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£ 2. Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓÚÖ±½ÓλÓÚCPUÖеļĴæÆ÷¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú´æÆÚ±ØÐëÊÇÈ·¶¨µÄ£¬È±·¦Áé»îÐÔ¡£ÁíÍ⣬ջÊý¾Ý¿ÉÒÔ¹²Ïí£¬Ïê¼ûµÚ3µã¡£¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅäÄÚ ......
¡¡JavaÓïÑÔµÄÊäÈëÊä³ö¹¦ÄÜÊÇÊ®·ÖÇ¿´ó¶øÁé»îµÄ£¬ÃÀÖв»×ãµÄÊÇ¿´ÉÏÈ¥ÊäÈëÊä³öµÄ´úÂë²¢²»ÊǺܼò½à£¬ÒòΪÄãÍùÍùÐèÒª°ü×°Ðí¶à²»Í¬µÄ¶ÔÏó¡£ÔÚJavaÀà¿âÖУ¬IO²¿·ÖµÄÄÚÈÝÊǺÜÅÓ´óµÄ£¬ÒòΪËüÉæ¼°µÄÁìÓòºÜ¹ã·º:±ê×¼ÊäÈëÊä³ö£¬ÎļþµÄ²Ù×÷£¬ÍøÂçÉϵÄÊý¾ÝÁ÷£¬×Ö·û´®Á÷£¬¶ÔÏóÁ÷£¬zipÎļþÁ÷....±¾ÎĵÄÄ¿µÄÊÇΪ´ó¼Ò×öÒ»¸ö¼òÒªµÄ½éÉÜ¡£
¡¡¡ ......