Groups
Groups
Sign in
Groups
Groups
兰州大学网络中心实验室
Conversations
About
Send feedback
Help
android json 问题
4 views
Skip to first unread message
何建博
unread,
Jul 18, 2011, 5:11:53 AM
7/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzuitslab
android,给服务器POST了一个URL请求,返回来一个页面的源码,将这段源码存进了一个JSONObject,如何取得源码中html标签<form>的“action”属性值?
Loong Tan
unread,
Jul 18, 2011, 7:08:12 AM
7/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
不知道有没有现成的方法,正则肯定是可以出来的、
-----------------
Best Regards
2011/7/18 何建博
<
hjb27...@163.com
>
kang kang
unread,
Jul 18, 2011, 11:34:11 AM
7/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
不明白
何建博
unread,
Jul 18, 2011, 8:16:21 PM
7/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
就是想要实现这样一个效果,做一个网站的手机客户端, 在客户端输入用户名密码,然后后台将用户名密码发送到网站的用户名密码表单处理页(从网站登录界面源码中找到的<form>的属性“action”的值)进行验证,收到响应页面后对该页面进行解析和正则匹配,来确认用户名密码是否正确,但是那个表单处理页的网址里的某一段每次访问都会产生一个随机数,所以先得获得这个随机数,方法就是先请求登录页面,返回来后将里面的“action"的值提取出来,然后再请求该action所指向的页面进行验证,现在就是不知道如何把action的值从返回的页面中提取出来,我原来是把返回来的页面源码整个存入一个jsonobject,但不知道如何从其中截取出action后面那段网址字符串。。
kang kang
unread,
Jul 19, 2011, 12:02:18 AM
7/19/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
这和json有什么关系啊,字串处理呗
kang kang
unread,
Jul 19, 2011, 12:02:19 AM
7/19/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
也可以用jsoup之类的做解析
On Tuesday, July 19, 2011, 何建博 <
hjb27...@163.com
> wrote:
何建博
unread,
Jul 19, 2011, 12:56:40 AM
7/19/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
那个问题通过分解字符串的方式解决了,可是又出了个新的问题,如图
每次运行到“取得http状态那一行就运行不下去了,不知道为什么。。。。
何建博
unread,
Jul 19, 2011, 3:26:29 AM
7/19/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
问题已经解决,是太粗心了,在组成newurl时前面忘记了加“http://”。
kang kang
unread,
Jul 22, 2011, 12:17:11 PM
7/22/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
这和json有什么关系啊,字串处理呗
On Tuesday, July 19, 2011, 何建博 <
hjb27...@163.com
> wrote:
kang kang
unread,
Jul 22, 2011, 12:17:12 PM
7/22/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lzui...@googlegroups.com
也可以用jsoup之类的做解析
On Tuesday, July 19, 2011, 何建博 <
hjb27...@163.com
> wrote:
Reply all
Reply to author
Forward
0 new messages