•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 375,170 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,237 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1425 | Replies: 0 | Solved
![]() |
•
•
Join Date: Dec 2004
Posts: 457
Reputation:
Rep Power: 4
Solved Threads: 5
Hello there,
I've got some information which is stored in a class object, these objcts are transfered to an action in the format of a set.
I'm trying to put the set into a bean into my JSP, however im not having much luck.
The error is as follows:
The JSP code:
My action code: which is invoked before forwarding to this page - it should but the bean into scope:
the structs configuration file:
and finally the MMIUtils contains this:
any ideas?
I've got some information which is stored in a class object, these objcts are transfered to an action in the format of a set.
I'm trying to put the set into a bean into my JSP, however im not having much luck.
The error is as follows:
•
•
•
•
org.apache.jasper.JasperException: Cannot create iterator for this collection
The JSP code:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>JSP Page</h1>
<jsp:useBean id="address" scope="session" class="Address.AddressForm">
<logic:iterate id="myIterator" name="address" type="Address.AddressDTO">
<bean:write name="myIterator" property="addresses.name"/>
</logic:iterate>
</jsp:useBean>
</body>
</html>
My action code: which is invoked before forwarding to this page - it should but the bean into scope:
import Data.MyFactory;
imports.........
public class AddressAction extends Action {
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
//Returns a list of accidents and sets accidents attribute in session
AddressDAO myDAO = MyFactory.getFactory("standard").getDAO(AddressDAO.class);
request.setAttribute(MMIUtils.addresses,myDAO.retrieveAll());
return mapping.findForward("success");
}
}
<action
path="/AddressAction"
type="Address.AddressAction">
<forward name="success" path="/success.jsp"/>
</action>
</action-mappings>static public String addresses = "addresses";
any ideas?
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
Similar Threads
- what is wrong with this jsp expression? (JSP)
- Help in JSP Doubt (JSP)
- About <error-page> tag in struts (JSP)
- URGENT: JSP - StackOverFlow Error (JSP)
- tomcat jsp problem (JSP)
- [urgent] JSP problem (JSP)
Other Threads in the JSP Forum
- Previous Thread: Uploading file on server side
- Next Thread: JSP's not getting compiled


Linear Mode