struts的小错误!
原码:inputContent.jsp
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html"%>
<%@ taglib uri="/logic" prefix="login"%>
<%@ taglib uri="/app" prefix="app"%>
<html>
<head>
<title></title>
</head>
<body>
<html:errors/>
<app:departmentList/>
<app:skillsList/>
<html:form action="validateEmployee.do">
<table>
<tr>
<td align="right">
<bean:message key="prompt.employee.name"/>
</td>
<td>
<html:text property="name"/>
</td>
</tr>
<tr>
<td align="right">
<bean:message key="prompt.employee.department"/>
</td>
<td>
<html:select property="department"/>
<html:options name="departmentList"/>
</html:select>
</td>
</tr>
<tr>
<td align="right" valign="top">
<bean:message key="prompt.employee.skills"/>
</td>
<td>
<logic:iterate id="currentSkill" name="skillsList">
<html:multibox property="skills">
<%= currentSkill %>
</html:multibox>
<%= currentSkill%>
<BR/>
</logic:iterate>
</td>
</tr>
<Tr>
<td colspan="2" align="center">
<html:submit value="Validate"/>
</td>
</Tr>
</table>
</html:form>
</body>
</html>
错误类型:
Generated servlet error:
D:\Tomcat 4.0\work\Standalone\localhost\test\inputContent$jsp.java:355: Undefined variable: currentSkill
out.print( currentSkill );
^
An error occurred at line: 42 in the jsp file: /inputContent.jsp
Generated servlet error:
D:\Tomcat 4.0\work\Standalone\localhost\test\inputContent$jsp.java:379: Undefined variable: currentSkill
out.print( currentSkill);
^
2 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
currentSkill还需要定义吗?