當(dāng)柳上原的風(fēng)吹向天際的時候...

          真正的快樂來源于創(chuàng)造

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            368 Posts :: 1 Stories :: 201 Comments :: 0 Trackbacks

          #

          如果RSA/Eclipse總是處于Building中,可能是錯誤的工程在Wrokspace中導(dǎo)致的,此問題嚴(yán)重起來可能導(dǎo)致無法使用RSA/Eclipse.
          我的處置辦法如下:
          1.將“Build Automatically”取消。
          2.關(guān)閉RSA/Eclipse,如果Building還在處理中,在任務(wù)管理器中找到Eclipse進(jìn)程,Kill掉。
          3.再次打開RSA/Eclipse,刪除掉可能導(dǎo)致Building出錯的工程。如果實在不清楚,全部刪除之。
          4.再啟用“Build Automatically”選項,此時Build會開始,然后就正常結(jié)束了。

          有的網(wǎng)文說在Eclipse啟動時加入?yún)?shù):   -vmargs -Xmx512M能解決問題,我試了無效,可能和他遇到的問題不是一個。
          posted @ 2012-11-09 08:39 何楊 閱讀(362) | 評論 (1)編輯 收藏

          在Servers窗口中,右鍵點擊服務(wù)器,彈出菜單中選“Administration”,再選“Run Administrative Console”,如下圖:
          posted @ 2012-11-09 08:05 何楊 閱讀(442) | 評論 (0)編輯 收藏

          在Servers窗口中,找到目標(biāo)服務(wù)器,右鍵點擊,在彈出菜單中選屬性。第三項就包括了Was服務(wù)器的常規(guī)信息。
          posted @ 2012-11-08 15:18 何楊 閱讀(370) | 評論 (0)編輯 收藏

          右鍵點擊工程,選屬性一項,找到“Web Project Setting”選項,在Context Root中輸入新的context,圖示如下:
          posted @ 2012-10-18 14:30 何楊 閱讀(261) | 評論 (0)編輯 收藏

          點擊菜單windows->Preferences->server->websphere
          將Allow applications containing errors to be published on a server一項勾選。

          如果不進(jìn)行這項設(shè)置,在部署時會出現(xiàn)以下錯誤。

          Publish failed with errors, warnings or both. Please see server logs for more details.

           The application contains validation errors. Correct the errors in the Problems view before publishing the application on the server. If you want to allow applications containing errors to be published on the server, enable the Allow applications containing errors to be published on a server check box (Windows > Preferences >Servers > WebSphere).

          No start tag (<p>).

          但愿你不是出錯了再回來找的。J

          posted @ 2012-10-17 13:58 何楊 閱讀(368) | 評論 (0)編輯 收藏

          下是使用RSA(Rational Software Architect)時的一個Tip,在這里寫下來,希望能對那些遇到和我同樣困擾問題的人有些幫助。

          使用RSA開發(fā)web程序時,會需要把應(yīng)用發(fā)布到容器中,但有時RSA是沒有顯示Servers窗口的,使用“Show View”菜單也見不到。
          此時無需慌亂,切換到Web視圖,再使用“Show View”菜單,servers窗口就顯示出來了。
          以下是切換到Web視圖的圖示:


          以下是使用“Show View”菜單,顯示servers窗口的圖示

          以下是Servers窗口顯示出來的圖示



          就這么簡單,可有時寸勁遇到了也能讓人煩一陣的。

          posted @ 2012-10-16 13:32 何楊 閱讀(231) | 評論 (0)編輯 收藏

          下載地址:
          http://www.aygfsteel.com/Files/heyang/Utf8Test20120927.rar

          轉(zhuǎn)化效果:
          %E4%BD%95%E6%9D%A8%E5%88%B0%E6%AD%A4%E4%B8%80%E6%B8%B8%EF%BC%81
          何楊到此一游!

          有時候也挺好玩的。
          posted @ 2012-09-27 23:48 何楊 閱讀(371) | 評論 (2)編輯 收藏

          2012年6月21日15:21:59

          程序代碼下載:
          http://www.aygfsteel.com/Files/heyang/ViewDsSample.zip
          注意這個程序是RSA中的Dynamic Web Project


          如果需要建立數(shù)據(jù)源,請參考:
          http://www.aygfsteel.com/heyang/archive/2012/06/21/381257.html

          如果需要建立JDBC Provider,請參考:
          http://www.aygfsteel.com/heyang/archive/2012/06/21/381254.html

          由于是示例代碼,所以比較簡單,功能就是訪問數(shù)據(jù)庫中一張表,然后把數(shù)據(jù)在表格中顯示出來。index.jsp中的代碼如下:
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
          <%@ page language="java" autoFlush="true" isThreadSafe="true" buffer="10kb" %>
          <%@ page import="javax.servlet.http.*"%>
          <%@ page import="java.util.*,java.lang.*,java.math.*"%>


          <%@ page import="java.sql.Connection"%>
          <%@ page import="java.sql.DriverManager"%>
          <%@ page import="java.sql.Statement"%>
          <%@ page import="javax.naming.Context"%>
          <%@ page import="javax.naming.InitialContext"%>
          <%@ page import="javax.sql.DataSource"%>
          <%@ page import="java.sql.ResultSet"%>


          <html>
              
          <head>
                  
          <title>View DataSource In Was</title>
              
          </head>
              
              
          <body>
                  
          <table width="100px" border="1">
                  
          <caption>Visit the data in DataSource</caption>    
                  
          <thead>
                  
          <tr>
                      
          <td width="50px">Id</td>
                      
          <td width="50px">Name</td>
                  
          </tr>    
                  
          </thead>
                  
          <tbody>
                  
          <%
                      Context ctx
          = new InitialContext();
                      DataSource ds 
          = (DataSource) ctx.lookup("jdbc/localdb2");// 注意這里需要和數(shù)據(jù)源配置中的jndi名對應(yīng)上。
                      
                      Connection con 
          = ds.getConnection();
                      
          String sql = "select * from SYSTEM.TESTTB0619";
                      
                      Statement stmt 
          = con.createStatement();
                      ResultSet rs
          =stmt.executeQuery(sql);
                      
                      
          while (rs.next()) {
                          
          String id = rs.getString("id");
                          
          String name = rs.getString("name");
                          
                          out.println(
          "<tr>");
                          out.println(
          "<td>"+id+"</td>");
                          out.println(
          "<td>"+name+"</td>");
                          out.println(
          "</tr>");
                      }
                      
                      
                      rs.close();
                      stmt.close();
                      con.close();
                  
          %>
                  
          </tbody>
                  
          </table>
              
          </body>
          </html>

          首頁顯示效果如下:
          posted @ 2012-06-21 15:25 何楊 閱讀(364) | 評論 (0)編輯 收藏

          2012年6月21日14:54:37

          在進(jìn)行以下步驟前需要先增加一個JDBC Provider,如果沒有,請參考http://www.aygfsteel.com/heyang/archive/2012/06/21/381254.html

          01.左邊點"Resources"->"JDBC"->"Data Sources",右邊點"New"。


          02.DataSource名自己定,jndi名是要給程序用的,兩方面要協(xié)調(diào)一致,下一個框是選訪問數(shù)據(jù)庫的用戶名密碼,沒有可以新建一個。


          03.這一步是選JDBC Provider,http://www.aygfsteel.com/heyang/archive/2012/06/21/381254.html一文中所有工作就是為了這一步。


          04.這一步的參數(shù)除了Dirver type不用動之外,其它的按照你的實際情況輸入。


          05.這一步就是選Finish。


          06.這一步就是要點Save。


          07.測試一下,連接成功了。




          好了,下一步可以在程序中測試這個數(shù)據(jù)源DataSource是否好用了。
          posted @ 2012-06-21 14:53 何楊 閱讀(339) | 評論 (0)編輯 收藏

          2012年6月21日14:29:40

          1.左邊點"Resource">"JDBC">"JDBC Provider",右邊點"New".


          2.按圖示的選項進(jìn)行選擇,Provider名字自己定。


          3.這一步是找兩個關(guān)鍵的jar所在的目錄,一個是db2jcc.jar,一個是db2jcc_license_cisuz.jar,如果安裝了Db2的話,這兩個jar會出來。在我機器上,
          它們位于C:\Program Files\IBM\SQLLIB\java和C:\Program Files\IBM\SQLLIB_01\java中。


          4.這一步點Finish就行了。


          5.最后完成了。


          Provider是給DataSource用的,在下一節(jié)就會看到。

          2012年6月21日14:36:36
          posted @ 2012-06-21 14:28 何楊 閱讀(462) | 評論 (0)編輯 收藏

          僅列出標(biāo)題
          共28頁: First 上一頁 2 3 4 5 6 7 8 9 10 下一頁 Last 
          主站蜘蛛池模板: 滁州市| 莫力| 邢台县| 屯昌县| 新乐市| 南通市| 衡山县| 周宁县| 北海市| 东阿县| 井研县| 云阳县| 淮阳县| 沧源| 洪湖市| 体育| 天峨县| 浦北县| 武山县| 肃宁县| 康保县| 镶黄旗| 始兴县| 文山县| 桃源县| 吉水县| 嘉定区| 成都市| 顺昌县| 榆中县| 巩义市| 额敏县| 甘孜县| 宝山区| 星子县| 冕宁县| 沿河| 张家港市| 留坝县| 五原县| 五华县|