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
          目前建議下載版本:穩定版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

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


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


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

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


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

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 普定县| 临汾市| 永和县| 芮城县| 通城县| 平塘县| 永寿县| 永宁县| 康马县| 武胜县| 大新县| 栖霞市| 崇礼县| 青川县| 靖宇县| 明星| 邓州市| 土默特左旗| 和林格尔县| 民丰县| 武隆县| 漳平市| 徐闻县| 东丽区| 德州市| 牟定县| 黑龙江省| 宣恩县| 盐池县| 高邮市| 宁德市| 公安县| 莱西市| 东平县| 安义县| 石景山区| 临城县| 罗甸县| 衡阳县| 托克托县| 维西|