普通請求與ajax請求的報文頭不一樣,通過如下
Java代碼
String requestType = request.getHeader("X-Requested-With");
如果requestType能拿到值,并且值為XMLHttpRequest,表示客戶端的請求為異步請求,那自然是ajax請求了,反之如果為null,則是普通的請求
posted @
2012-08-01 16:20 leafcold 閱讀(346) |
評論 (0) |
編輯 收藏
AOP在spring的controller里無效的問題
Controller的AOP需要寫在servlet.xml里
posted @
2012-07-12 17:57 leafcold 閱讀(532) |
評論 (0) |
編輯 收藏
nexus擴展maven庫
1、http://repository.jboss.org/nexus/content/groups/public/ 為了hibernate
2、https://repository.jboss.org/nexus/content/groups/public-jboss/ 主要是birt report
3、http://mirrors.ibiblio.org/pub/mirrors/maven2/
4、http://maven.springframework.org/release/ spring amqp等
5、https://maven.alfresco.com/nexus/content/groups/public/ activiti
posted @
2012-07-12 11:10 leafcold 閱讀(201) |
評論 (0) |
編輯 收藏