在撰寫程式時,對於刪除資料前應該是先詢問使用者,以往都是跳出一個詢問視窗,但現在的流覽器大都會阻隔,在導入 Bootstrap 的 framework 後,可以加入 bootstrap-dialog.js 的 plug-in 來強化程式的友善化。效果如下:




 



  • 查詢後的畫面


beforeDel



  • 按下刪除時的詢問視窗


askDel 





MIS 發表在 痞客邦 留言(0) 人氣()

繼 Struts 2 對於 Interceptor 攔截器的基本概念與實作 的瞭解後,我們現在來作一下 Interceptor 在 Struts 2 上的基本運用。
首先建立一個 class : com.test.interceptor.MyInterceptor 並且 implements Interceptor,這個 Interceptor 是個 Interface,所以需要實作三個 method:init()、destroy()、intercept(ActionInvocation invocation),其中只有 intercept(ActionInvocation invocation) 需要回傳一個 String 的值,可以利用  invocation.invoke(); 來讓系統自已跳到預設的下一個 Action method。
 

MIS 發表在 痞客邦 留言(0) 人氣()

XAMPP 是一套整合 Apache、PHP、MySQL、Mercury Mail Transport System、FileZilla FTP Server、Tomcat...等的服務應用系統,讓您可以專心在系統程式開發上,若在開發的應用系統中有需要發信時而不想自行管理 Mail Server 時,可以利用內附的 sendmail 結合 gmail 來達成。
 
主要修改的地方有二個設定:

MIS 發表在 痞客邦 留言(1) 人氣()

在 Apache 利用 mod_rewrite 做到網址轉換達成SEO優化 我們達成了 SEO 的優化,但當刷新頁面很多次時卻有時會出現空白的頁面,將 php 程式段的偵錯模式打開 error_reporting(E_ALL); 會出現下列的錯誤訊息。



Fatal error: Uncaught --> Smarty: unable to write file /xampp/htdocs/myweb/smarty/templates_c\8c6924ac7efe8f944a5a8a181c85433787f58f0c.file.home_index.html.cache.php <-- thrown in D:\xampp\htdocs\myweb\includes\smarty\libs\sysplugins\smarty_internal_write_file.php on line 74


MIS 發表在 痞客邦 留言(0) 人氣()

Struts 2 支援 POJO 的程式撰寫,所以可以指定 Action Method 來執行您在 struts.xml 中的設定。



<action name="userLogout" method="logout" class="com.gu.EipLogin">
     <result>eip_home.jsp</result>
</action>


MIS 發表在 痞客邦 留言(0) 人氣()

Struts 2 在 struts2-core-2.x.x.jar 的 struts-default.xml 中也設定了許多的 Interceptor 攔截器,Interceptor 攔截器的基本概念大致整理如下:
1. 要有目標對象
2. 攔截器本身,在攔截器本身安插要執行的作業
3. 由 java.lang.reflect.InvocationHandler 來讓 目標對象 與 攔截器 產生關連

MIS 發表在 痞客邦 留言(1) 人氣()

Struts 2 要與 Spring 結合並不難,因為 Struts 2 本身就已經預留介面,在 struts2-core-2.x.x.jar 裡的 org.apache.struts2.default.properties 有這一段設定



### if specified, the default object factory can be overridden here
### Note: short-hand notation is supported in some cases, such as "spring"
###       Alternatively, you can provide a com.opensymphony.xwork2.ObjectFactory subclass name here
# struts.objectFactory = spring
### specifies the autoWiring logic when using the SpringObjectFactory.
### valid values are: name, type, auto, and constructor (name is the default)
struts.objectFactory.spring.autoWire = name


MIS 發表在 痞客邦 留言(0) 人氣()

JBoss EAP 6.x 上要建立 Oracle DataBase 的 Java Naming and Directory Interface (JNDI) 作法分三個步驟如下:
Step 01: 在 $JBOSS_HOME 目錄 modules 下建立 oracle 相關資訊





$ mkdir -p $JBOSS_HOME/modules/com/oracle/main/

$ touch $JBOSS_HOME/modules/com/oracle/main/module.xml





MIS 發表在 痞客邦 留言(0) 人氣()

OAF_R11_Hello_01
環境:
EBS : R11.5.10
JDeveloper: p8751878_GENERIC.zip 解壓至 D:\OAF_R11i

MIS 發表在 痞客邦 留言(0) 人氣()

在這篇文章:Apache 利用 mod_rewrite 做到網址轉換達成SEO優化 說到使用此方法的好處,在 Struts2 中也可以利用 WildcardMappings 來達成 SEO 優化,舉下列例子來說明:
原來:http://localhost:8080/guEBS/guWeb/userChooseLang?lang=chinese

MIS 發表在 痞客邦 留言(0) 人氣()

JBossEAP_Eclipse.png
裝完 JBoss EAP 6.x ,並利用 Eclipse 開發程式除錯 Debug 時,發現一般使用 System.out.println() &  logger.info() 都沒有出現在 Console 中,查了好久才找到正解如下:
1. 在 Eclipse 開發環境:
在 Servers 視窗下的 JBoss EAP Server 點兩下,選擇 Open Launch configuration ,然後在 VM arguments 裡最後加入 -Dorg.jboss.as.logging.per-deployment=false 即可,如下圖:

MIS 發表在 痞客邦 留言(1) 人氣()

JBoss EAP 6.x 上要建立 MySQL 的 Java Naming and Directory Interface (JNDI) 作法分三個步驟如下:
Step 01: 在 $JBOSS_HOME 目錄 modules 下建立 mysql 相關資訊





$ mkdir -p $JBOSS_HOME/modules/com/mysql/main/

$ touch $JBOSS_HOME/modules/com/mysql/main/module.xml





MIS 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。