资源简介

下载即可直接使用,使用ssh+jquery+ajax,使用mysql数据库,内带数据库文件,是初学者能看得懂的最简单的省市区三级级联。

资源截图

代码片段和文件信息

package com.chen.actioon;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

public class AjaxRequest {
/**
 * 解码器
 * */
public static String decoderString(String str String encoding) {
try {
return URLDecoder.decode(str encoding);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
}
}
// AJAX输出文本,返回null
public static String ajaxText(String text) {
return ajax(text “text/plain“);
}
// AJAX输出,返回null
public static String ajax(String content String type) {
try {
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(type + “;charset=UTF-8“);
response.setHeader(“Pragma“ “No-cache“);
response.setHeader(“Cache-Control“ “no-cache“);
response.setDateHeader(“Expires“ 0);
response.getWriter().write(content);
response.getWriter().flush();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}

// AJAX输出文本,返回null
public static String ajaxHtml(String text) {
return ajax(text “text/html“);
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4485  2012-12-10 00:05  area.sql

     文件        365  2012-12-10 00:32  使用说明.txt

     文件        878  2012-12-05 19:54  sshdiqiu\.classpath

     文件       1041  2012-12-05 19:37  sshdiqiu\.project

     文件        503  2012-12-05 19:37  sshdiqiu\.settings\.jsdtscope

     文件        395  2012-12-05 19:37  sshdiqiu\.settings\org.eclipse.jdt.core.prefs

     文件        531  2012-12-05 19:54  sshdiqiu\.settings\org.eclipse.wst.common.component

     文件        345  2012-12-05 19:37  sshdiqiu\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2012-12-05 19:37  sshdiqiu\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2012-12-05 19:37  sshdiqiu\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       4177  2012-12-09 15:17  sshdiqiu\build\classes\appContext.xml

     文件       2060  2012-12-09 20:43  sshdiqiu\build\classes\com\chen\actioon\AjaxRequest.class

     文件       2613  2012-12-10 00:24  sshdiqiu\build\classes\com\chen\actioon\DiqiuAction.class

     文件        431  2012-12-09 20:43  sshdiqiu\build\classes\com\chen\biz\IDiqiuBiz.class

     文件       1196  2012-12-09 20:43  sshdiqiu\build\classes\com\chen\biz\impl\DiqiuBizImpl.class

     文件        431  2012-12-09 20:43  sshdiqiu\build\classes\com\chen\dao\IDiqiuDao.class

     文件       1693  2012-12-09 20:43  sshdiqiu\build\classes\com\chen\dao\impl\DiqiuDaoImpl.class

     文件        973  2012-12-10 00:02  sshdiqiu\build\classes\com\chen\dto\Djs.class

     文件        957  2012-12-10 00:23  sshdiqiu\build\classes\com\chen\dto\Message.class

     文件        967  2012-12-10 00:03  sshdiqiu\build\classes\com\chen\dto\Qx.class

     文件        782  2012-12-10 00:04  sshdiqiu\build\classes\com\chen\dto\Sf.class

     文件        825  2012-12-10 00:22  sshdiqiu\build\classes\hibernate\Djs.hbm.xml

     文件        953  2012-12-09 02:03  sshdiqiu\build\classes\hibernate\Qx.hbm.xml

     文件        698  2012-12-10 00:22  sshdiqiu\build\classes\hibernate\Sf.hbm.xml

     文件        877  2012-12-07 01:03  sshdiqiu\build\classes\jdbc.properties

     文件       1663  2012-12-07 01:12  sshdiqiu\build\classes\log4j.properties

     文件        840  2012-12-07 00:52  sshdiqiu\build\classes\spring\spring-action.xml

     文件        833  2012-12-07 01:22  sshdiqiu\build\classes\spring\spring-biz.xml

     文件        844  2012-12-05 22:02  sshdiqiu\build\classes\spring\spring-dao.xml

     文件        713  2012-12-05 23:09  sshdiqiu\build\classes\struts.xml

............此处省略135个文件信息

评论

共有 条评论