读书人

不懂JSP请问一个极简单的有关问题

发布时间: 2012-02-27 10:00:22 作者: rapoo

不懂JSP,请教一个极简单的问题,回复马上给分
我想在这段代码 <% out.print( " <script> alert(\ "提交失败!\ "); history.go(-1); </script> "); %>
加到下面这段代码中,格式是怎么样的

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

}

[解决办法]
<% out.print( " <script> alert(\ "提交失败!\ "); history.go(-1); </script> "); %>
<%
catch (Exception e) { %>
<script>
alert( "提交失败! ");
history.go(-1);
</script>
<%
throw new AppException( "error.auth.userexist ");
}
%>

读书人网 >Java Web开发

热点推荐