|
请教俩个问题
1.下面代码,抛出一个出错网页后,如何结束?即下面的代码,如何goto 到(...333;)伪语句后面?
2.程序中,如果有if(aaa== null)的判断,如何探出一个简单的画面?结束下面的doIt()函数?
代码如下,
// @Override
public void doIt(HttpServletRequest request, HttpServletResponse response)
throws EXXXException, EXXXXFatalException {
String urlAllOK = "/plugins/DelDocsPlugin/jsp/End21AllOK.jsp";
String urlError = "/plugins/DelDocsPlugin/jsp/Error.jsp";
ServletContext sc = getServletContext();
if(sc == null){
String returnSearchResultXXXList= "Failed in deleted! ";
sc.setAttribute(KEY_RETURN_TYPE_ERROR_XXX, returnSearchResultXXXList);
try{
sc.getRequestDispatcher(urlError).forward(request, response);
}catch(Exception e0000){
e0000.printStackTrace();
}
}
...111;
...222;
...333;
} |
|