struts里titles和template标签 我在使用这两个标签时,运行页面都会报Attribute context invalid for tag put according to TLD这个错误,请问是什么原因? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 index.jsp<%@ page language="java" contentType="text/html; charset=GBK"%><%@ taglib uri="struts-template" prefix="template" %><template:insert template="/template/Templateypjustice.jsp"> <template:put name="title" content="XXXXX" direct="true"/> <template:put name="header1" content="/pagestruct/header1.jsp" /> <template:put name="header2" content="/pagestruct/header2.jsp" /> <template:put name="header3" content="/intro/pagestruct/header3.jsp" /> <template:put name="content" content="/intro/index_content.jsp" /> <template:put name="leftbar" content="/intro/pagestruct/leftbar.jsp" /> <template:put name="footbar" content="/pagestruct/footbar.jsp" /></template:insert>Templateypjustice.jsp<%@ page contentType="text/html; charset=GBK"%><%@ page errorPage="/template/error_manage.jsp"%><%@ taglib uri='struts-template' prefix='template' %><html><head><title><template:get name='title' /></title><meta http-equiv="Content-Type" content="text/html; charset=GBK"><template:get name='js' /><link rel="stylesheet" href="/ypjustice/style.css"></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="760" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="8"><img src="/ypjustice/images/index_1.gif" width="760" height="8"></td> </tr> <tr> <td height="167" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="202" valign="top"><template:get name='header1' /></td> <td width="558" valign="top"><template:get name='header2' /></td> </tr> </table></td> </tr> <tr> <td height="24" background="/ypjustice/images/index_14.gif"><template:get name='header3' /></td> </tr> <tr> <td valign="top"><table width="760" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="202" valign="top" class="td1"><template:get name='leftbar' /></td> <td valign="top"><template:get name='content' /></td> </tr> </table> </td> </tr> <tr> <td height="27" bgcolor="#0168B5"><template:get name='footbar' /></td> </tr> </table></td> </tr></table></body></html> <template:put name="footbar" content="/pagestruct/footbar.jsp" /> contenthu换成value (我是新手) 不行。template没有value这个属性。错误还是一样:Attribute value invalid for tag put according to TLD 楼主确定下面标签里的uri是正确的吗?<%@ taglib uri="struts-template" prefix="template" %> 我在web.xml里配置,这样写应该没有错吧? <taglib> <taglib-uri>struts-template</taglib-uri> <taglib-location>/WEB-INF/struts-template.tld</taglib-location> </taglib> 楼主的struts版本号是多少?如果是1.1以上的应该用struts-tiles.tld看看你的工程里是不是既有struts-template.tld又有struts-tiles.tld 这工程里只有这个struts-template.tld。这项目是以前别人写的,现在部分页面要改一下,里面页面框架都用template标签来实现的。放在tomact里运行,大多数页面都显示不了,都报同一个错误。 struts2页面后退功能 struts2 入门级求助 SQL分组求每组的第一条数据(急) 还是关于静态发布的问题! 求高手一段JS代码! 麻烦各位,请看看我的javabean到底怎么回事()急急急 求一分页的例子 怎么在WIN2000下建立JSP平台??在线等待!!! 请问有没有解决此问题的好办法,现在的速度太慢了 请教多时间段输入的校验算法(给一个思路也好啊) 请教 一些 js 脚本 的基础应用! 自动计算账单总金额的问题
<%@ taglib uri="struts-template" prefix="template" %>
<template:insert template="/template/Templateypjustice.jsp">
<template:put name="title" content="XXXXX" direct="true"/>
<template:put name="header1" content="/pagestruct/header1.jsp" />
<template:put name="header2" content="/pagestruct/header2.jsp" />
<template:put name="header3" content="/intro/pagestruct/header3.jsp" />
<template:put name="content" content="/intro/index_content.jsp" />
<template:put name="leftbar" content="/intro/pagestruct/leftbar.jsp" />
<template:put name="footbar" content="/pagestruct/footbar.jsp" />
</template:insert>Templateypjustice.jsp<%@ page contentType="text/html; charset=GBK"%>
<%@ page errorPage="/template/error_manage.jsp"%>
<%@ taglib uri='struts-template' prefix='template' %>
<html>
<head>
<title><template:get name='title' /></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<template:get name='js' />
<link rel="stylesheet" href="/ypjustice/style.css">
</head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="760" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="8"><img src="/ypjustice/images/index_1.gif" width="760" height="8"></td>
</tr>
<tr>
<td height="167" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="202" valign="top"><template:get name='header1' /></td>
<td width="558" valign="top"><template:get name='header2' /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="24" background="/ypjustice/images/index_14.gif"><template:get name='header3' /></td>
</tr>
<tr>
<td valign="top">
<table width="760" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="202" valign="top" class="td1"><template:get name='leftbar' /></td>
<td valign="top"><template:get name='content' /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="27" bgcolor="#0168B5"><template:get name='footbar' /></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
contenthu换成value (我是新手)
<%@ taglib uri="struts-template" prefix="template" %>
<taglib>
<taglib-uri>struts-template</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
如果是1.1以上的应该用struts-tiles.tld
看看你的工程里是不是既有struts-template.tld又有struts-tiles.tld