This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 请教一个JAVA问题,如何在URLconnection 里设置象HTML PAGE里的<input type="text" name="search">的参数使得在SERVLET里的HttpRequest.getParameter("search")能取到.
-guest:;
2001-8-23
(#177734@0)
-
应该可以, 我试过用GET, 参数直接在URL中 也可以
-uid(㊣Miracle);
2001-8-24
(#177746@0)
-
GET给人感觉不安全太容易被人看见。
-guest:;
2001-8-24
(#177750@0)
-
use encode
-wendywendy(wind);
2001-8-24
(#178292@0)
-
忘了说了我想要的是在doPost()里实现。
-guest:;
2001-8-24
(#177757@0)
-
Use encoding should be okey
-uid(㊣Miracle);
2001-8-24
(#178418@0)
-
like this: http://www.rolia.com/?rpp=20
-eglington(eglington);
2001-8-24
(#177749@0)
-
Use URLEncoder.encode()
-feather(feather);
2001-8-24
(#177796@0)
-
If you can specify your scenario, maybe I can give you some hints.
-jabber(jabber);
2001-8-24
(#178058@0)
-
I am writing an authentication servlet. The servlet will parse the username/password passed from a GUI client.We are not using SSL currently so I wIll like to use doPost method.
-guest:Thank for your help!;
2001-8-24
(#178210@0)
-
Please come in....
-jabber(jabber);
2001-8-24
{554}
(#178249@0)
-
I have try setRequestProperty, It only set the header of HTTP request.
-guest:;
2001-8-24
(#178397@0)
-
I can not retrieve the property by getheader(). I can not find the book right now.
-guest:;
2001-8-24
(#178408@0)
-
Basically, you need to marshal the data here.Because you have lost luxuries provided by the browser, you have to send data by yourself. Trust me, if you look into the example I referred to earlier, you will soon get the solutions.
-jabber(jabber);
2001-8-24
{186}
(#178411@0)
-
can you post the small piece of code here?
-guest:;
2001-8-24
(#178415@0)
-
Can you put the the line of code that setRequestProperty(?,?) here? Thank you for your help!!!
-guest:;
2001-8-24
(#178446@0)
-
Please download the code on your own and look into the book by Karl Moss.
-jabber(jabber);
2001-8-26
(#180226@0)
-
where is the code ?I can not find the book.
-guest:;
2001-8-26
(#180244@0)
-
I can not retrieve the property by getParameter,but only by getheader(). It seem to me it not decent way either.I can not find the book right now.
-guest:;
2001-8-24
(#178412@0)
-
Here you go...Because you don't use HTML form, or hyperlink, you cannot use request.getParameter(...). In one word, you have no browser, so you have lost somethin you have got used to. This is why I said you must marshal the data on your own.
-jabber(jabber);
2001-8-26
{230}
(#180239@0)