我想在这段代码<% out.print("<script> alert(\"提交失败!\"); history.go(-1);</script> "); %>
加到下面这段代码中,格式是怎么样的catch (Exception e) {
                throw new AppException("error.auth.userexist"); 
 
            }

解决方案 »

  1.   

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

  2.   

    <%
    catch (Exception e) {  %>
      <script> 
        alert("提交失败!"); 
        history.go(-1);
      </script>
    <%
         throw new AppException("error.auth.userexist"); 
     }
    %>