菜鸟提问,高手请进!jsp页面跳转问题

hanxuedog 2010-10-11 09:28:20
求一个跳转语句,使得跳转页面执行完后,原页面的html还能输出。比如说一下程序:
<body>
<jsp:include page="hello.jsp" flush="true"></jsp:include>
<table border=1 bordercolorlight=#000000>
<tr>
<td width=60 align=center>代码</td>
<td width=80 align=center>商品名称</td>
<td width=80 align=center>品牌</td>
<td width=180 align=center>产品简介</td>
<td width=80 align=center>存货数量</td>
<td width=80 align=center>价格/元</td>
<td width=50 align=center>更改</td>
<td width=50 align=center>删除</td>
</tr>
</table>

<%
request.getRequestDispatcher("/getAllProducts").include(request,response);---------这个跳转语句要怎样写才能使执行完后,既输出了hello.jsp,表格的内容,又执行了/getAllProducts的内容
%>
...全文
109 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yjflinchong 2010-10-11
  • 打赏
  • 举报
回复
用a标签超链接转换页面啊。 或者用servlet 或者struts
shengfengluanshi 2010-10-11
  • 打赏
  • 举报
回复
<jsp:include page="hello.jsp" flush="true"></jsp:include>
貌似这个标签可以直接写page=/getAllProducts
huminjie1987 2010-10-11
  • 打赏
  • 举报
回复
<%
a = request.getAttr..("xxx")
if(a!=null){

显示内容
}
%>
kevin#1 2010-10-11
  • 打赏
  • 举报
回复
你可以 先执行 /getAllProducts的内容 后 再跳转到 hello.jsp
json_hui 2010-10-11
  • 打赏
  • 举报
回复
换种思考方式

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧