Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
771 blopes 1
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Source Code</title></head><body><pre>&lt;%--
2
 Licensed to the Apache Software Foundation (ASF) under one or more
3
  contributor license agreements.  See the NOTICE file distributed with
4
  this work for additional information regarding copyright ownership.
5
  The ASF licenses this file to You under the Apache License, Version 2.0
6
  (the "License"); you may not use this file except in compliance with
7
  the License.  You may obtain a copy of the License at
8
 
9
      http://www.apache.org/licenses/LICENSE-2.0
10
 
11
  Unless required by applicable law or agreed to in writing, software
12
  distributed under the License is distributed on an "AS IS" BASIS,
13
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
  See the License for the specific language governing permissions and
15
  limitations under the License.
16
--%>
17
&lt;%@page contentType="text/html; charset=UTF-8" %>
18
&lt;%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
19
&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>
20
 
21
&lt;html>
22
  &lt;head>
23
    &lt;title>JSP 2.0 Expression Language - Functions&lt;/title>
24
  &lt;/head>
25
  &lt;body>
26
    &lt;h1>JSP 2.0 Expression Language - Functions&lt;/h1>
27
    &lt;hr>
28
    An upgrade from the JSTL expression language, the JSP 2.0 EL also
29
    allows for simple function invocation.  Functions are defined
30
    by tag libraries and are implemented by a Java programmer as
31
    static methods.
32
 
33
    &lt;blockquote>
34
      &lt;u>&lt;b>Change Parameter&lt;/b>&lt;/u>
35
      &lt;form action="functions.jsp" method="GET">
36
          foo = &lt;input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">
37
          &lt;input type="submit">
38
      &lt;/form>
39
      &lt;br>
40
      &lt;code>
41
        &lt;table border="1">
42
          &lt;thead>
43
            &lt;td>&lt;b>EL Expression&lt;/b>&lt;/td>
44
            &lt;td>&lt;b>Result&lt;/b>&lt;/td>
45
          &lt;/thead>
46
          &lt;tr>
47
            &lt;td>\${param["foo"]}&lt;/td>
48
            &lt;td>${fn:escapeXml(param["foo"])}&amp;nbsp;&lt;/td>
49
          &lt;/tr>
50
          &lt;tr>
51
            &lt;td>\${my:reverse(param["foo"])}&lt;/td>
52
            &lt;td>${my:reverse(fn:escapeXml(param["foo"]))}&amp;nbsp;&lt;/td>
53
          &lt;/tr>
54
          &lt;tr>
55
            &lt;td>\${my:reverse(my:reverse(param["foo"]))}&lt;/td>
56
            &lt;td>${my:reverse(my:reverse(fn:escapeXml(param["foo"])))}&amp;nbsp;&lt;/td>
57
          &lt;/tr>
58
          &lt;tr>
59
            &lt;td>\${my:countVowels(param["foo"])}&lt;/td>
60
            &lt;td>${my:countVowels(fn:escapeXml(param["foo"]))}&amp;nbsp;&lt;/td>
61
          &lt;/tr>
62
        &lt;/table>
63
      &lt;/code>
64
    &lt;/blockquote>
65
  &lt;/body>
66
&lt;/html>
67
 
68
</pre></body></html>