Java Web????????????????
???????????? ???????[ 2012/9/14 10:36:10 ] ????????
??????ν???????????????????????????JDK???????????+????????
????struts2???????????????????к??????????????????????????????????????????
???????????action??service???dao??????б???????????????try...catch??catch????????log???????????????????????????????????
//action??????????????? public String save(){ try{ //????service??save???? service.save(obj); }catch(Exception e){ //????????????Runtime????????????????????дthrows xx throw new RuntimeException("????????????????"??e); } return "success"; } |
????????????????????????д??????????????
public String intercept(ActionInvocation actioninvocation) { String result = null; // Action?????? try { // ???б??????Action????????????????catch? result = actioninvocation.invoke(); return result; } catch (Exception e) { /** * ?????? */ String errorMsg = "δ?????"; //???instanceof?ж?????????????? if (e instanceof BaseException) { BaseException be = (BaseException) e; be.printStackTrace(); //?????????????????????? if(be.getMessage()!=null||Constants.BLANK.equals(be.getMessage().trim())){ //????????? errorMsg = be.getMessage().trim(); } } else if(e instanceof RuntimeException){ //δ?????????? RuntimeException re = (RuntimeException)e; re.printStackTrace(); } else{ //δ????????? e.printStackTrace(); } //????????????? HttpServletRequest request = (HttpServletRequest) actioninvocation .getInvocationContext().get(StrutsStatics.HTTP_REQUEST); /** * ??????????????? */ request.setAttribute("errorMsg"?? errorMsg); /** * log4j?????? */ Log log = LogFactory .getLog(actioninvocation.getAction().getClass()); if (e.getCause() != null){ log.error(errorMsg?? e); }else{ log.error(errorMsg?? e); } return "error"; }// ...end of catch } |
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????