没有合适的资源?快使用搜索试试~ 我知道了~
jsp(服务器)与android(客户端)交互
5星 · 超过95%的资源 需积分: 50 342 下载量 76 浏览量
2013-05-04
18:57:41
上传
评论 11
收藏 3KB TXT 举报
温馨提示
试读
4页
jsp(服务器)与android(客户端)交互
资源推荐
资源详情
资源评论
------------------------jsp(服务器)与android(客户端)交互
使用两个Eclipse ,一个做客户端,一个服务器
步骤:
在服务器端:
1.创建web工程
2.添加hibernate
3.添加表(登陆,查询部门)
4.写service
//登陆
public boolean checkLogin(String username, String password) {
Users instance = new Users();
instance.setUsername(username);
instance.setPassword(password);
List list = usersDAO.findByExample(instance);
if (list != null && list.size() > 0)
return true;
return false;
}
//查询部门
public List getAllDep() {
return depDAO.findAll();
}
//查询
public String getAllDepToJson() {
List<Dep> list = getAllDep();
使用两个Eclipse ,一个做客户端,一个服务器
步骤:
在服务器端:
1.创建web工程
2.添加hibernate
3.添加表(登陆,查询部门)
4.写service
//登陆
public boolean checkLogin(String username, String password) {
Users instance = new Users();
instance.setUsername(username);
instance.setPassword(password);
List list = usersDAO.findByExample(instance);
if (list != null && list.size() > 0)
return true;
return false;
}
//查询部门
public List getAllDep() {
return depDAO.findAll();
}
//查询
public String getAllDepToJson() {
List<Dep> list = getAllDep();
sw01
- 粉丝: 5
- 资源: 67
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页