java.lang.reflect.Method £¨java·´Éä»úÖÆ£©
¹«Ë¾Vac·½·¨¹ýÂËÆ÷ʹÓõ½·´Éä»úÖÆ£¬¶ÁÈ¡xmlÅäÖÃÎļþ¹ýÂËÓû§·ÃÎʵķ½·¨ÃûÊÇ·ñºÏ·¨¡£
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
@SuppressWarnings("unchecked")
Map<Object, Object> requestData = (Map<Object, Object>) httpRequest.getAttribute("requestData");
String methodName = (String) requestData.get(METHOD);
//»ñµÃbeanµÄÅäÖÃ
String beanName = mapProtocol.get(methodName).get(BEAN);
// È¥³ý.·ûºÅ
methodName = getMethod(methodName);
//´Óspring contextÖлñµÃbean
Object instance = getContext(filterConfig).getBean(beanName);
Class<? extends Object> clazz = instance.getClass();
Object resultContent = null;
try {
Method method = clazz
.getDeclaredMethod(methodName, getParamTypes());
Map params = removeSysParams(requestData);
resultContent = method.invoke(instance, params);
} catch (InvocationTargetException e) {
if (e.getTargetExce
Ïà¹ØÎĵµ£º
import java.io.File;
import java.util.Date;
import java.util.Iterator;
import java.util.Vector;
import java.text.SimpleDateFormat;
public class FileViewer {
File myDir;
File[] contents;
Vector vectorList;
Iterator currentFileView;
File currentFile;
  ......
ÇáÁ¿¼¶×é¼þÊÇÓÃJAVA´úÂ뻳öÀ´µÄ,ÕâÑù¾ßÓÐÆ½Ì¨ÒÆÖ²ÐÔ¡£
¡¡¡¡ ÖØÁ¿¼¶×é¼þÊǵ÷ÓòÙ×÷ϵͳµÄº¯Êý»³öÀ´µÄ×é¼þ,±ÈÈçÖ÷´°Ìå¡£
¡¡¡¡ Ò»°ãÀ´Ëµ¾¡Á¿ÓÃÇáÁ¿¼¶µÄ×é¼þ,ÕâÑù¶Ô³ÌÐòµÄÒÆÖ²ÐԺܺã¬Ò»°ãjavax.swing°üÀïµÄ×é¼þ´ó²¿·ÖÊÇÇáÁ¿¼¶µÄjava.awtÀïÃæµÄÊÇÖØÁ¿¼¶µÄ¡£
¡¡¡¡ SwingÊÇÓÉ100%´¿JavaʵÏֵģ¬Swing×é¼þÊÇÓÃJavaʵÏÖ ......
ÔÚjavaÖÐÓÐ3¸öÀàÀ´¸ºÔð×Ö·ûµÄ²Ù×÷¡£
1.Character ÊǽøÐе¥¸ö×Ö·û²Ù×÷µÄ£¬
2.String ¶ÔÒ»´®×Ö·û½øÐвÙ×÷¡£²»¿É±äÀà¡£
3.StringBuffer Ò²ÊǶÔÒ»´®×Ö·û½øÐвÙ×÷£¬µ«ÊǿɱäÀà¡£
String:
ÊǶÔÏó²»ÊÇÔʼÀàÐÍ.
Ϊ²»¿É±ä¶ÔÏó,Ò»µ©±»´´½¨,¾Í²»ÄÜÐÞ¸ÄËüµÄÖµ.
¶ÔÓÚÒѾ´æÔÚµÄString¶ÔÏóµÄÐÞ¸ ......
JavahÉú³ÉJNIÍ·Îļþ
¼ÙÉ蹤³ÌĿ¼ÏÂÓÐbinÎļþ¼Ð£¬bin´æ·Å±àÒëºÃµÄclassÎļþ;
ÔÚbinĿ¼Ï£¬
......\koalaTest\bin>javah -classpath . -jni com.jni.vikitest
È»ºóÔÚ.....\koalaTest\bin ¼´¿ÉÕÒµ½Ò»¸öcom_jni_Calculator.hÍ·Îļþ£¬Éú³É³É¹¦£¡ ......
ÔÚstrutsÖÐÓкöàµÄ±êÇ©·½±ã¿ª·¢£¬±ÈÈç<logic:iterate>±êÇ©£¬¿ÉÒԺܺõÄÏÔʾlistµÄÄÚÈÝ£º
£¨Ò»£©¶ÔListµÄÑ»·±éÀú£º
1.Ïȶ¨ÒåÒ»¸öUserÀࣺ
import java.io.Serializable;
public final class User implements Serializable {
private String name = null;
private String password ......