String path = “/raisins.jsp?orderno=5”;
RequestDispatcher rd = context.getRequestDispatcher(path);
rd.forward(request,response); //跳转到path指定的页面
RequestDispatcher rd = context.getRequestDispatcher(path);
rd.forward(request,response); //跳转到path指定的页面
解决方案 »
- 菜鸟问题
- 本科毕业设计(java web开发)
- 麻烦大家看看这是啥问题 :<c:forEach items="" var="" varStatus="">
- 无法使用EL表达式?
- Weblogic服务器,后台经常报IOException,求助
- java怎么采集一个网站的文章,而且是按这个网站的文章ID采集文章内容
- 出现java.lang.IllegalArgumentException错误,请高手解决一下
- 用过proxool的请进~我的proxool啊
- ★★★999分★★★求web图形处理插件!!!!定者有分,决不食言!请认识的,不认识得JAVA版的XDJM进来帮我!谢了先
- 站住!过来看看。给你分还不要!你---你---回来!
- 我的<html:errors>为什么没有输出
- 问题!!!!
ServletContext sc = getServletContext();
RequestDispatcher rd = sc.getRequestDispatcher(url);
rd.forward(request,response);
还有
mapping.findForward("page")
不过这需要在servlet里面配置
很安全的
用户是看不到到底指向的具体页面
简单的就是response.sendRedirect()
比较安全
String path = “/raisins.jsp?orderno=5”;
RequestDispatcher rd = context.getRequestDispatcher(path);
rd.forward(request,response);
还有
rd.include(request,response)
我遇见过,但我也没十分弄清楚他们的区别!