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 閱讀(267) | 評論 (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 閱讀(238) | 評論 (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 閱讀(388) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: SHOW| 顺昌县| 曲松县| 乌拉特中旗| 徐水县| 惠安县| 宜君县| 杭州市| 高陵县| 抚州市| 独山县| 乌海市| 东至县| 阳山县| 怀柔区| 宜宾县| 东乡族自治县| 同心县| 万宁市| 喀什市| 景谷| 和田市| 本溪| 临西县| 轮台县| 施甸县| 贵州省| 虞城县| 丹东市| 大足县| 昌图县| 榕江县| 赣榆县| 临泽县| 洪湖市| 武强县| 石渠县| 汉沽区| 定襄县| 固镇县| 当雄县|