Line | |
---|
1 | <!-- |
---|
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 | <html> |
---|
18 | <head> |
---|
19 | <title>Tag Plugin Examples: if</title> |
---|
20 | </head> |
---|
21 | <body> |
---|
22 | <h1>Tag Plugin Examples - <c:if></h1> |
---|
23 | |
---|
24 | <hr> |
---|
25 | </br> |
---|
26 | <a href="notes.html">Plugin Introductory Notes<font <font color="#0000FF"></a> |
---|
27 | <br/> |
---|
28 | <a href="howto.html">Brief Instructions for Writing Plugins<font color="#0000FF"></a> |
---|
29 | <br/> <br/> |
---|
30 | <hr> |
---|
31 | |
---|
32 | <font color="#000000"/> |
---|
33 | </br> |
---|
34 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
---|
35 | |
---|
36 | <h3>Set the test result to a variable</h3> |
---|
37 | <c:if test="${1==1}" var="theTruth" scope="session"/> |
---|
38 | The result of testing for (1==1) is: ${theTruth} |
---|
39 | |
---|
40 | <h3>Conditionally execute the body</h3> |
---|
41 | <c:if test="${2>0}"> |
---|
42 | It's true that (2>0)! |
---|
43 | </c:if> |
---|
44 | </body> |
---|
45 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.