解决方案 »
- CentOS6下安装MyEclipse
- struts2后台类型转换问题
- 页面传参中&和&&有什么区别,判断中!=null和null!= 有什么区别
- 在aix5.3上用weblogic9.2+oracle10.2部署项目出错
- hibernate M-N 中间表属性修改问题
- 大家看看错在哪里??为什么不能往现有的xml文件里增加新节点呢?原文件如下:
- Struts里的action获的Response的输出流然后输出一段代码吗?
- 给我个使用EJB的理由。
- client端Bean可以调用Local接口的EJB吗?
- JSch连接主机
- 使用openfire做群聊工具
- 我在eclipse建立了一个 dynamic web project,里面用jna调用我用C写的dll,但是提示找不到dll,还请高手帮我看看问题在哪,谢了!
URL url = new URL("http://localhost:9001/print/print.do");
HttpURLConnection huc = (HttpURLConnection)url.openConnection();
huc.setRequestMethod("POST");
huc.setRequestProperty("connection","Keep-Alive");
huc.setRequestProperty("accept","*/*");
huc.setRequestProperty(
"user-agent",
"Mozilla/5.0 (Windows NT 6.1) AppWebKit/537.36(KHTML,like Gecko) Chrome/29.0.1547.66 Safari/537.36");
huc.setDoOutput(true);
huc.setDoInput(true);
huc.setRequestProperty("j_username", "11111111");
huc.setRequestProperty("j_password", "123456");
huc.setRequestProperty("verifyCode", "1111");
BufferedReader br = new BufferedReader(new InputStreamReader(huc.getInputStream(),"GBK"));
huc.connect();
String line = br.readLine();
while (line != null) {
System.out.println(line);
line = br.readLine();
}上面的方法是模拟登陆,但是一直在登陆页面进不去。 这个时候得到的coocike是不对的。