在里的value属性里用赋值为什么不好用

耶律火柴 2007-05-21 11:55:09
<html:hidden property="pagename" value="<bean:write name="pagename" /> write="true" />

不成功,
错误:equal symbol expected

请各位指教非常谢谢
...全文
2187 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
xusheng_fenglin 2007-05-27
  • 打赏
  • 举报
回复
我也碰到了这个问题,网上搜索就来到了这里
^_^,果然遇见高人,
解决了,虽然给不了分,但是谢谢所以的人!!
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
还有一个页面再没加上面那两句话的时候也是有这个提示,从表面上看是说<html:form>没有平衡,不过我搜索整个页面也就是有这么一对<html:form></html:form>会不会是别的标签有问题哪,
请指教!
非常感谢!
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
The end tag "</html:form" is unbalanced
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
<bean:define id="ABC" name="XXX" property="XXX" type="XXX"/>
<html:hidden property="lastMessage" value='<%=ABC%>'/>


我加上这两句话后出现如下错误
没加之前没有问题
请再次指教谢谢
For_suzhen 2007-05-21
  • 打赏
  • 举报
回复
<html:hidden property="pagename" value="<bean:write name="pagename" /> write="true" />




==========================================
你看看啊 value="<bean:write name="pagename" /> write="true" 这一句5 个引号
肯定有问题
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
value="<bean:write name="pagename" /> " 不是这个引号的问题
Netself 2007-05-21
  • 打赏
  • 举报
回复
也可以这样写:
<input type="hidden" name="pagename" value='<bean:write name="pagename"/>' />
Netself 2007-05-21
  • 打赏
  • 举报
回复
是引号不匹配的问题吧
sadsardine 2007-05-21
  • 打赏
  • 举报
回复
这么写:
<bean:define id="ABC" name="XXX" property="XXX" type="XXX"/>
<html:hidden property="lastMessage" value='<%=ABC%>'/>
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
谢谢!
sadsardine 2007-05-21
  • 打赏
  • 举报
回复
type填变量属性,string,long,int之类的。
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
OK,这个问题解决了,谢谢sadsardine及各位

刚才那个加上这个<bean:define id="ABC" name="XXX" property="XXX" type="XXX"/>
<html:hidden property="lastMessage" value='<%=ABC%>'/>

后也是这个提示,那个type 属性怎么填,没用过这个标签,这个也就是相当于在页面定义一个变量是吧





sadsardine 2007-05-21
  • 打赏
  • 举报
回复
The end tag "</html:form" is unbalanced 错误 应该是
<html:submit property="submit" value="XX" >
<html:reset property="reset" value=" 重 置 " >
造成的。
改为:
<html:submit property="submit" value="XX"/>
<html:reset property="reset" value=" 重 置 "/>
再试。
耶律火柴 2007-05-21
  • 打赏
  • 举报
回复
非常感谢!


<%@ page contentType="text/html; charset=GBK" language="java" %>


<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<% String path=request.getContextPath();%>

<html:html>
<html:base />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>学费减免界面</title>
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<script language="JavaScript">
<!--
function clasubmit(){

exitDerateForm.event.value="select";
exitDerateForm.action.value="clasubmit";
exitDerateForm.submit();
}
function checkstudent(){
exitDerateForm.action.value="checkstudent";
exitDerateForm.submit();
}

//--></script>


</head>


<body>

<p align = "center">
<p align = "center"><font size="+2">XX</font>
<html:form action="XX" method="post" onsubmit="XX">

<div align="center">
<table width="378" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#999999" class="list">

<logic:present name="claList">
<tr class="body">
<td width="141" align="right">XX: </td>
<td width="224" align="left"> 
<html:select property="cla_id" onchange="clasubmit()" >
<html:options collection="claList"
property="id"
labelProperty="name" />
</html:select>
</td></tr>
</logic:present>


<logic:present name="stList" >
<tr class="body">
<td align="right">XX: </td>
<td align="left"> 
<html:select property="st_id" onchange="checkstudent()" >
<html:options collection="stList"
property="id"
labelProperty="name" />
</html:select>
</td></tr>
</logic:present>

<tr class="body">
<td align="right">XX: </td>
<td align="left"> 
<logic:present name="yearList">
<html:select property="beginYear" >
<html:options collection="yearList"
property="id"
labelProperty="name" />
</html:select>
</logic:present>
年 

<logic:present name="monthList">
<html:select property="beginMonth" >
<html:options collection="monthList"
property="id"
labelProperty="name" />
</html:select>
</logic:present>
月 开始
</td></tr>
<tr class="body">
<td align="right">XX: </td>
<td align="left"> 
<logic:present name="yearList">
<html:select property="endYear" >
<html:options collection="yearList"
property="id"
labelProperty="name" />
</html:select>
</logic:present>
年 
<logic:present name="monthList">
<html:select property="endMonth" >
<html:options collection="monthList"
property="id"
labelProperty="name" />
</html:select>
</logic:present>
月 结束
</td></tr>
<tr class="body"><td colspan="2" align="center">

<html:submit property="submit" value="XX" >  
<html:reset property="reset" value=" 重 置 " >
<input type="button" value="重新选择" onClick="document.location.href='derate.do?pagename=学费减免&event=select&action=init'"/>
</td></tr>
</table></div>
<input type="hidden" name="cla_id_new" value="<bean:write name="cla_id" />"/>
<input type="hidden" name="st_id_new" value="<bean:write name="st_id" />" />

<html:hidden property="pagename" value="XX" />
<html:hidden property="event" value="set" />
<html:hidden property="action" value="input" />
</html:form>

</body>
</html:html>
sadsardine 2007-05-21
  • 打赏
  • 举报
回复
The end tag "</html:form" is unbalanced

出现这个问题是你的<>不匹配,请仔细检查你的TAG是否是成对出现的。

把的的完整代码 贴出来我看。

81,115

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧