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