posts - 3, comments - 0, trackbacks - 0, articles - 0

          2006年6月15日

          ?看其本身自帶的例子

          1,
          EL ExpressionResult
          ${1}1
          ${1 + 2}3
          ${1.2 + 2.3}3.5
          ${1.2E4 + 1.4}12001.4
          ${-4 - 2}-6
          ${21 * 2}42
          ${3/4}0.75
          ${3 div 4}0.75
          ${3/0}Infinity
          ${10%4}2
          ${10 mod 4}2
          ${(1==2) ? 3 : 4}4

          2,
          EL ExpressionResult
          ${1 < 2}true
          ${1 lt 2}true
          ${1 > (4/2)}false
          ${1 > (4/2)}false
          ${4.0 >= 3}true
          ${4.0 ge 3}true
          ${4 <= 3}false
          ${4 le 3}false
          ${100.0 == 100}true
          ${100.0 eq 100}true
          ${(10*10) != 100}false
          ${(10*10) ne 100}false

          3,
          EL ExpressionResult
          ${'a' < 'b'}true
          ${'hip' > 'hit'}false
          ${'4' > 3}true

          4,
          EL ExpressionResult
          ${param.foo}bar?
          ${param["foo"]}bar?
          ${header["host"]}127.0.0.1:8080
          ${header["accept"]}*/*
          ${header["user-agent"]}Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 2.0.50727)

          5,
          EL ExpressionResult
          ${param["foo"]}0.2 ?
          ${my:reverse(param["foo"])}2.0?
          ${my:reverse(my:reverse(param["foo"]))}0.2 ?
          ${my:countVowels(param["foo"])}0?

          posted @ 2006-06-15 21:21 clingingboy 閱讀(268) | 評論 (0)編輯 收藏

          發些比較基礎的東西

          1,聲明 用于插入方法,聲明變量,常量
          2,表達式 用于輸出
          3,scriptlet? 包含完整java代碼段

          ?1<!--聲明??-->
          ?2????????<%!
          ?3????????String?a="clingingboy";
          ?4????????Date?myDate=new?Date();
          ?5????????private?static?String?Add(String?a,String?b)
          ?6????????{
          ?7????????String?c=a+b;
          ?8????????return?c;
          ?9????????}
          10????????
          %>
          11????????<!--表達式??-->
          12????????<%=a+"你好"?%>
          13????????<%=this.Add(",現在","時間是")%><br>
          14????????<%=myDate.getHours()%>
          15????????<%=myDate.getMinutes()?%>
          16????????<br>
          17????????<br>
          18????????<!--scriptlet腳本元素??-->
          19????????<%
          20????????for(int?i=1;i<=10;i++)
          21????????{
          22????????out.print("<font?size="+i+">hello,world</font><br>");
          23????????}
          24????????
          %>

          posted @ 2006-06-15 21:01 clingingboy 閱讀(240) | 評論 (0)編輯 收藏

          ???? 本人從.net平臺轉向java平臺了。學習的話,我還是一點一滴的記錄下來好。相信在這里會學到很多東西

          ??

          ??

          /bin

          存放windowsLinux平臺上啟動和關閉Tomcat的腳本文件

          /conf

          存放Tomcat服務器的各種配置文件,其中最重要的是server.xml

          /server

          包含三個子目錄:classeslibwebapps

          /server/lib

          存放Tomcat服務器所需的各種JAR文件

          /server/webapps

          存放Tomcat自帶的兩個WEB應用:admin應用和 manager應用

          /common/lib

          存放Tomcat服務器以及所有web應用都可以訪問的jar文件

          /shared/lib

          存放所有web應用都可以訪問的jar文件(但是不能被Tomcat服務器訪問)

          /logs

          存放Tomcat的日志文件

          /webapps

          當發布Web應用時,默認情況下把Web應用文件放于此目錄

          /work

          Tomcat把又JSP生成的Servlet放于此目錄下


          假設在<CATALINA_HOME>/webapps下有helloappweb應用,如下

          /helloapp

          Web應用的根目錄,所有的jsp文件和html文件都在此目錄下

          /helloapp/WEB_INF

          存放web發布時的描述文件web.xml

          /helloapp/WEB_INF/class

          存放各種class文件,Servlet文件也存放于此目錄下。

          /helloapp/WEB_INF/lib

          存放各鐘Web應用所需要的jar文件。比如可以存放JDBC驅動程序的JAR文件

          posted @ 2006-06-15 10:13 clingingboy 閱讀(390) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 阳泉市| 蓝山县| 云和县| 浦城县| 依安县| 凌云县| 元谋县| 阿合奇县| 西丰县| 大方县| 汝南县| 徐州市| 定兴县| 西盟| 丰顺县| 永丰县| 湟源县| 东兴市| 闵行区| 叶城县| 福州市| 青川县| 云龙县| 阳城县| 秭归县| 比如县| 大埔区| 乌拉特后旗| 隆安县| 六盘水市| 内丘县| 广宗县| 江山市| 张家港市| 咸丰县| 呼玛县| 盱眙县| 正安县| 岳阳市| 邵阳县| 泗洪县|