当前页面: 开发资料首页 → JSP 专题 → 急。急急。。请各位大人帮帮我啊。页面重定向不到我写的地址小弟穷分少。多谢
急。急急。。请各位大人帮帮我啊。页面重定向不到我写的地址小弟穷分少。多谢
摘要: 急。急急。。请各位大人帮帮我啊。页面重定向不到我写的地址小弟穷分少。多谢
我想实现a.jsp页面跳转到(例如http://www.163.com)并传两个参数 tel,starts
注意地址。不是本机里的页,要是别的服务器的地址
a.jsp页面路径,用的Tomcat(Root/jsp/a.jsp)
我的代码
页面跳转不到try.jsp去 页面错误是The requested resource (/jsp/http://www.163.com) is not available
我的name和password是
通过 String name=request.getParameter("name");
String password=request.getParmater("password");获得的
上边写的是测试用的
http://www.1788.cn:8080/jsp/try.jsp接不到值
forward只能转到本应用的页面上
转到别的域上用redirect
You can not do this, because you have to put the relative path in the page attribute.
谢谢。问题解决了
<%
String name="gudeli";
String password="55555";
//页面转发
response.sendRedirect("http://www.163.com?name="+name+"&password="+password);
%>
谢谢各位。。和大家分享。