首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

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

2012-02-27 
不懂JSP,请教一个极简单的问题,回复马上给分我想在这段代码 %out.print( scriptalert(\ 提交失败!\

不懂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 ");
}
%>

热点排行