JAVA WEB??????????
???????????? ???????[ 2013/5/9 10:11:25 ] ????????
?????????ajax????????web???????????jsp???json????????????????????????????????????struts2???????
public String testAjax()
{
try
{
genAjaxDataStr(0?? "{}");
} catch (BizException e)
{
getRequest().setAttribute(this.ERRORMESSAGE?? e.getErrorMessage());
return this.ERRORJSON;
} catch (BizSystemException e)
{
getRequest().setAttribute(this.ERRORMESSAGE?? this.SYSTEMERROR);
return this.ERRORJSON;
} catch (Exception e)
{
this.errorTrace("test"?? e.getMessage()?? e);
getRequest().setAttribute(this.ERRORMESSAGE?? this.SYSTEMERROR);
return this.ERRORJSON;
}
return this.NONE;
}
????????????????????????????????????????????????????δ?????????log??
???????struts2???и???????????????struts2??webwork???????????棬???????????????????е?????????????????????????????????????log??????
<constant name="struts.devMode" value="false" />
??????????Щδ??????????????2??裺
????1?????????????????struts2????????????????????????webwork?????????????????????????
????2?????struts??DispatcherFilter???δ????????????log??
<global-exception-mappings>
<exception-mapping exception="com.linktong.sdk.biz.exception.BizException"
result="checkedException" />
</global-exception-mappings>
????????????????????????ɡ??????????????????
????1?????????????????????????л?????????????????
????2????????????????????????hessian???л???????????????????????????????????
????3??????logger??????????л?????log??????????з??????????logger????log4j??з???????????
???????web????????????log???????????????
??????
![](/images/ad-banner/ad-banner.png)
???·???
??????????????????
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