java Ḭ̈߳²È«
Servlet/JSP¼¼ÊõºÍASP¡¢PHPµÈÏà±È£¬ÓÉÓÚÆä¶àÏß³ÌÔËÐжø¾ßÓкܸߵÄÖ´ÐÐЧÂÊ¡£ÓÉÓÚServlet/JSPĬÈÏÊÇÒÔ¶àÏß³ÌģʽִÐеģ¬ËùÒÔ£¬ÔÚ±àд´úÂëʱÐèÒª·Ç³£Ï¸Öµؿ¼ÂǶàÏ̵߳ݲȫÐÔÎÊÌ⡣Ȼ¶ø£¬ºÜ¶àÈ˱àдServlet/JSP³ÌÐòʱ²¢Ã»ÓÐ×¢Òâµ½¶àḬ̈߳²È«ÐÔµÄÎÊÌ⣬ÕâÍùÍùÔì³É±àдµÄ³ÌÐòÔÚÉÙÁ¿Óû§·ÃÎÊʱûÓÐÈκÎÎÊÌ⣬¶øÔÚ²¢·¢Óû§ÉÏÉýµ½Ò»¶¨ÖµÊ±£¬¾Í»á¾³£³öÏÖһЩĪÃ÷ÆäÃîµÄÎÊÌâ¡£
¡¡¡¡ServletµÄ¶àÏ̻߳úÖÆ
¡¡
¡¡¡¡ServletÌåϵ½á¹¹Êǽ¨Á¢ÔÚJava¶àÏ̻߳úÖÆÖ®Éϵģ¬ËüµÄÉúÃüÖÜÆÚÊÇÓÉWebÈÝÆ÷¸ºÔðµÄ¡£µ±¿Í»§¶ËµÚÒ»´ÎÇëÇóij¸öServletʱ£¬ServletÈÝÆ÷½«»á¸ù¾Ýweb.xmlÅäÖÃÎļþʵÀý»¯Õâ¸öServletÀà¡£µ±ÓÐеĿͻ§¶ËÇëÇó¸ÃServletʱ£¬Ò»°ã²»»áÔÙʵÀý»¯¸ÃServletÀ࣬Ҳ¾ÍÊÇÓжà¸öÏß³ÌÔÚʹÓÃÕâ¸öʵÀý¡£ServletÈÝÆ÷»á×Ô¶¯Ê¹ÓÃÏ̳߳صȼ¼ÊõÀ´Ö§³ÖϵͳµÄÔËÐУ¬Èçͼ1Ëùʾ¡£
ͼ1 ServletÏ̳߳Ø
¡¡¡¡ÕâÑù£¬µ±Á½¸ö»ò¶à¸öÏß³Ìͬʱ·ÃÎÊͬһ¸öServletʱ£¬¿ÉÄܻᷢÉú¶à¸öÏß³Ìͬʱ·ÃÎÊͬһ×ÊÔ´µÄÇé¿ö£¬Êý¾Ý¿ÉÄÜ»á±äµÃ²»Ò»Ö¡£ËùÒÔÔÚÓÃServlet¹¹½¨µÄWebÓ¦ÓÃʱÈç¹û²»×¢ÒâḬ̈߳²È«µÄÎÊÌ⣬»áʹËùдµÄServlet³ÌÐòÓÐÄÑÒÔ·¢ÏֵĴíÎó¡£
¡¡¡¡ServletµÄḬ̈߳²È«ÎÊÌâ
¡¡¡¡ServletµÄḬ̈߳²È«ÎÊÌâÖ÷ÒªÊÇÓÉÓÚʵÀý±äÁ¿Ê¹Óò»µ±¶øÒýÆðµÄ£¬ÕâÀïÒÔÒ»¸öÏÖʵµÄÀý×ÓÀ´ËµÃ÷¡£
Import javax.servlet. *;
Import javax.servlet.http. *;
Import java.io. *;
Public class Concurrent Test extends HttpServlet {PrintWriter output;
Public void service (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {String username;
Response.setContentType ("text/html; charset=gb2312");
Username = request.getParameter ("username");
Output = response.getWriter ();
Try {Thread. sleep (5000); //ΪÁËÍ»³ö²¢·¢ÎÊÌ⣬ÔÚÕâÉèÖÃÒ»¸öÑÓʱ
} Catch (Interrupted Exception e){}
output.println("̞:"+Username+"<BR>");
}
}
¡¡¡¡¸ÃServletÖж¨ÒåÁËÒ»¸öʵÀý±äÁ¿output£¬ÔÚservice·½·¨½«Æ丳ֵΪÓû§µÄÊä³ö¡£µ±Ò»¸öÓû§·ÃÎʸÃServletʱ£¬³ÌÐò»áÕý³£µÄÔËÐУ¬µ«µ±¶à¸öÓû§²¢·¢·ÃÎÊʱ£¬¾Í¿ÉÄÜ»á³öÏÖÆäËüÓû§µÄÐÅÏ¢ÏÔʾÔÚÁíÍâһЩÓû§µÄä¯ÀÀÆ÷ÉϵÄÎÊÌâ¡£ÕâÊÇÒ»¸öÑÏÖصÄÎÊÌ⡣ΪÁËÍ»³ö²¢·¢ÎÊÌ⣬±ãÓÚ²âÊÔ¡¢¹Û²ì£¬ÎÒÃÇÔÚ»ØÏÔÓû§ÐÅϢʱִÐÐÁËÒ»¸öÑÓʱµÄ²Ù×÷¡£¼ÙÉèÒÑÔÚweb.xmlÅäÖÃÎļþÖÐ×¢²áÁ˸ÃServlet£¬ÏÖÓÐÁ½¸öÓû§aºÍbͬʱ·
Ïà¹ØÎĵµ£º
Êý¾Ý½á¹¹ºÍËã·¨
ðÅÝ£ºÃ¿´Î±È½Ï¶¼¿ÉÕÒ³ö×î´ó»ò×îСµÄ£¬ÓÐÐòµÄÔÚ×îÓÒ±ß
Ñ¡ÔñÅÅÐò£ºÓÐÐòµÄÔÚ×î×ó±ß
²åÈëÅÅÐò£ºËٶȱÈðÅÝ¿ìÒ»±¶£¬±ÈÑ¡ÔñÒ²¿ì¡£
µÝ¹é
µ÷ÓÃ×ÔÉí
ººÅµËþÎÊÌ⣺
/**
* @ººÅµËþµÄÎÊÌâ
*/
......
ͨ³£Çé¿öÏ£¬ÎÒÃÇÔÚдһ¸öÀàʱ£¬Ò»°ã»á¸³ÓèËüÒ»¸ö»ò¼¸¸öpublicµÄ¹¹Ô캯Êý£¬ÈÃÍⲿ³ÌÐòÄܹ»´´½¨¶ÔÏó.¡¡È»¶ø£¬ÔÚeffective¡¡java ÖУ¬´ÓÁíÒ»¸ö½Ç¶È¸æ½ëÎÒÃÇÔÚʹÓÃpublicµÄ¹¹Ô캯ÊýÇ°£¬ÏÈ¿¼ÂÇÓÃpublic µÄ¾²Ì¬º¯ÊýÀ´´´½¨¶ÔÏó.¡¡
ÆäÓŵãÈçÏ£º
£±.¡¡Ò»¸ö¾²Ì¬µÄ¹¤³§º¯Êý£¬¿ÉÒÔÈ¡²»Í¬µÄÃû×Ö.¡¡¶ø¹¹Ô캯ÊýµÄÃû×ÖÖ»ÄÜÓëÀàͬÃû.¡¡
......
ºÜ¶àʱºòÊý×é´æÔÚןܴóµÄȱÏÞ£¬Ê×ÏȱØÐëÏÈÉèÖÃÊý×éµÄ³¤¶È£¬µ±É趨ÁËÖ®ºó£¬¾ÍÎÞ·¨¸Ä±äÁË¡£
ÏÂÀ´ÊÇÒ»ÖÖÊý×鳤¶È¶¯Ì¬±ä»¯µÄÒ»ÖÖ·½·¨
package com.yz.mystack;
public class Stack {
Object[] datas;
Integer n=0;
Integer N=1;
public Stack(){
datas=new Object[N];
}
public void push(Object data){
......
Ïֽ׶ÎJAVA²Ù×÷ExcelµÄJARÖ÷ÒªÓÐapache µÄ POI¼° JXL.
ÒòΪÏÖÔÚµÄeclipse²Ù×÷excelÓõIJå¼þΪjxl£¬ËùÒÔÔÚÏîÄ¿ÖоÍʹÓÃÁËjxl£®
ÏëÏëÁ½Õ߶¼²î²»ÁËÌ«¶à£®
´Ë¼òµ¥ÏµÁÐΪÁ½¸ö²¿·Ö£¬Ò»ÊÇAPIϵÁУ¨ÔÙ¹ÙÍøhttp://www.andykhan.com/jexcelapi/download.html¿ÉÒÔÖ±½ÓÏÂÔØ£©£¬
ÁíÒ»²¿·ÖÔòÊÇÓ¦ÓÃϵÁУ®
ÔÚÕâÀïÏÈÕÒÁ˸öÀý×Ó¸ø´ó¼Ò£ ......
ÊäÈëÒ»ÐÐÊý×Ö£¬Èç¹ûÎÒÃÇ°ÑÕâÐÐÊý×ÖÖеđ5’¶¼¿´³É¿Õ¸ñ£¬ÄÇô¾ÍµÃµ½Ò»ÐÐÓÿոñ·Ö¸îµÄÈô¸É·Ç¸ºÕûÊý£¨¿ÉÄÜÓÐЩÕûÊýÒÔ‘0’¿ªÍ·£¬ÕâЩͷ²¿µÄ‘0’Ó¦¸Ã±»ºöÂÔµô£¬³ý·ÇÕâ¸öÕûÊý¾ÍÊÇÓÉÈô¸É¸ö‘0’×é³ÉµÄ£¬ÕâʱÕâ¸öÕûÊý¾ÍÊÇ0£©¡£
ÄãµÄÈÎÎñÊÇ£º¶ÔÕâЩ·Ö¸îµÃµ½µÄÕûÊý£¬ÒÀ´ÓСµ½´óµÄ˳ÐòÅÅÐ ......