Amazon Ads

2012年2月26日 星期日

如何改Apache的預設webroot


若有要修改htdocs所在目錄,記得要在httpd.conf檔案中,找到預設的路徑做修改,如:
預設為C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs,
而你要改成D:/htdocs

  1. 找到這一行:#DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs",改成DocumentRoot "D:/htdocs"
  2. 找到 <Directory 的Tag,將內容改成<Directory "D:/htdocs">

2010年1月28日 星期四

Faces context not found的錯誤

2010-01-28 13:51:06,926 ERROR [javax.faces.webapp.UIComponentTag:setupResponseWriter] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
是因為在連結時,將頁面名稱的副檔名設錯了,比如在web.xml中設成.faces,但還是錯誤頁面設成.jsp。

2009年8月28日 星期五

查Oracel版本

要查版本,打下列指令之一即可:
  • select * from v$version

  • select * from product_component_version

2009年8月1日 星期六

在JSP document中,<jsp:root>為非必要元素

在JSP v2.0中的JSP 6.3.2關於提到
JSP documents and tag files in XML syntax need not have a jsp:root element as its root element.
所以<jsp:root>在JSP document中非必要元素。

2009年3月23日 星期一

修改Oracle資料表的Constraint和Index的效用

在寫入大量資料時,若資料表設有Constraint或Index,在寫入時會很費時間。因此在寫入前先把Constraint或Index改成無效,寫入後再改回來,可增加速度。

1.將primary key設成無效。
alter table table_name disable constraint PK_name;

2.將primary key回覆效用。
alter table table_name enable constraint PK_name;

3.將Index設成無效。
alter index IDX_NAME unusable;

4.回覆Index的效用。
alter index IDX_NAME rebuild online;