<%
ServletContext sc = request.getSession().getServletContext();
ApplicationContext ac = WebApplicationContextUtils
.getWebApplicationContext(sc);
FourmService fs = (FourmService) ac.getBean("fourmService");
String c = request.getParameter("command");
if (c == null)
return;
if (c.equals("notDetail")) { //论坛概述调用
out.print(fs.showfourm());
} else if (c.equals("isDetail")) { //论坛详细内容调用
String title = request.getParameter("title");
String identity = request.getParameter("identity");
out.print(fs.showfourm(title, identity));
} else if (c.equals("insert")) {
String[] t = new String[4];
t[0] = "title";//request.getParameter("title");
t[1] = "底盘部门";//request.getParameter("identity");
t[2] = "底盘作者";//request.getParameter("author");
t[3] ="底盘详细内容"; //request.getParameter("detail");
fs.insertjson(t);
out.print("{success:true,msg:'添加成功!'}"); //必须指定{success:true'},他传回EXTJS调用成功,否则EXTJS卡住无法执行;如果没有这行代码即为报"SYNTAX ERROR:)"错.他还能传任意参数如MSG回EXTJS.
}
%>
posted on 2008-09-02 16:57
紫蝶∏飛揚↗ 阅读(2475)
评论(1) 编辑 收藏 所属分类:
EXTJS 、
重点