out.print("<form name=form1 method=post action=post.jsp>"+
"<input type=text value=hello name=t>"+
"<input type=submit>"+
"</form>"+
"<script>document.form1.submit();</script>");
"<input type=text value=hello name=t>"+
"<input type=submit>"+
"</form>"+
"<script>document.form1.submit();</script>");
get能够传递的字符太少
http post 请求的内容应该知道吧?
try{
URL u = new URL("http://websit");
URLConnection uc = u.openConnection();
uc.setDoOutput(true);
OutputStreamWriter out = new OutputStreamWriter(
new BufferedOutputStream(uc.getOutputStream()));
out.write("username=aaaa&password=bbbbbb\r\n");
out.flush;
out.close;
}
catch(IOException e){}