不懂JSP,请教一个极简单的问题,回复马上给分

hkhkhkk 2007-08-16 06:04:03
我想在这段代码<% out.print("<script> alert(\"提交失败!\"); history.go(-1);</script> "); %>
加到下面这段代码中,格式是怎么样的

catch (Exception e) {
throw new AppException("error.auth.userexist");

}
...全文
115 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
bengan 2007-08-16
  • 打赏
  • 举报
回复
<%
catch (Exception e) { %>
<script>
alert("提交失败!");
history.go(-1);
</script>
<%
throw new AppException("error.auth.userexist");
}
%>
bengan 2007-08-16
  • 打赏
  • 举报
回复
<% out.print("<script> alert(\"提交失败!\"); history.go(-1);</script> "); %>
<%
catch (Exception e) { %>
<script>
alert("提交失败!");
history.go(-1);
</script>
<%
throw new AppException("error.auth.userexist");
}
%>

81,116

社区成员

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

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