java¹ýÂËÆ÷¶ÔextÒì²½ÇëÇóÌøת
1.java¹ýÂËÆ÷¶ÔextÒì²½ÇëÇóÌøת
Óû§·ÃÎʳ¬Ê±
½â¾öÁ½ÖÖÇé¿öϵÄÓû§·ÃÎʳ¬Ê±¡£
a£©ÆÕͨhttpÇëÇóµÄsession³¬Ê±¡£
b£©Òì²½httpÇëÇóµÄsession³¬Ê±£¬Ê¹ÓÃextºó´ó²¿·ÖµÄ½çÃæˢж¼ÊÇÒì²½µÄajaxÇëÇó¡£
²»¹ÜÊÇÄÇÖÖÀàÐ͵ÄhttpÇëÇó×ÜÊÇ¿ÉÒÔÓÉÒ»¸ö¹ýÂËÆ÷À´²¶×½¡£
·ÖÀࣺÆÕͨhttpÇëÇóµÄheader²ÎÊýÖÐûÓÐx-requested-with:XMLHttpRequestÍ·ÐÅÏ¢£¬¶øÒì²½µÄÓС£
Æäʵ¶ÔÓÚ³£¼ûµÄajax¿ò¼Ü£¬headerÖл¹Óбêʾ×Ô¼ºÉí·ÝµÄheaderÐÅÏ¢¡£
¶ÔÓÚÆÕͨµÄhttpÇëÇ󣬷¢ÏÖsession³¬Ê±ºóÖ±½ÓÖض¨Ïòµ½Ò»¸ö³¬Ê±Ò³Ã棬ÏÔʾ·ÃÎʳ¬Ê±¡£
¶ÔÓÚÒì²½httpÇëÇ󣬷¢ÏÖsession³¬Ê±ºóÔòÏòÇëÇóµÄresponseÖÐдÈëÌض¨µÄ³¬Ê±Í·ÐÅÏ¢£¬¿Í»§¶Ëajax¶ÔÏó¼ì²â
Í·ÐÅÏ¢£¬·¢ÏÖÓг¬Ê±×´Ì¬±êÖ¾ºóµ÷ÓÃÏÔʾ³¬Ê±ÐÅÏ¢µÄjavascript·½·¨£¬ÌáʾÓû§·ÃÎʳ¬Ê±¡£
·þÎñÆ÷¶Ësession³¬Ê±ºóÔÚ¹ýÂËÆ÷ÖÐΪresponseÌí¼ÓеÄÍ·ÐÅÏ¢£¬±ê¼Ç¸ÃÇëÇó³¬Ê±£º
Js´úÂë
if(r.getHeader("x-requested-with")!=null
&& r.getHeader("x-requested-with").equalsIgnoreCase("XMLHttpRequest")){
response.setHeader("sessionstatus","timeout");
}
if(r.getHeader("x-requested-with")!=null && r.getHeader("x-requested-with").equalsIgnoreCase("XMLHttpRequest")){ response.setHeader("sessionstatus","timeout"); }
ʹÓÃExt.Ajaxt¶ÔÏóÍê³ÉÒì²½ÇëÇóµÄ½»»¥£¬Ext.AjaxÊǵ¥ÊµÀý¶ÔÏ󣨷dz£ÖØÒª£¬È«¾Öµ¥Ò»Ext.AjaxʵÀý£¡£©¡£
×¢²áExt.AjaxµÄrequestcompleteʼþ£¬Ã¿¸öajaxÇëÇó³É¹¦ºóÊ×ÏÈÏìÓ¦¸Ãʼþ¡£ÔÚ¸ÃʼþµÄ»Øµ÷º¯ÊýÀïÃæÅжÏ
·ÃÎÊÇëÇóÊÇ·ñ³¬Ê±¡£Ê¹ÓÃExt.Ajax¶ÔÏóµÄºÃ´¦ÊÇ£¬Ö»ÐèÒªÒýÈëÒ»¸ö°üº¬Á˼¸Ðг¬Ê±´¦Àí´úÂëµÄjsÎļþ£¬¾Í¿ÉÒÔ
Ϊµ±Ç°Ó¦ÓÃÔö¼Ó³¬Ê±´¦Àí¹¦ÄÜ£¬ÔÓдúÂë²»ÐèÒª×öÈκÎÐ޸ġ£
ʹÓÃExt.Ajaxt¶ÔÏóÍê³ÉÒì²½ÇëÇó½»»¥£¬¼ÙÈçcheckUserSessionStatusÊÇÄãµÄ»Øµ÷·½·¨£¬Ã¿¸öÒ³ÃæÒýÓãº
Js´úÂë
Ext.Ajax.on('requestcomplete',checkUserSessionStatus, this);
function checkUserSessionStatus(conn,response,options){
//ExtÖØзâ×°ÁËresponse¶ÔÏó
if(typeof response.getResponseHeader.sessi
Ïà¹ØÎĵµ£º
Èí»Ø³µ£¨Soft Return£©£ºÈí»Ø³µÊÇÔÚ×Ö´¦Àí³ÌÐòÖÐ×÷Ϊ×Ô¶¯ÒÆÐй¦ÄܵÄÒ»²¿·Ö×Ô¶¯²åÈëµÄ£¬Ò²½Ð»»Ðзû£¬ÔÚwordÖп´²»¼û¡£Èç¹ûÎı¾
Ò»Ðеij¤¶È³¬¹ýÎĵµËù¶¨ÒåµÄÓұ߾àʱ£¬¼´µ±Ç°ÐÐûÓÐ×ã¹»µÄ¿Õ¼ä·ÅÖÃÏÂÒ»¸ö×Ö·ûʱ£¬ÎÄ×Ö´¦ÀíÈí¼þ½«ÔÚÕâÒ»ÐÐÎı¾µÄĩβ×Ô¶¯²åÈëÒ»
¸öÈí»Ø³µ·û£¬Îı¾ÁíÆðÒ»ÐС£Õâ¸öÈí»Ø³µ·ûÊÇÓɱ༳ÌÐò×Ô¶¯² ......
JavaÔÚÍøÂç±à³ÌÕâ¸öµØ·½×öµÄºÜºÃ£¬javaµÄÖ÷ҪĿµÄÒ²ÊÇΪÁËÍøÂç¶øÉúµÄ£¬ËüÄÜ·½±ãµÄ·ÃÎÊÍøÂçÉϵÄ×ÊÔ´¡£ÎÒÃÇÕâ½Ú¿ÎÀ´½éÉÜÍøÂçͨѶµÄÁ½ÖÖ»úÖÆ£ºURLͨÐÅ»úÖÆ£¬SocketͨÐÅ»úÖÆ¡£
URL±íʾÁËInternetÉÏÒ»¸ö×ÊÔ´µÄÒýÓûòµØÖ·¡£JavaÍøÂçÓ¦ÓóÌÐòÒ²ÊÇʹÓÃURLÀ´¶¨Î»Òª·ÃÎʵÄInternetµÄ×ÊÔ´¡£ÔÚjdkÀïÃæjava.net.URLÒ²ÊÇÒ»¸öÀ࣬Ëü ......
ÎÒÃÇÀ´½éÉÜһϠ£½£½ºÍequals()µÄÇø±ð£¬£½£½ÊÇÏàµÈ£¬equals()Ò²ÊÇÏàµÈ¡£ÕâÁ½¸ö´ÊµÄÇø±ðÊÇʲôÄØ£¿ÕâÊÇÕÒ¹¤×÷ʱºÜ¶àÃæÊÔ¹ÙµÄÎÊÌâ¡£ÎÒÃÇÀ´½â´ðһϡ£Ê×ÏÈÎÒÃÇ¿´Õâô¸öÀý×Ó¡£Êµ¼ù£º
public class TestEquals {
public static void main(String[] args) {
MyDate date1 = new MyDate(14, 3, 1976);
MyDate date2 = ne ......
1.ʵÏÖÎı¾ÔĶÁ
package AllAboutFile;
/**
*
* @author lucifer
*/
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class FileViewer extends Frame implements ActionListener{
String directory;
Text ......
Ìõ¼þ£ºÒÑ°²×°J2SEºÍJ2EE¡£
Microsoft SQL Server 2000 Driver for JDBCÊÇ΢Èí¹«Ë¾Ãâ·ÑÌṩÃâ·ÑÏÂÔصÄÒ»¸öÈí¼þ£¬Çë·ÃÎÊ£º http://www.microsoft.com/sql/default.asp£¬ÏÂÔغóÎļþÃûΪ£ºsetup.exe£¬°²×°ºó£¬Ä¬ÈÏ·¾¶ÊÇ£º%Program Files%\Microsoft SQL Server 2000 Driver for JDBC£¬¸ÃĿ¼ÏÂLIBĿ¼ÀïÓÐ3¸öjarÎļþ¡£ ......