大家给看看jsp中写java如何跳转另一个jsp页面

passer_ming 2008-07-04 10:12:54
if (!title.equals(EMPTY) && content.equals(EMPTY)) {
response.sendRedirect("sendMsg.jsp?checkDate=" + 2);
return;
}
现在不想用response.sendRedirect("sendMsg.jsp?checkDate=" + 2);
也不用<jsp:forward>
还有别的实现方式吗
...全文
290 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
passer_ming 2008-07-04
  • 打赏
  • 举报
回复
window.location.href = '你的页面';

用了之后没有反应阿

<script type="text/javascript">
window.location.href = "sendMsg.jsp?checkDate=" + 1;
</script>
duzhonghua 2008-07-04
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 cowboy0101 的回复:]
使用javascript window.location.href = '你的页面';
[/Quote]
passer_ming 2008-07-04
  • 打赏
  • 举报
回复
up
cowboy0101 2008-07-04
  • 打赏
  • 举报
回复
使用javascript window.location.href = '你的页面';
passer_ming 2008-07-04
  • 打赏
  • 举报
回复
用的是jsp+servlet
现在就是想在jsp中如何实现跳转
不用response.sendRedirect("sendMsg.jsp?checkDate=" + 2);
也不用 <jsp:forward>
jiatai416 2008-07-04
  • 打赏
  • 举报
回复
struts可以解决

81,122

社区成员

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

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