Struts Tiles标签

  1. Struts Tiles标签:
  2. main.jsp:
  3. <%@ page contentType="text/html; charset=UTF-8" %>
  4. <%@ taglib uri="strutsTiles" prefix="tiles" %>
  5. <tiles:insert page="layout.jsp" flush="true" >
  6.     <tiles:put name="header" value="header.jsp" />
  7.     <tiles:put name="left" value="menu.jsp" />
  8.     <tiles:put name="content" value="content.jsp" />
  9.     <tiles:put name="footer" value="footer.jsp" />
  10. </tiles:insert>
  11. layout.jsp:
  12. <%@ page contentType="text/html; charset=UTF-8" %>
  13. <%@ taglib uri="strutsTiles" prefix="tiles" %>
  14. <html>
  15.   <head>
  16.     <title>Demo</title>
  17.     <link rel="stylesheet" href="css/basic.css" type="text/css"></link>
  18.   </head>
  19.   <body>
  20.     <center>
  21.     <table  width="80%" height="100%">
  22.     <tr>
  23.         <td width="100%" height="20%" valign="middle" align="center" colspan="2"  >
  24.             <tiles:insert attribute="header" />         
  25.         </td>
  26.     </tr>
  27.     <tr>
  28.         <td width="20%" height="60%" valign="top" align="left">
  29.             <tiles:insert attribute="left" />
  30.         </td>
  31.         <td width="*" height="60%" valign="top" align="center" >
  32.             <tiles:insert attribute="content" />
  33.         </td>
  34.     </tr>
  35.     <tr>
  36.         <td width="100%" height="20%" colspan="2" align="center" >
  37.             <tiles:insert attribute="footer" />
  38.         </td>
  39.     </tr>
  40.     </table>
  41.     </center>
  42.   </body>
  43. </html>
  44. content.jsp:
  45. <%@ page contentType="text/html; charset=UTF-8" %>
  46. <h3>本系统为后台数据管理窗体</h3>
  47. header.jsp:
  48. <%@ page contentType="text/html; charset=UTF-8" %>
  49. <h1>进销存管理后台管理系统</h1>
  50. footer.jsp:
  51. <%@ page contentType="text/html; charset=UTF-8" %>
  52. <h3>版权所有(c)list_jerry@yahoo.com.cn</h3>
  53. menu.jsp:
  54. <%@ page contentType="text/html; charset=UTF-8" %>
  55. <h2>操作菜单</h2>
  56. basic.css
  57. @CHARSET "UTF-8";
  58. body { 
  59.     font-family: arial, helvetica, sans-serif; 
  60.     font-size: 80%; 
  61.     color: black; 
  62.     background-color: #ffc; 
  63.     margin: 1em; 
  64.     padding: 0
  65.     
  66. }
  67. p { 
  68.     line-height: 1.5em; 
  69. }
  70. h1 { 
  71.     color: #fff; 
  72.     background-color: #450
  73.     font-size: 2em; 
  74.     margin: 0
  75.     margin-bottom: 0.5em; 
  76.     padding: 0.25em; 
  77.     font-style: italic; 
  78.     text-align: center; 
  79.     letter-spacing: 0.5em; 
  80.     border-bottom-style: solid; 
  81.     border-bottom-width: 0.5em; 
  82.     border-bottom-color: #c00; 
  83. }
  84. h2 { 
  85.     color: white; 
  86.     background-color: #090
  87.     font-size: 1.5em; 
  88.     margin: 0
  89.     padding: 0.1em; 
  90.     padding-left: 1em; 
  91. }
  92. h3 { 
  93.     color: #999
  94.     font-size: 1.25em; 
  95. }
  96. img { 
  97.     border-style: dashed; 
  98.     border-width: 2px; 
  99.     border-color: #ccc; 
  100. }
  101. a { 
  102.     text-decoration: none; 
  103. }
  104. strong { 
  105.     font-style: italic; 
  106.     text-transform: uppercase; 
  107. }
  108. li { 
  109.     color: #900
  110.     font-style: italic; 
  111. }
  112. table { 
  113.     background-color: #ccc; 
  114. }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值