
之前的 JBoss 的 JBoss EAP6 Domain Mode Setup 與 JBoss EAP6.x Standalone Mode Cluster Configuration 都在 Windows 平台上作測試,現在起將拋棄 微軟 擁抱 Linux,因為後續的資料庫也是使用 Oracle DataBase,因此 Linux 平台選擇 Oracle Linux,大致的安裝過程可以查看 Oracle Linux Install Using LVM 。
安裝檔下載:
MIS 發表在 痞客邦 留言(0) 人氣(650)

Windows Server 2003 為 VMware 的 guset ,若要擴展 disk 空間,可以使用 diskpart 的指令來作。作業大致如下:
Step 01:Add Additional Space to the Virtual Hard Drive
- Using the vSphere Client, connect to vCenter server or your host. - Once connected, select your Virtual Machine from the Hosts & Clusters or VMs & Templates view. - Click "Edit Settings" - Select your Virtual Disk, and increase the Provisioned Space. - Click OK |
MIS 發表在 痞客邦 留言(0) 人氣(811)

環境是 VM vSphere Esxi 5.x Standard
在 vCenter 中看到,系統出現 "Virtual machine disks consolidation is needed" ,代表 vdk 檔要作 consolidation 。但在執行的過程中發生 Unable to access file since it is locked 的錯誤訊息。
MIS 發表在 痞客邦 留言(0) 人氣(512)

From: Polin Wei
經實作測試,可以正常運作。故記錄之.....
環境:
struts2: 2.3.16.3
MIS 發表在 痞客邦 留言(0) 人氣(1,361)
在 Struts2 的異常處理有兩種,一種是程式撰寫的邏輯出錯,另一種是找不到 action Name : There is no Action mapped for namespace...,避免系統出錯的改善作法如下:
程式撰寫的邏輯出錯:
在 Struts.xml 內加入
MIS 發表在 痞客邦 留言(0) 人氣(272)
JSP 的 EL 與 JSF 的 EL( 如 JSF EL ( Expression Language ) 的介紹),大致相同,參考 http://penguin1989930.pixnet.net/blog/post/236537248 ,後整理如下:
使用EL存取資料
如果想要顯示application隱含物件中的count變數時,可以使用JSP這樣做:
<%=application.getAttribute("count")%>
MIS 發表在 痞客邦 留言(0) 人氣(2,902)

Windows Server 2012 AD 移除 Sub Domain 的方法,有兩種方式:
方法一:利用 ntdsutil 指令
ntdsutil 指令操作說明如下
MIS 發表在 痞客邦 留言(0) 人氣(2,087)
Java 要對 Windows Server AD (Active Directory) 的認證整合,程式碼如下:
Step 01: 準備一個共用函數 LDAP_AUTH_AD
/** * AD LDAP 登入認證 * * @param ldap_url * like ldap://912.168.2.1:389/DC=WEI,DC=COM * @param account * @param password * @return String[2] array 0 :0 success,1 fail,2 LDAP connect fail,3 unknow * error array 1 :useremail */ public String[] LDAP_AUTH_AD(String ldap_url, String account, String password) { String[] returnStr = new String[2]; Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, ldap_url); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, account); env.put(Context.SECURITY_CREDENTIALS, password); LdapContext ctx = null; try { ctx = new InitialLdapContext(env, null); returnStr[0] = "0"; SearchControls searchCtls = new SearchControls(); searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE); String searchFilter = "(sAMAccountName=" + account + ")"; String searchBase = ""; int totalResults = 0; String returnedAtts[] = { "mail" }; searchCtls.setReturningAttributes(returnedAtts); try { NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls); while (answer.hasMoreElements()) { SearchResult sr = (SearchResult) answer.next(); Attributes Attrs = sr.getAttributes(); if (Attrs != null) { try { for (NamingEnumeration ne = Attrs.getAll(); ne.hasMore();) { Attribute Attr = (Attribute) ne.next(); for (NamingEnumeration e = Attr.getAll(); e.hasMore(); totalResults++) { returnStr[1] = e.next().toString(); } } } catch (NamingException e) { System.err.println("Throw Exception : " + e); } } } loger.debug("Number: " + totalResults); } catch (Exception e) { loger.error("Can't find Email Address"); } return returnStr; } catch (javax.naming.AuthenticationException e) { returnStr[0] = "1"; e.printStackTrace(); return returnStr; } catch (javax.naming.CommunicationException e) { // System.out.println("Can't connect to ldap server!"); returnStr[0] = "2"; return returnStr; } catch (Exception e) { System.out.println("error"); e.printStackTrace(); returnStr[0] = "3"; return returnStr; } finally { if (ctx != null) { try { ctx.close(); } catch (NamingException e) { } } } } |
MIS 發表在 痞客邦 留言(0) 人氣(5,604)
JBOSS & Wildfly 常用設置
1. JBoss伺服器改成支援外網訪問
在standalone.xml文件中找到
MIS 發表在 痞客邦 留言(0) 人氣(5,159)