View | Details | Raw Unified | Return to bug 32953
Collapse All | Expand All

(-)jsr152/examples/jsp2/el/functions.jsp (-5 / +6 lines)
Lines 13-18 Link Here
13
  See the License for the specific language governing permissions and
13
  See the License for the specific language governing permissions and
14
  limitations under the License.
14
  limitations under the License.
15
-->
15
-->
16
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
16
<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
17
<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
17
18
18
<html>
19
<html>
Lines 30-36 Link Here
30
    <blockquote>
31
    <blockquote>
31
      <u><b>Change Parameter</b></u>
32
      <u><b>Change Parameter</b></u>
32
      <form action="functions.jsp" method="GET">
33
      <form action="functions.jsp" method="GET">
33
	  foo = <input type="text" name="foo" value="${param['foo']}">
34
	  foo = <input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">
34
          <input type="submit">
35
          <input type="submit">
35
      </form>
36
      </form>
36
      <br>
37
      <br>
Lines 42-60 Link Here
42
	  </thead>
43
	  </thead>
43
	  <tr>
44
	  <tr>
44
	    <td>\${param["foo"]}</td>
45
	    <td>\${param["foo"]}</td>
45
	    <td>${param["foo"]}&nbsp;</td>
46
	    <td>${fn:escapeXml(param["foo"])}&nbsp;</td>
46
	  </tr>
47
	  </tr>
47
	  <tr>
48
	  <tr>
48
	    <td>\${my:reverse(param["foo"])}</td>
49
	    <td>\${my:reverse(param["foo"])}</td>
49
	    <td>${my:reverse(param["foo"])}&nbsp;</td>
50
	    <td>${my:reverse(fn:escapeXml(param["foo"]))}&nbsp;</td>
50
	  </tr>
51
	  </tr>
51
	  <tr>
52
	  <tr>
52
	    <td>\${my:reverse(my:reverse(param["foo"]))}</td>
53
	    <td>\${my:reverse(my:reverse(param["foo"]))}</td>
53
	    <td>${my:reverse(my:reverse(param["foo"]))}&nbsp;</td>
54
	    <td>${my:reverse(my:reverse(fn:escapeXml(param["foo"])))}&nbsp;</td>
54
	  </tr>
55
	  </tr>
55
	  <tr>
56
	  <tr>
56
	    <td>\${my:countVowels(param["foo"])}</td>
57
	    <td>\${my:countVowels(param["foo"])}</td>
57
	    <td>${my:countVowels(param["foo"])}&nbsp;</td>
58
	    <td>${my:countVowels(fn:escapeXml(param["foo"]))}&nbsp;</td>
58
	  </tr>
59
	  </tr>
59
	</table>
60
	</table>
60
      </code>
61
      </code>
(-)jsr152/examples/jsp2/el/implicit-objects.jsp (-3 / +5 lines)
Lines 13-18 Link Here
13
  See the License for the specific language governing permissions and
13
  See the License for the specific language governing permissions and
14
  limitations under the License.
14
  limitations under the License.
15
-->
15
-->
16
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
17
16
<html>
18
<html>
17
  <head>
19
  <head>
18
    <title>JSP 2.0 Expression Language - Implicit Objects</title>
20
    <title>JSP 2.0 Expression Language - Implicit Objects</title>
Lines 49-55 Link Here
49
    <blockquote>
51
    <blockquote>
50
      <u><b>Change Parameter</b></u>
52
      <u><b>Change Parameter</b></u>
51
      <form action="implicit-objects.jsp" method="GET">
53
      <form action="implicit-objects.jsp" method="GET">
52
	  foo = <input type="text" name="foo" value="${param["foo"]}">
54
	  foo = <input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">
53
          <input type="submit">
55
          <input type="submit">
54
      </form>
56
      </form>
55
      <br>
57
      <br>
Lines 61-71 Link Here
61
	  </thead>
63
	  </thead>
62
	  <tr>
64
	  <tr>
63
	    <td>\${param.foo}</td>
65
	    <td>\${param.foo}</td>
64
	    <td>${param.foo}&nbsp;</td>
66
	    <td>${fn:escapeXml(param["foo"])}&nbsp;</td>
65
	  </tr>
67
	  </tr>
66
	  <tr>
68
	  <tr>
67
	    <td>\${param["foo"]}</td>
69
	    <td>\${param["foo"]}</td>
68
	    <td>${param["foo"]}&nbsp;</td>
70
	    <td>${fn:escapeXml(param["foo"])}&nbsp;</td>
69
	  </tr>
71
	  </tr>
70
	  <tr>
72
	  <tr>
71
	    <td>\${header["host"]}</td>
73
	    <td>\${header["host"]}</td>
(-)jsr152/examples/jsp2/jspx/textRotate.jspx (-1 / +2 lines)
Lines 6-16 Link Here
6
<svg xmlns="http://www.w3.org/2000/svg"
6
<svg xmlns="http://www.w3.org/2000/svg"
7
     width="450" height="500" viewBox="0 0 450 500"
7
     width="450" height="500" viewBox="0 0 450 500"
8
     xmlns:c="http://java.sun.com/jsp/jstl/core"
8
     xmlns:c="http://java.sun.com/jsp/jstl/core"
9
     xmlns:fn="http://java.sun.com/jsp/jstl/functions"
9
     xmlns:jsp="http://java.sun.com/JSP/Page">
10
     xmlns:jsp="http://java.sun.com/JSP/Page">
10
  <jsp:directive.page contentType="image/svg+xml" />
11
  <jsp:directive.page contentType="image/svg+xml" />
11
  <title>JSP 2.0 JSPX</title>
12
  <title>JSP 2.0 JSPX</title>
12
  <!-- select name parameter, or default to JSPX -->
13
  <!-- select name parameter, or default to JSPX -->
13
  <c:set var="name" value='${empty param["name"] ? "JSPX" : param["name"]}'/>
14
  <c:set var="name" value='${empty fn:escapeXml(param["name"]) ? "JSPX" : fn:escapeXml(param["name"])}'/>
14
  <g id="testContent">
15
  <g id="testContent">
15
    <text class="title" x="50%" y="10%" font-size="15" text-anchor="middle" >
16
    <text class="title" x="50%" y="10%" font-size="15" text-anchor="middle" >
16
            JSP 2.0 XML Syntax (.jspx) Demo</text>
17
            JSP 2.0 XML Syntax (.jspx) Demo</text>
(-)jsr152/examples/snp/snoop.jsp (-2 / +2 lines)
Lines 18-24 Link Here
18
<body bgcolor="white">
18
<body bgcolor="white">
19
<h1> Request Information </h1>
19
<h1> Request Information </h1>
20
<font size="4">
20
<font size="4">
21
JSP Request Method: <%= request.getMethod() %>
21
JSP Request Method: <% out.print(util.HTMLFilter.filter(request.getMethod())); %>
22
<br>
22
<br>
23
Request URI: <%= request.getRequestURI() %>
23
Request URI: <%= request.getRequestURI() %>
24
<br>
24
<br>
Lines 32-38 Link Here
32
<br>
32
<br>
33
Content length: <%= request.getContentLength() %>
33
Content length: <%= request.getContentLength() %>
34
<br>
34
<br>
35
Content type: <%= request.getContentType() %>
35
Content type: <% out.print(util.HTMLFilter.filter(request.getContentType())); %>
36
<br>
36
<br>
37
Server name: <%= request.getServerName() %>
37
Server name: <%= request.getServerName() %>
38
<br>
38
<br>

Return to bug 32953