日期:2014-05-20 浏览次数:20936 次
<form-bean name="houseInfoDynaForm" type="org.apache.struts.action.DynaActionForm"> <form-property name="title" type="java.lang.String"/> <form-property name="cityId" type="java.lang.Integer"/> <form-property name="streetId" type="java.lang.Integer"/> <form-property name="rent" type="java.lang.Double"/> <form-property name="room" type="java.lang.Integer"/> <form-property name="hall" type="java.lang.Integer"/> <form-property name="houseType" type="java.lang.Integer"/> <form-property name="houseInfo" type="java.lang.String"/> <form-property name="telephone" type="java.lang.String"/> <form-property name="contactName" type="java.lang.String"/> </form-bean>
<action name="houseInfoDynaForm" path="/jsps/post" type="org.zero.space.action.PostAction"> <forward name="login" path="/jsps/login.jsp" /> <forward name="confirm" path="/jsps/Confirm.jsp" /> </action>
DynaActionForm houseInfoDynaForm = (DynaActionForm)form ; HouseInfo houseInfo = new HouseInfo(); houseInfo.setContactName(houseInfoDynaForm.getString("contactName")); houseInfo.setHall((Integer)houseInfoDynaForm.get("hall")); houseInfo.setHouseInfo(houseInfoDynaForm.getString("houseInfo")); houseInfo.setHouseType((Integer)houseInfoDynaForm.get("houseType")); houseInfo.setRent((Double)houseInfoDynaForm.get("rent")); houseInfo.setRoom((Integer)houseInfoDynaForm.get("room")); houseInfo.setStreetId((Integer)houseInfoDynaForm.get("streetId")); houseInfo.setTelephone(houseInfoDynaForm.getString("telephone")); houseInfo.setTitle(houseInfoDynaForm.getString("title"));
严重: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Property 'title' not found on type org.apache.struts.action.DynaActionForm at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170) at javax.el.BeanELResolver.property(BeanELResolver.java:279) at javax.el.BeanELResolver.getValue(BeanELResolver.java:60) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)