2013年7月24日 星期三

Aqua Data Studio 中文亂碼 及 記憶體調整

中文亂碼
     檔案>選項>一般>格線結果字集> 修改為"新細明體"


預設 JVM 記憶體調整
     修改檔案 C:\Program Files\Aqua Data Studio 7.0 - 32bit\datastudio.ini
     尋常字串: vmarg.2=-Xmx256M
     修改紅色部份 EX: vmarg.2=-Xmx512M

2013年7月15日 星期一

第一支Tapestry... Hello Tapestry


環境 Tapestry 4.0 / eclipse / Tomcat 6
Tapestry 預設的 Html templet 檔名為 Home.html
對應的 page 檔案應取名為 Home.page
對應的 class 檔案應取名為 Home.java
對應的 application 檔案 應取名為 Servlet的名稱.application
以下就是最基本的入門應用



首先建動態網頁專案
 取名HelloTapestry,使用eclipse 內建的 tomcat plugin
 將所需的Tapestry/lib 檔案 copy 至 WebContent\WEB-INF\lib\ 目錄下

 點選所加入的 lib 檔案,選擇 Add to Build Path,或者使用預先建立好的 User Library


編輯 web.xml 檔案(圖中所搭配的工具為 JBoss Tools
新增Servlet / Servlet Mapping

 編輯後的web.xml

接著在 WebContent 新增 Home.html 及 Html.page 檔案
Home.html內容:
Home.page內容:
接著新建一個類別 Home.java
全部完成後 --> 將其載入 Server 中 執行
以上就是執行的結果 ^^
第一種運用 .page 的方式宣告 component
第二種為運用 內崁方式 直接在 Html 內宣告元件類型,並使用
servlet名稱.application 配置 org.apache.tapestry.page-class-packages
使Tapestry framework 自動搜尋對應的 java 類別檔
原始碼下載 -- 第一種寫法
原始碼下載 -- 第二種寫法














2013年7月6日 星期六

在Eclipse中讓Tomcat可以每次都更新靜態檔案如*.html..等

EclipseTomcat可以每次都更新靜態檔案如*.html..
不需要重新部屬...
第一種方法是在Tomcat啟動前加入參數
Disabling caching in Tapestry
It is troublesome to reload the application before each test run. To solve the first part of the problem, you can tell
Tapestry to not to cache HTML and .page files. To do that, you need to set a JVM system property
26 Chapter 1 Getting Started with Tapestry
org.apache.tapestry.disable-caching to true. If you were starting the JVM yourself, you would run it like:
java -Dorg.apache.tapestry.disable-caching=true...
However, as the JVM is started by Tomcat, you need to setup a environment variable JAVA_OPTS before running
startup.bat:
Now, you can change say Home.html and the change will take effect immediately.


第二種方法是在Eclipse的JVM中入參數 
for Tomcat plugin
將上方紅色的那一行加進 JVA 的參數中,下圖中的另外三行是設定記憶體大小

for eclipse server plugin

資料來源:EnjoyWebDevWithTapestry


2013年7月5日 星期五

Eclipse Content Assist (程式碼建議) 出不來 alt+/ 失效

Eclispe
->Window->Preference->Java->Content Assist->Advance
確認紅框中的Java Proposals是否勾選,或者是點選下方的 Restore Defaults來恢復預設值。

參考文章:
http://chip.twbbs.org/2010/12/eclipse-content-assist.html
Related Posts Plugin for WordPress, Blogger...