隨筆 - 10  文章 - 0  trackbacks - 0
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          轉(zhuǎn)載地址: http://zwllxs.iteye.com/blog/1070429 
             
          在一次做非常復(fù)雜的ajax應(yīng)用時,如果一個會話已經(jīng)超時,但是此時再通過ajax請求,那么ajax返回的則是一個登陸頁面的html,那這下就慘了,頁面上而已就亂了,那么,能否在java端,如攔截器里判斷客戶的的請求是否是ajax請求呢,經(jīng)過查詢,能. 
             普通請求與ajax請求的報文頭不一樣,通過如下 

          Java代碼  
          String requestType = request.getHeader("X-Requested-With");  

          如果requestType能拿到值,并且值為XMLHttpRequest,表示客戶端的請求為異步請求,那自然是ajax請求了,反之如果為null,則是普通的請求 
          posted @ 2012-08-01 16:20 leafcold 閱讀(346) | 評論 (0)編輯 收藏

           hibernate.cache.region.factory_class=net.sf.ehcache.hibernate.EhCacheRegionFactory  

          報 ClassNotFoundException: org.hibernate.cache.TimestampsRegion

           hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory  

          報 ClassNotFoundException: org.hibernate.cache.ehcache.EhCacheRegionFactory

          后來找到原因,   net.sf.ehcache.hibernate.EhCacheRegionFactory  不支持hibernate4

          hibernate4支持ehcache的話,需要引入

          <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-ehcache</artifactId>
            <version>4.1.2.Final</version>
          </dependency>


          參考地址:http://forums.terracotta.org/forums/posts/list/6674.page

          posted @ 2012-06-27 16:36 leafcold 閱讀(1334) | 評論 (0)編輯 收藏
          ab的全稱是ApacheBench,是 Apache 附帶的一個小工具,專門用于 HTTP Server 的benchmark testing,可以同時模擬多個并發(fā)請求。
          下面的方法是在不安裝apache的情況下,使用ab工具,
          ab執(zhí)行需要以下依賴,以下的安裝文件在Centos安裝盤下都可以找的到 
          rpm -ivh apr-1.3.9-3.el6.i686.rpm
          rpm -ivh apr-util-1.3.9-3.el6_0.1.i686.rpm
          httpd-tools-2.2.15-9.el6.centos.i686.rpm
          解壓縮
          rpm2cpio httpd-tools-2.2.15-9.el6.centos.i686.rpm | cpio -idmv
          將usr/bin 下面的文件復(fù)制 /usr/bin
          同理將usr/share下的文件復(fù)制到/usr/share下對應(yīng)目錄下
          不僅僅是只有ab工具,還有htdbm htdigest htpasswd logresolve工具
          posted @ 2012-06-03 12:36 leafcold 閱讀(486) | 評論 (0)編輯 收藏
          參考文章:http://jarchitect.iteye.com/blog/158776 

          問題: 
          org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'int-http:inbound-channel-adapter'
          真正的原因是缺少了所需要的jar包,將相關(guān)的JAR文件引入到Classpath即可
          要是把錯誤信息進一步明確化,提示開發(fā)人員 NoClassFoundException異常更直觀一點


          posted @ 2012-06-02 13:53 leafcold 閱讀(258) | 評論 (0)編輯 收藏
          引用地址:
          http://www.iteye.com/problems/48016


          我試過類似$('#win').window('close');


          報$.data...options無效的錯誤,我已經(jīng)引入了js文件,路徑?jīng)]問題,而且在同一個頁面,不用iframe是可以關(guān)閉的.

          在iframe的頁面中,我試圖通過調(diào)用$(parent.document).find('#win').window('close')方法 去關(guān)閉window窗口,但是報js錯:$.data...options無效,實在沒辦法了,還請大家?guī)兔鉀Q,幫幫在下吧!!!!


          解決方法:
          parent.$('#win').window('close');


          做下記錄!
          posted @ 2012-05-25 13:00 leafcold| 編輯 收藏
          jbpm5和Activiti5的聯(lián)系與區(qū)別

          http://www.infoq.com/cn/articles/rh-jbpm5-activiti5


          Eclipse插件安裝(3.7.2)

          http://activiti.org/designer/update/



          activiti與mysql集成方法和問題
          導(dǎo)入數(shù)據(jù)庫表
          sql文件在
          activiti-engine-5.9.jar的org/activiti/db/create中

          異常錯誤Caused by: org.activiti.engine.ActivitiException: Activiti database problem: no historyLevel property specified

          解決方案

          可以將配置文件中
          <property name="databaseSchemaUpdate" value="ture" />
          也可以

          act_ge_property 表中加了historyLevel=2

          posted @ 2012-05-12 12:43 leafcold 閱讀(1039) | 評論 (0)編輯 收藏
          僅列出標(biāo)題  
          主站蜘蛛池模板: 朔州市| 武强县| 紫云| 长垣县| 贵州省| 明光市| 永靖县| 庆安县| 澄城县| 甘南县| 桃源县| 邮箱| 突泉县| 五华县| 龙陵县| 广灵县| 河北区| 府谷县| 九龙县| 紫阳县| 慈利县| 永丰县| 保亭| 西安市| 剑川县| 平顶山市| 富顺县| 开原市| 民丰县| 濮阳市| 陕西省| 五原县| 长乐市| 巫溪县| 崇文区| 平遥县| 虞城县| 北海市| 灵石县| 盖州市| 滨海县|