[66] | 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 | <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> |
---|
| 18 | <html> |
---|
| 19 | <head> |
---|
| 20 | <title>JSP 2.0 Examples - Panels using Tag Files</title> |
---|
| 21 | </head> |
---|
| 22 | <body> |
---|
| 23 | <h1>JSP 2.0 Examples - Panels using Tag Files</h1> |
---|
| 24 | <hr> |
---|
| 25 | <p>This JSP page invokes a custom tag that draws a |
---|
| 26 | panel around the contents of the tag body. Normally, such a tag |
---|
| 27 | implementation would require a Java class with many println() statements, |
---|
| 28 | outputting HTML. Instead, we can use a .tag file as a template, |
---|
| 29 | and we don't need to write a single line of Java or even a TLD!</p> |
---|
| 30 | <hr> |
---|
| 31 | <table border="0"> |
---|
| 32 | <tr valign="top"> |
---|
| 33 | <td> |
---|
| 34 | <tags:panel color="#ff8080" bgcolor="#ffc0c0" title="Panel 1"> |
---|
| 35 | First panel.<br/> |
---|
| 36 | </tags:panel> |
---|
| 37 | </td> |
---|
| 38 | <td> |
---|
| 39 | <tags:panel color="#80ff80" bgcolor="#c0ffc0" title="Panel 2"> |
---|
| 40 | Second panel.<br/> |
---|
| 41 | Second panel.<br/> |
---|
| 42 | Second panel.<br/> |
---|
| 43 | Second panel.<br/> |
---|
| 44 | </tags:panel> |
---|
| 45 | </td> |
---|
| 46 | <td> |
---|
| 47 | <tags:panel color="#8080ff" bgcolor="#c0c0ff" title="Panel 3"> |
---|
| 48 | Third panel.<br/> |
---|
| 49 | <tags:panel color="#ff80ff" bgcolor="#ffc0ff" title="Inner"> |
---|
| 50 | A panel in a panel. |
---|
| 51 | </tags:panel> |
---|
| 52 | Third panel.<br/> |
---|
| 53 | </tags:panel> |
---|
| 54 | </td> |
---|
| 55 | </tr> |
---|
| 56 | </table> |
---|
| 57 | </body> |
---|
| 58 | </html> |
---|