posts - 15,  comments - 4,  trackbacks - 0
          Struts2的下載地址:
          http://struts.apache.org/download.cgi
          目前建議下載版本:2.2.1GA版

          Hibernate下載地址:
          http://www.hibernate.org/downloads
          目前建議下載版本:3.6.0 Final版

          Spring的下載地址:
          http://www.springsource.org/download
          目前建議下載版本:穩(wěn)定版3.0.5

           
           
           
          2013-1-15  
          1、struts2  top關鍵字理解。 
          1).top 指代當前迭代元素,可以為對象;
          2).這里的top可用[0].top替代,但不能使用[0];[0]代表整個棧對象。如果單純調用[0]將會調用其 toString()方法輸出對象信息;



          2、刪除信息時錯誤日志:
          java.lang.IllegalArgumentException: Removing a detached instance

           Detached - a detached instance is an object that has been persistent, but its Session has been closed. The reference to the

                object is still valid, of course, and the detached instance might even be modified in this state. A detached instance can be

                reattached to a new Session at a later point in time, making it (and all the modifications) persistent again

                現(xiàn)在應該明白了吧,在刪除之前把這個Detached instance綁定到當前的Sesssion,在用當前Sesssion刪除此instance。修改后的代碼如


          解決辦法:
          public void delete(SASVo  vo) {
                         entityManager.remove( entityManager.merge(vo));
                  }
          posted on 2013-01-15 16:54 老天 閱讀(386) 評論(1)  編輯  收藏


          FeedBack:
          # re: ssh框架學習記錄
          2013-01-16 10:48 | 免費網絡記事本
          暈,還以為是linux 下的ssh呢-_-!  回復  更多評論
            

          只有注冊用戶登錄后才能發(fā)表評論。


          網站導航:
           
          <2013年1月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 夏邑县| 张掖市| 马关县| 呼图壁县| 灌阳县| 扎赉特旗| 鹤岗市| 新巴尔虎左旗| 峨山| 贵阳市| 鹤山市| 惠东县| 鄂托克旗| 中江县| 章丘市| 平谷区| 枞阳县| 张北县| 邓州市| 苗栗市| 勃利县| 亚东县| 平邑县| 安塞县| 丰宁| 安平县| 婺源县| 平舆县| 金堂县| 大英县| 普格县| 湄潭县| 甘泉县| 曲松县| 上思县| 浠水县| 辉南县| 搜索| 柳江县| 罗甸县| 钦州市|