ajax 传输表单

function preceping(){
var url = "<%=request.getContextPath()%>/quxian/preCeping.shtml?tp=changyetouzi";
var form = Form.serialize('frmId');
var myAjax = new Ajax.Updater('zongfen',url, {method: 'get', parameters: form});
}


注意prototype的版本

读取factorybean

ClassPathResource s=new ClassPathResource("beans.xml")
XmlBeanFactory x=new XmlBeanFactory(s);
//根路径指定->class文件夹开始找beans.xml

ClassPathXmlApplicationContext cx=new ClassPathXmlApplicationContext("beans.xml");
//根路径指定->class文件夹开始找beans.xml

ApplicationContext c=new FileSystemXmlApplicationContext("beans.xml");
//根路径指定->项目根路径 开始找beans.xml

AfterReturningAdvice

public interface AfterReturningAdvice extends Advice {
void afterReturning(Object returnValue, Method m,Object[] args, Object target) throws Throwable;
}


AfterReturningAdvice直接继承自Advice介面,afterReturning()当中传入的引数有目标方法的返回值、方法实例、引数、与目标物件,afterReturning()方法传回void,若您要中止接下来的应用程式流程,丢出例外是唯一的方式。

 
Copyright 2005-2007. Hello Wiki designed by Fen, Blogger Templates by Blogcrowds.