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"])}

posted @ 2006-06-15 21:21 clingingboy 阅读(255) | 评论 (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 阅读(226) | 评论 (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 阅读(376) | 评论 (0)编辑 收藏