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

java ÖÐÓû§·ÃÎÊȨÏÞ£¨spring ȨÏÞ¹ÜÀí£©

// AuthorityInterceptor.java Îļþ
package com.aptech.jb.epet.web.authority;
import javax.servlet.http.HttpServletRequest;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.struts.action.ActionMapping;
public class AuthorityInterceptor implements MethodInterceptor {
 public Object invoke(MethodInvocation methodInvocation) throws Throwable {
  System.out.println("=============AuthorityInterceptor==="+methodInvocation.getMethod().getName());
  HttpServletRequest request=null;
  ActionMapping mapping=null;
  Object [] args=methodInvocation.getArguments();
  for(int i=0;i<args.length;i++){
   //×ó±ßÊÇ·ñÊÇÓұߵÄһʵÀý
   if(args[i] instanceof HttpServletRequest)
    request=(HttpServletRequest) args[i];
   if(args[i] instanceof ActionMapping)
    mapping=(ActionMapping) args[i];
   
  }
  if(request.getSession().getAttribute("CURRENT_PET")!=null){
   return methodInvocation.proceed();
  }else{
   return mapping.findForward("index");
  }
  
 }
}
------------------------------------------------------------------------
------------------spring ÅäÖÃÎļþÈçÏÂ------------------
-----authorityInterceptor Ϊ AuthorityInterceptor µÄʵÀý¡£
<!-- ×Ô¶¯´´½¨È¨ÏÞ´úÀí -->
 <bean
  class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
  <property name="beanNames">0
   <list>
    <value>/pet</value>
    <value>/diary</value> //²»Äܰüº¬µ±Ç°µÇ¼Action path ·¾¶
   </list>
  </property>
  
  <property name="interceptorNames">
 &n


Ïà¹ØÎĵµ£º

javaʹÓÃrocksawºÍvserv tcpipʵÏÖ»ùÓÚICMPµÄPing¹¦ÄÜ

Ò»£º×¼±¸ www.savarese.org download
 1.  rocksaw-1.0.0-src.tar.gz
 2.  vserv-tcpip-0.9.2-src.tar.gz
¶þ£º±àÒëÔ´ÎļþµÃµ½jar°ü ʹÓÃAnt
 1.  build vserv-tcpip-0.9.2-src
      ÔÚvserv-tcpip-0.9.2Ŀ¼ÏÂÃæ½¨Ò»¸ötestsĿ¼£¬È»ºóÔÚcmd´°¿ÚϽøÈë ......

Java»ñÈ¡ºº×ÖȫƴºÍÊׯ´

import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* ½«ºº×Öת»¯ÎªÈ«Æ´
*/
public class CnToSpell {
private static Map<String, Integer> spellMap = null;
// ´æ·ÅÉúƧ×ÖºÍÆäÆ´ÒôµÄMap
private static Map<Characte ......

JavaÓëXMLÁªºÏ±à³ÌÖ®SAXƪ


SAX¸ÅÄî

SAXÊÇSimple API for XML
µÄËõд£¬Ëü²¢²»ÊÇÓÉW3C¹Ù·½ËùÌá³öµÄ±ê×¼£¬¿ÉÒÔ˵ÊÇ“Ãñ¼ä”µÄÊÂʵ±ê×¼¡£Êµ¼ÊÉÏ£¬ËüÊÇÒ»ÖÖÉçÇøÐÔÖʵÄÌÖÂÛ²úÎï¡£ËäÈ»Èç´Ë£¬ÔÚXMLÖжÔSAXµÄÓ¦ÓÃË¿ºÁ²»±ÈDOMÉÙ£¬¼¸ºõËùÓеÄXML½âÎöÆ÷¶¼»áÖ§³ÖËü¡£

Óë
DOM±È½Ï¶øÑÔ£¬SAXÊÇÒ»ÖÖÇáÁ¿Ð͵ķ½·¨¡£ÎÒÃÇÖªµÀ£¬ÔÚ´¦ÀíDOMµÄʱºò£¬Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ