[66] | 1 | <html><body><pre> |
---|
| 2 | <!-- |
---|
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 4 | contributor license agreements. See the NOTICE file distributed with |
---|
| 5 | this work for additional information regarding copyright ownership. |
---|
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 7 | (the "License"); you may not use this file except in compliance with |
---|
| 8 | the License. You may obtain a copy of the License at |
---|
| 9 | |
---|
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 11 | |
---|
| 12 | Unless required by applicable law or agreed to in writing, software |
---|
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 15 | See the License for the specific language governing permissions and |
---|
| 16 | limitations under the License. |
---|
| 17 | --> |
---|
| 18 | <%@ taglib prefix="my" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %> |
---|
| 19 | <html> |
---|
| 20 | <head> |
---|
| 21 | <title>JSP 2.0 Examples - Book SimpleTag Handler</title> |
---|
| 22 | </head> |
---|
| 23 | <body> |
---|
| 24 | <h1>JSP 2.0 Examples - Book SimpleTag Handler</h1> |
---|
| 25 | <hr> |
---|
| 26 | <p>Illustrates a semi-realistic use of SimpleTag and the Expression |
---|
| 27 | Language. First, a &lt;my:findBook&gt; tag is invoked to populate |
---|
| 28 | the page context with a BookBean. Then, the books fields are printed |
---|
| 29 | in all caps.</p> |
---|
| 30 | <br> |
---|
| 31 | <b><u>Result:</u></b><br> |
---|
| 32 | <my:findBook var="book"/> |
---|
| 33 | <table border="1"> |
---|
| 34 | <thead> |
---|
| 35 | <td><b>Field</b></td> |
---|
| 36 | <td><b>Value</b></td> |
---|
| 37 | <td><b>Capitalized</b></td> |
---|
| 38 | </thead> |
---|
| 39 | <tr> |
---|
| 40 | <td>Title</td> |
---|
| 41 | <td>${book.title}</td> |
---|
| 42 | <td>${my:caps(book.title)}</td> |
---|
| 43 | </tr> |
---|
| 44 | <tr> |
---|
| 45 | <td>Author</td> |
---|
| 46 | <td>${book.author}</td> |
---|
| 47 | <td>${my:caps(book.author)}</td> |
---|
| 48 | </tr> |
---|
| 49 | <tr> |
---|
| 50 | <td>ISBN</td> |
---|
| 51 | <td>${book.isbn}</td> |
---|
| 52 | <td>${my:caps(book.isbn)}</td> |
---|
| 53 | </tr> |
---|
| 54 | </table> |
---|
| 55 | </body> |
---|
| 56 | </html> |
---|
| 57 | </pre></body></html> |
---|