?
1:
在
struts1.2.7
中使用
mappingdispatchAction
?
parameter
中直接來定義的就是
METHOD
的
name
,
一個
/xxxx.do
用一個
<action mapping…/>
來定義比如
?
?
<action path=”/add”
parameter=”add”
type=”xxxextMappingdispatchAction”
>
<forward name=”success” path=”/addsuccess.jsp”/>
</acton>
?
<action path=”/edit”
parameter=”edit”
type=”xxxextMappingdispatchAction”
>
<forward name=”success” path=”/editsuccess.jsp”/>
</action>
看一下STRUTS的源代碼,其實實現(xiàn)就是java relection非常的簡單
posted @
2006-04-13 08:53 小小程序程序員混口飯吃 閱讀(710) |
評論 (0) |
編輯 收藏
?
??????? Exit TOAD Launch TOAD On the Login screen their should be an option to
> use 'SQL Net compatible Net8' Please check this
?
問題就解決了呵呵,可能是要求兼容以前的ORACLE的用法,現(xiàn)在去掉了就好了,沒有問題了
posted @
2006-04-13 08:53 小小程序程序員混口飯吃 閱讀(2023) |
評論 (1) |
編輯 收藏
?
HttpSessionBindingListener
接口的對象
- -
??????????????????????????????????????
Session
代表客戶的會話過程,客戶登錄時,往
Session
中傳入一個對象,即可跟蹤客戶的會話。在
Servlet
中,傳入
Session
的對象如果有一個實現(xiàn)
HttpSessionBindingListener
接口的對象(方便起見,此對象稱為監(jiān)聽器),則在傳入的時候(即調(diào)用
HttpSession
對象的
setAttribute
方法的時候)和移去的時候(即調(diào)用
HttpSession
對象的
removeAttribute
方法的時候或
Session Time out
的時候)
Session
對象會自動調(diào)用監(jiān)聽器的
valueBound
和
valueUnbound
方法(這是
HttpSessionBindingListener
接口中的方法)。
posted @
2006-04-13 08:52 小小程序程序員混口飯吃 閱讀(3598) |
評論 (2) |
編輯 收藏
?
??? <target name="deploy.selfcare" depends="compile">
???
??? <delete dir="${selfcare.web.dir}/WEB-INF/classes" failonerror="false" />
???
??? <delete dir="${selfcare.web.dir}/WEB-INF/lib" failonerror="false" />
???
??? <mkdir dir="${selfcare.web.dir}/WEB-INF/lib" />
???
??? <mkdir dir="${selfcare.web.dir}/WEB-INF/classes" />
?????? <copy todir="${selfcare.web.dir}/WEB-INF/classes">
??????
??? <fileset dir="${classes.main}" />
???
??? </copy>
?????? <copy todir="${selfcare.web.dir}/WEB-INF/lib" flatten="true">
??????
??? <fileset dir="${libs}" excludes="**/xdoclet*.jar"/>
???
??? </copy>
?????? <copy todir="${selfcare.web.dir}/WEB-INF/classes">
??????
??? <fileset dir="${src.main}" includes="**/*.xml, **/*.properties" />
???
??? </copy>
??? </target>
?
<property name="src.main" value="${basedir}/src" />
Property
就是定義常量
<target>
就是一個任務(wù)
<delete dir=
刪除一個目錄
<mkdir dir
家里目錄
<copt todir
就是拷貝到哪個目錄
? <fileset dir
就是從哪里拷貝
?
<target depends>
就是依賴別的任務(wù)
?
?
??? <target name="compile" depends="init">
??????? <mkdir dir="${classes.main}" />
??????? <javac srcdir="${src.main}" destdir="${classes.main}" debug="${debug}">
???????
??? <classpath refid="classpath.lib" />
??????? </javac>
???
??? <native2ascii src="${src.main}" dest="${classes.main}" includes="**/*.properties" />
???
<antcall target="enhance"/>
??? </target>
??? <target name="init" depends="clean">
???
??
??? <mkdir dir="${junit.report}"/>
???
??
??? <mkdir dir="${build.dir}"/>
</target>
?
??? <target name="enhance" >
?????? <copy todir="${classes.main}" >
??????
??? <fileset dir="${src.main}" >
??????????
??? <include name="**/*.jdo"/>
??????
??? </fileset>
???
??? </copy>
?????? <ant antfile="build-jdo.xml" target="enhance"/>
</target>
?
??? <path id="classpath.main">
???
??? <pathelement location="${classes.main}" />
??? </path>
Path
是類的路徑,指定當(dāng)前編譯的類路徑
?
<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="xdoclet.jars" />
?
定義任務(wù)標(biāo)簽,
posted @
2006-04-13 08:52 小小程序程序員混口飯吃 閱讀(197) |
評論 (0) |
編輯 收藏
頭標(biāo):JAVA-CODE STYLE-CODE TEMPLATE-->NEW JAVA FILES-->
/**
?* Copyright (c) 2001-2005 by ** Corporation
?*?? All rights reserved.
**/
作者版本:java ->code stype-->code templates-->Comment -->types
/**
?* @author Jianping Wang (aaa@aaa.com)
?* @version $$Id: ${file_name},v 1.1 ${date} ${time}Jianping Wang Exp $$
?* ${tags}
?*/
posted @
2006-04-13 08:51 小小程序程序員混口飯吃 閱讀(679) |
評論 (0) |
編輯 收藏
?
Static
變量對于改類所有的對象都是可見的,如果實在一個
JVM
里面,當(dāng)然對于
WEB
來說,在一個
WEGLOIGC
的
server
上調(diào)試一個程序,相當(dāng)于一個
JVM
,
STATIC
對于該類的任何實例都是可見的。
要是在應(yīng)用程序里面,如果調(diào)試
2
個應(yīng)用程序,那么這
2
個應(yīng)用程序不會在一個
JVM
里面,那么
STATIC
各自維護各自的沒有任何聯(lián)系,除非是一個應(yīng)用程序有多個窗口你才能看到
STATIC
變量的效果
?
?
寫這段文字的意思就是說:
STATIC
與
JVM
的關(guān)系,有時間一定看看
JAVA
虛擬機這本書
posted @
2006-04-13 08:49 小小程序程序員混口飯吃 閱讀(285) |
評論 (0) |
編輯 收藏
摘要: 1
:單表添加過程
添加單表的過程非常簡單直接寫一個對象就可以,最關(guān)鍵的是處理主鍵,主鍵的
SEQUERCE
的生成,(不過還不太懂如何去配置
SEQUENCE
的生成)
...
閱讀全文
posted @
2006-04-13 08:49 小小程序程序員混口飯吃 閱讀(399) |
評論 (0) |
編輯 收藏
?
java.io.InputStream is = Test.Class.GetResourceAsStream("test.template");
is? --->String? all = "sdfsdfsfd<>"; //like....
//replice <> as?? user:wjp
String replace = "user:wjp";
RE r = new RE("<>");
r.subst(all,replace);
OK,you can get the replaced String ...
posted @
2006-04-13 08:48 小小程序程序員混口飯吃 閱讀(301) |
評論 (0) |
編輯 收藏
?
??????????????????????????????????????
asnchronized??在一個線程調(diào)用它之前必須先給它加
類修飾符
Public????????????????? 可以從其他類中訪問
obstract??????????????? 本類不能被實例化
final?????????????????? 不能再聲明子類
構(gòu)造器修飾符
Public????????????????? 可以從所有的類中訪問
Protected?????????????? 只能從自己的類和它的子類中訪問
Private???????????????? 只能在本類中訪問
域修飾符
Public????????????????? 可以從所有的類中訪問
Protected?????????????? 只能從本類和它的子類中訪問
Private???????????????? 只能從本類中訪問它
Static????????????????? 對該類的所有實例只能有一個域值存在
transient?????????????? 不是一個對象持久狀態(tài)的一部份
Volatile??????????????? 可以被異步的線程所修改
final?????????????????? 必須對它賦予初值并且不能修改它
局部變量修飾符
final?????????????????? 必須對它賦予初值并且不能修改它
方法修飾符
Public????????????????? 可以從所有的類中訪問它
Protected?????????????? 只能從本類及其子類中訪問它
Private???????????????? 只能從本類中訪問它
abstract??????????????? 沒有方法體,屬于一個抽象類
final?????????????????? 子類不能覆蓋它
static????????????????? 被綁定于類本身而不是類的實例
native????????????????? 該方法由其他編程語言實現(xiàn)
asnchronized??????????? 在一個線程調(diào)用它之前必須先給它加
posted @
2006-04-13 08:48 小小程序程序員混口飯吃 閱讀(208) |
評論 (0) |
編輯 收藏
?
(1:)sitemesh.xml 文件好像默認(rèn)只能放在web-inf下面,
不過我感覺肯定sitemesh提供其他的loader方式,在類包里面提供,
decorators.xml 文件的位置就比較隨便了,在sitemesh.xml?中配置一下她的路徑就好
如:
? <property name="decorators-file" value="/WEB-INF/decorators.xml"/>
(2:)
decorators.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<decorators defaultdir="/jsp/decorators">
??? <decorator name="main" page="main.jsp">
??????? <pattern>*.jsp</pattern>
??? </decorator>
</decorators>
這里面可以定義多個decorator
對應(yīng)不同的文件名,或者匹配不同的路徑何文件后綴都可以
(3:)
main.jsp
<%@ include file="/common/header.jsp">
<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>
<%@ include file="/common/meta.jsp">
<html>
? <head>
??? <title><decorator:title default="decorator" />default title</title>
??? <decorator:head />
? </head>
? <body>
<%@ include file="/common/header.jsp">
??? <hr>
??? <decorator:body />
<%@ include file="/common/footer.jsp">
??? <hr>this is template footer
? </body>
</html>
不過SITMESH對一些設(shè)計來說簡直是在災(zāi)難,ajax感覺無法與其整合在一起用
posted @
2006-04-13 08:45 小小程序程序員混口飯吃 閱讀(2435) |
評論 (0) |
編輯 收藏