<%@ page import="com.yourcompany.model.bookclass"%>
<jsp:useBean id="classlist" scope="page" class="com.yourcompany.model.bookclasslist" />
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>         
<html:select  property="bookclass">
<% if (classlist.excute())
{
for (int i=0;i<classlist.getClasslist().size();i++)
{
bookclass bc = (bookclass) classlist.getClasslist().elementAt(i);%>
<html:option value="<%=bc.getId()%>"><%= bc.getClassName() %></html:option>
<%}}%>
</html:select>
An error occurred at line: 165 in the jsp file: /WEB-INF/admin/addbook.jsp
The method setValue(String) in the type OptionTag is not applicable for the arguments (int)
162:  for (int i=0;i<classlist.getClasslist().size();i++)
163:  {
164:  bookclass bc = (bookclass) classlist.getClasslist().elementAt(i);%>
165:         <html:option value="<%=bc.getId()%>"><%= bc.getClassName() %></html:option>
166:         <%}}%>
167:  </html:select></td>
168:           <td background="../../jpg/daohang.gif">&nbsp;</td>
value="<%=bc.getId()%>"里的="<%=bc.getId()%>"不是字符串吗,怎么会出现"is not applicable for the arguments (int)"这个错误的,bc.getId返回的是int类型classlist的excute的代码如下: public boolean excute() throws Exception {
int id = 0;
String classname = "";
int rscount = 0;
try {
Connection con = DataAccess.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(getSql());
rscount = stmt.getMaxRows();
classlist = new Vector(rscount+1);
classlist.clear();
while (rs.next()){
id =rs.getInt("id");
classname = rs.getString("classname");
bookclass bc = new bookclass(id,classname);
classlist.addElement(bc);
}
rs.close();
stmt.close();
    con.close();
return true;
}
        public Vector getClasslist() {
return classlist;
}