我现在要做一个android 项目 要访问以struts2 hibernate spring 的web项目的数据资源还有上传数据改怎么做,我看了一些要修改struts2 项目 JSONObject json=new JSONObject();
//【这里在JSON中包含一个Map】
Map map=new HashMap<Object, String>();
map.put("username", "xiaomingg");
map.put("password", "1234");
map.put("state", "1");
json.put("userbean", map);
response.getWriter().write(json.toString());除了这个还有什么好的办法吗?
还有如果我要做上传呢?
//【这里在JSON中包含一个Map】
Map map=new HashMap<Object, String>();
map.put("username", "xiaomingg");
map.put("password", "1234");
map.put("state", "1");
json.put("userbean", map);
response.getWriter().write(json.toString());除了这个还有什么好的办法吗?
还有如果我要做上传呢?
2、找到一个博客,可能对你有用
http://blog.sina.com.cn/s/blog_68b3fdc301011f6h.html