请教各位大哥关于在struts结构的系统中使用javascript的问题。
本人是初学者,刚学javascript。在struts结构的页面中使用了这样的代码:
isDelete为复选框的属性 <html:multibox property="isDelete">
<script language="javascrit" >
<!--
function SelectAllClick(obj)
{
var oChks = document.getElementsByName("isDelete")
if(obj.checked)
for(var i = 0;i < oChks.length;i ++)
oChks[i].checked = true;
else
for(var i = 0;i < oChks.length;i ++)
oChks[i].checked = false;
}
//-->
</script>
<html:checkbox property="checkbox1" onclick="SelectAllClick(this)">全部选中</html:checkbox>
却出现了如下信息:
HTTP Status 500 -
--------------------------------------------
type Exception report
message
description
The server encountered an internal error () that prevented it from fulfilling this request.exception
javax.servlet.ServletException: No getter method for property checkbox1 of bean org.apache.struts.taglib.html.BEAN
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.user.user_005flist_jsp._jspService(user_005flist_jsp.java:278)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.pz.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121)
root cause
javax.servlet.jsp.JspException: No getter method for property checkbox1 of bean org.apache.struts.taglib.html.BEAN
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:973)
org.apache.struts.taglib.html.CheckboxTag.isChecked(CheckboxTag.java:154)
org.apache.struts.taglib.html.CheckboxTag.doStartTag(CheckboxTag.java:129)
org.apache.jsp.user.user_005flist_jsp._jspx_meth_html_checkbox_0(user_005flist_jsp.java:516)
org.apache.jsp.user.user_005flist_jsp._jspService(user_005flist_jsp.java:237)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j