隨筆-109  評(píng)論-187  文章-25  trackbacks-0
           
          ?

          1: struts1.2.7 中使用 mappingdispatchAction

          ?

          parameter 中直接來定義的就是 METHOD name

          一個(gè) /xxxx.do 用一個(gè) <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的源代碼,其實(shí)實(shí)現(xiàn)就是java relection非常的簡(jiǎn)單

          posted @ 2006-04-13 08:53 小小程序程序員混口飯吃 閱讀(714) | 評(píng)論 (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 小小程序程序員混口飯吃 閱讀(2037) | 評(píng)論 (1)編輯 收藏
          ?

          HttpSessionBindingListener 接口的對(duì)象 - -

          ??????????????????????????????????????

          Session 代表客戶的會(huì)話過程,客戶登錄時(shí),往 Session 中傳入一個(gè)對(duì)象,即可跟蹤客戶的會(huì)話。在 Servlet 中,傳入 Session 的對(duì)象如果有一個(gè)實(shí)現(xiàn) HttpSessionBindingListener 接口的對(duì)象(方便起見,此對(duì)象稱為監(jiān)聽器),則在傳入的時(shí)候(即調(diào)用 HttpSession 對(duì)象的 setAttribute 方法的時(shí)候)和移去的時(shí)候(即調(diào)用 HttpSession 對(duì)象的 removeAttribute 方法的時(shí)候或 Session Time out 的時(shí)候) Session 對(duì)象會(huì)自動(dòng)調(diào)用監(jiān)聽器的 valueBound valueUnbound 方法(這是 HttpSessionBindingListener 接口中的方法)。
          posted @ 2006-04-13 08:52 小小程序程序員混口飯吃 閱讀(3610) | 評(píng)論 (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> 就是一個(gè)任務(wù)

          <delete dir= 刪除一個(gè)目錄

          <mkdir dir 家里目錄

          <copt todir 就是拷貝到哪個(gè)目錄

          ? <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 小小程序程序員混口飯吃 閱讀(200) | 評(píng)論 (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 小小程序程序員混口飯吃 閱讀(682) | 評(píng)論 (0)編輯 收藏
          ?

          Static 變量對(duì)于改類所有的對(duì)象都是可見的,如果實(shí)在一個(gè) JVM 里面,當(dāng)然對(duì)于 WEB 來說,在一個(gè) WEGLOIGC server 上調(diào)試一個(gè)程序,相當(dāng)于一個(gè) JVM STATIC 對(duì)于該類的任何實(shí)例都是可見的。

          要是在應(yīng)用程序里面,如果調(diào)試 2 個(gè)應(yīng)用程序,那么這 2 個(gè)應(yīng)用程序不會(huì)在一個(gè) JVM 里面,那么 STATIC 各自維護(hù)各自的沒有任何聯(lián)系,除非是一個(gè)應(yīng)用程序有多個(gè)窗口你才能看到 STATIC 變量的效果

          ?

          ?

          寫這段文字的意思就是說: STATIC JVM 的關(guān)系,有時(shí)間一定看看 JAVA 虛擬機(jī)這本書

          posted @ 2006-04-13 08:49 小小程序程序員混口飯吃 閱讀(290) | 評(píng)論 (0)編輯 收藏
               摘要: 1 :?jiǎn)伪硖砑舆^程 添加單表的過程非常簡(jiǎn)單直接寫一個(gè)對(duì)象就可以,最關(guān)鍵的是處理主鍵,主鍵的 SEQUERCE 的生成,(不過還不太懂如何去配置 SEQUENCE 的生成) ...  閱讀全文
          posted @ 2006-04-13 08:49 小小程序程序員混口飯吃 閱讀(404) | 評(píng)論 (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 小小程序程序員混口飯吃 閱讀(305) | 評(píng)論 (0)編輯 收藏
          ?

          ??????????????????????????????????????

          asnchronized??在一個(gè)線程調(diào)用它之前必須先給它加

          類修飾符
          Public????????????????? 可以從其他類中訪問
          obstract??????????????? 本類不能被實(shí)例化
          final?????????????????? 不能再聲明子類

          構(gòu)造器修飾符
          Public????????????????? 可以從所有的類中訪問
          Protected?????????????? 只能從自己的類和它的子類中訪問
          Private???????????????? 只能在本類中訪問

          域修飾符
          Public????????????????? 可以從所有的類中訪問
          Protected?????????????? 只能從本類和它的子類中訪問
          Private???????????????? 只能從本類中訪問它
          Static????????????????? 對(duì)該類的所有實(shí)例只能有一個(gè)域值存在
          transient?????????????? 不是一個(gè)對(duì)象持久狀態(tài)的一部份
          Volatile??????????????? 可以被異步的線程所修改
          final?????????????????? 必須對(duì)它賦予初值并且不能修改它

          局部變量修飾符
          final?????????????????? 必須對(duì)它賦予初值并且不能修改它

          方法修飾符
          Public????????????????? 可以從所有的類中訪問它
          Protected?????????????? 只能從本類及其子類中訪問它
          Private???????????????? 只能從本類中訪問它
          abstract??????????????? 沒有方法體,屬于一個(gè)抽象類
          final?????????????????? 子類不能覆蓋它
          static????????????????? 被綁定于類本身而不是類的實(shí)例
          native????????????????? 該方法由其他編程語言實(shí)現(xiàn)
          asnchronized??????????? 在一個(gè)線程調(diào)用它之前必須先給它加

          posted @ 2006-04-13 08:48 小小程序程序員混口飯吃 閱讀(212) | 評(píng)論 (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>


          這里面可以定義多個(gè)decorator

          對(duì)應(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對(duì)一些設(shè)計(jì)來說簡(jiǎn)直是在災(zāi)難,ajax感覺無法與其整合在一起用

          posted @ 2006-04-13 08:45 小小程序程序員混口飯吃 閱讀(2440) | 評(píng)論 (0)編輯 收藏
          僅列出標(biāo)題
          共11頁(yè): First 上一頁(yè) 3 4 5 6 7 8 9 10 11 下一頁(yè) 
          主站蜘蛛池模板: 靖江市| 陵水| 如东县| 南充市| 长沙市| 三河市| 厦门市| 平邑县| 合山市| 平远县| 金沙县| 图木舒克市| 仙居县| 旌德县| 白山市| 苏尼特左旗| 栖霞市| 锡林浩特市| 麻栗坡县| 重庆市| 肇州县| 阜南县| 祁连县| 皋兰县| 潼关县| 乳山市| 迁西县| 华容县| 高平市| 鄄城县| 眉山市| 临猗县| 陆河县| 日喀则市| 陈巴尔虎旗| 扶绥县| 扎囊县| 琼中| 陵水| 长白| 太白县|