Hey guys,
I have the following order.jsp file and am trying to use the <form:checkbox> tag to build a bind path to a command object orderInfo which contains a variable bread. However when I add the following line of code to my .jsp file;
i get the following errorCode:<form:checkbox path="orderInfo.bread"/>
I have checked the appropriate documentationorg.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/order.jsp:19
16: <tr>
17: <td width="235">Bread:</td>
18: <td width="353">
19: <form:checkbox path="orderInfo.bread"/>
20: </td>
21: </tr>
22: <tr>
http://static.springframework.org/sp...rence/mvc.html
and the tags are used correctly. So I don't understand what it could be. Can anyone help?
Full listing of the orderInfo class and the order.jsp are below.
Code:<%@ include file="/WEB-INF/jsp/include.jsp" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <a href="<core:url value="main.htm"/>">testing</a> <form:form commandName="orderInfo"> <table width="604" border="1"> <tr> <td width="235">Bread:</td> <td width="353"> <form:checkbox path="orderInfo.bread"/> </td> </tr> <tr> <td>Meat:</td> <td> <form:input path="meat" size="9" maxlength="9" /> </td> </tr> <tr> <td>Veg: </td> <td> <form:input path="veg" size="3" maxlength="3" /> </td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Submit" /></td> </tr> </table> </form:form> </body> </html>Code:package bus; public class OrderInfo { private String meat; private String veg; private boolean bread; public boolean isBread() { return bread; } public void setBread(boolean bread) { this.bread = bread; } public String getMeat() { return meat; } public void setMeat(String meat) { this.meat = meat; } public String getVeg() { return veg; } public void setVeg(String veg) { this.veg = veg; } }


Reply With Quote