Jcat
          寵辱不驚,閑看庭前花開花落~~
          posts - 173,comments - 67,trackbacks - 0

          1. Tomcat config file, where you can change Tomcat's port number: <CATALINA_HOME>/conf/server.xml ?

          < ?Host?... ? > ?
          ?????? ...
          ???????
          < ?Context?? path? ="/app1" ??docBase? ="app1" ??debug? ="0" ??reloadable? ="true" ? />
          ?
          ???????
          < ?Context?? path? ="/app2" ??docBase? ="app2" ??debug? ="0" ??reloadable? ="true" ? />
          ?
          ???????
          < ?Context?? path? ="root?url" ??docBase? ="root?dir?(or?the?path?of?.war)" ??debug? ="0" ??reloadable? ="note1" ? >
          ?
          < / Host >
          ??


          note1: whether auto-reload the web application, when .class file is changed
          ????????????? 1) during developing, set reloadable=true
          ????????????? 2) after deployment, set reloadable=false


          2. Some libs

          /server/lib?

          just for Tomcat

          /shared/lib

          for all web apps

          /common/lib

          both Tomcat and all web apps

          /webapps/jcat/WEB-INF/lib

          just present web app

          ?

          3. Immobile Directory Structure (the names are also immobile, include uppercase/lowercase)?
          ???/jcat
          ???/jcat/WEB-INF
          ???/jcat/WEB-INF/web.xml
          ???/jcat/WEB-INF/classes
          ???/jcat/WEB-INF/lib

          ?????

          Note: WEB-INF/classes is loaded by tomcat before WEB-INF/lib , so classes has priority than lib

          ?
          4.?Scopes
          ??????Application:在整個web應用程序內有效。對應于servelet中的ServletContext對象,Action中的獲取:getServlet().getServletContext()
          ??????Session:在一個用戶與服務器建立連接的整個過程中有效。Action中的獲取:httpServletRequest.getSession()
          ??????Request:在一個請求周期內有效。就是從你點擊頁面上的一個按鈕開始到服務器返回響應頁面為止(包括響應頁面)。
          ??????Page:僅在一個jsp頁面內有效。


          *1*
          ?
          Request in Struts: PageFrom (request.setAttribute by using Form)-->Action(request.getAttribute&setAttribute)-->PageTo (request.getAttribute by using EL)?

          *2*?:
          Parameter vs Attribute in request
          ???Parameter URL 帶過來的參數,只能是個 String ,如
          www.verican.com/test?para1=1&para2=ttt
          ???在 Action 中的調用:
          request.getParameter("para1");?
          ???在響應頁面中的調用: ${param.para1} param EL 的隱藏對象)?


          ???Attribute
          一般是 Form 帶過來的屬性,可以是任何對象
          ???
          Action 中的調用:一般已經存在于 Form 對象中;
          ???在響應頁面中的調用: ${attributeName.xxx}?
          EL 會自動調用 getXxx 方法,所以該 attribute 必須實現 getXxx 方法)

          5. Web server跟蹤客戶狀態的四種方法(HTTP是無狀態的協議)
          ??? 1)建立含有跟蹤數據的隱藏表格字段
          ??? 2)重寫包含額外參數的URL
          ??? 3)使用持續的Cookie
          ??? 4)使用Servlet API中的Session機制

          6. JavaBean的標準
          ???1) should be a public class
          ???2) should have a non-argument constructor
          ???3) fields should be privated, and using get & set to access them
          ???4) also can have some other functions as a common class

          posted on 2006-06-23 09:11 Jcat 閱讀(401) 評論(0)  編輯  收藏 所屬分類: Java
          主站蜘蛛池模板: 伊宁市| 芒康县| 鹤壁市| 肥西县| 新密市| 保定市| 麻江县| 龙岩市| 龙南县| 皋兰县| 且末县| 革吉县| 和政县| 江孜县| 峨眉山市| 雷州市| 内乡县| 淮阳县| 合川市| 桂阳县| 阳江市| 广宁县| 凤台县| 抚松县| 葵青区| 东乡族自治县| 临桂县| 梁山县| 云林县| 邵武市| 泸水县| 盐山县| 盈江县| 卢龙县| 乐亭县| 河北省| 浦江县| 石城县| 新乡市| 横峰县| 方正县|