Struts Problem with logic:iterate.
843838Aug 2 2005 — edited Nov 9 2009Hi Friends,
I am using struts 1.2.
I am getting the following problem.
I am trying to iterate through hospitaldata which is stored in request in an ArrayList.
On the JSP side I am using the following code
<td>5 Hospital Name:---</td>
<td>
<select Name="hospitalid">
<logic:iterate id="hosp" name="allhospitallist">
<option value='<bean:write name="hosp" property="hospitalid"/>'><bean:write name="hosp" property="hospitalname"/></option>
</logic:iterate>
</select>
</td>
hospitalData.hospitalid field is a java.lang.Long.
I am getting the following error:
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.CreateUser_jsp._jspService(org.apache.jsp.CreateUser_jsp:244)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
When I use
<logic:iterate id="hosp" name="allhospitallist">
<option value='<bean:write name="hosp" property="hospitalname"/>'><bean:write name="hosp" property="hospitalname"/></option>
</logic:iterate>
There is no problem.
Can anyone tell me what the problem is???