response.sendRedirect("http://www.dxqf.net/softweb/login.asp?username=10000035& password =135a");
response没有返回值,但是我又要得到返回值该怎么写?或者是换一种方式也可以。
response没有返回值,但是我又要得到返回值该怎么写?或者是换一种方式也可以。
解决方案 »
- 精通div+css布局的人们帮帮忙解答下
- struts2中jsp怎么不能进入Action
- 登陆信息保存在Cookie中的问题
- 如何设置jvm的内存容量
- 请帮我解释一下测试得到的package 包名和类所在目录的关系——有点不太好解释
- JasperReport。报表在ie7打印不了。
- [求助]关于“equals”和“==”的区别
- 请大家帮忙 jsp连oracle 的问题
- 如何获得servlet的路径
- list<String> 如何在页面用下拉框显示出来??求指点
- 学习javaWeb必需要掌握的技术点(比如说Quartz,workFlow)等讨论下开始学
- 使用JSP如何在上传文件时自动创建一个新的文件夹
PrintWriter out= response.getWriter();
out.print("<script language='javascript'>alert(' 删除成功!');window.location.href='/system/eticket/list_single.jsp';</script>");
前面是名称,后面是要set进去的值request.getAttribute("list");
得到list的值了
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
// MessForm mf = (MessForm) form;
// request.setAttribute("message", mf);
// 帐户余额地址
String zhye = "http://www.dxqf.net/softweb/login.asp?username=10000035& password =135a";
// 电信
// StringBuilder stbu = new StringBuilder();
// stbu.append(urldx);
// stbu.append("/");
// stbu.append(zhye);
// stbu.append("?");
// stbu.append("username=");
// stbu.append(mf.getUsername());
// stbu.append("& password =");
// stbu.append(mf.getPassword());
response
.sendRedirect("http://www.dxqf.net/softweb/login.asp?username=10000035& password =135a");
.sendRedirect("http://www.dxqf.net/softweb/login.asp?username=10000035& password =135a");
就这个,帮我换个方式发送URL。
out.print("<script language='javascript'>alert(' 删除成功!');window.location.href='http://www.dxqf.net/softweb/login.asp?username=10000035&password =135a';</script>");这种方式有问题?
String URL2 ="http://www.dxqf.net/softweb/login.asp";
method = new PostMethod(URL);
method.addParameter("username", "10000035");
method.addParameter("password ", "135a");
int statusCode = httpClient.executeMethod(method);
if(statusCode == HttpStatus.SC_OK){
String isok = method.getResponseBodyAsString();
System.out.println(isok );
}
什么公司,坑爹阿°
...
HttpResponse response=httpClient.execute(method);
if(response.getStatusLine().getStatusCode() == 200){ //if response succeeds
//Handle entity
HttpEntitiy entity=response.getEntity();
if(entity!=null){
InputStream in= entity.getContent();
byte[] contentReceiver=new byte[2048];
int l;
while( (l=in.read(contentReceiver))!=-1 ){}
}
}