Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts Problem with logic:iterate.

843838Aug 2 2005 — edited Nov 9 2009
Hi 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???
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2009
Added on Aug 2 2005
11 comments
1,086 views