隨筆-109  評論-187  文章-25  trackbacks-0
           
          ?

          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的源代碼,其實實現就是java relection非常的簡單

          posted @ 2006-04-13 08:53 小小程序程序員混口飯吃 閱讀(711) | 評論 (0)編輯 收藏
          ?

          ??????? Exit TOAD Launch TOAD On the Login screen their should be an option to
          > use 'SQL Net compatible Net8' Please check this

          ?

          問題就解決了呵呵,可能是要求兼容以前的ORACLE的用法,現在去掉了就好了,沒有問題了

          posted @ 2006-04-13 08:53 小小程序程序員混口飯吃 閱讀(2026) | 評論 (1)編輯 收藏
          ?

          HttpSessionBindingListener 接口的對象 - -

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

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

          <delete dir= 刪除一個目錄

          <mkdir dir 家里目錄

          <copt todir 就是拷貝到哪個目錄

          ? <fileset dir 就是從哪里拷貝

          ?

          <target depends> 就是依賴別的任務

          ?

          ?

          ??? <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 是類的路徑,指定當前編譯的類路徑

          ?

          <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="xdoclet.jars" />

          ?

          定義任務標簽,

          posted @ 2006-04-13 08:52 小小程序程序員混口飯吃 閱讀(198) | 評論 (0)編輯 收藏
          ?

          頭標: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 里面,當然對于 WEB 來說,在一個 WEGLOIGC server 上調試一個程序,相當于一個 JVM STATIC 對于該類的任何實例都是可見的。

          要是在應用程序里面,如果調試 2 個應用程序,那么這 2 個應用程序不會在一個 JVM 里面,那么 STATIC 各自維護各自的沒有任何聯系,除非是一個應用程序有多個窗口你才能看到 STATIC 變量的效果

          ?

          ?

          寫這段文字的意思就是說: STATIC JVM 的關系,有時間一定看看 JAVA 虛擬機這本書

          posted @ 2006-04-13 08:49 小小程序程序員混口飯吃 閱讀(285) | 評論 (0)編輯 收藏
               摘要: 1 :單表添加過程 添加單表的過程非常簡單直接寫一個對象就可以,最關鍵的是處理主鍵,主鍵的 SEQUERCE 的生成,(不過還不太懂如何去配置 SEQUENCE 的生成) ...  閱讀全文
          posted @ 2006-04-13 08:49 小小程序程序員混口飯吃 閱讀(400) | 評論 (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 小小程序程序員混口飯吃 閱讀(302) | 評論 (0)編輯 收藏
          ?

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

          asnchronized??在一個線程調用它之前必須先給它加

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

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

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

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

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

          posted @ 2006-04-13 08:48 小小程序程序員混口飯吃 閱讀(209) | 評論 (0)編輯 收藏
          ?

          (1:)sitemesh.xml 文件好像默認只能放在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

          對應不同的文件名,或者匹配不同的路徑何文件后綴都可以


          (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對一些設計來說簡直是在災難,ajax感覺無法與其整合在一起用

          posted @ 2006-04-13 08:45 小小程序程序員混口飯吃 閱讀(2436) | 評論 (0)編輯 收藏
          僅列出標題
          共11頁: First 上一頁 3 4 5 6 7 8 9 10 11 下一頁 
          主站蜘蛛池模板: 漳浦县| 山阴县| 满洲里市| 黎川县| 探索| 临城县| 红桥区| 贵定县| 德江县| 安顺市| 晋江市| 崇礼县| 左贡县| 临澧县| 崇仁县| 庄浪县| 梧州市| 松原市| 连州市| 柳林县| 临高县| 元氏县| 临武县| 榆中县| 怀柔区| 舞钢市| 丘北县| 峨眉山市| 吕梁市| 南靖县| 都昌县| 金山区| 屏南县| 巴彦县| 沛县| 岫岩| 和平县| 类乌齐县| 石首市| 青岛市| 卢龙县|