Re: Logic Iterate problem
) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Thanks and Regards, Crazy Worker -- View this message in context: http://www.nabble.com/Logic-Iterate-problem-tp21462092p21462092.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Logic-Iterate-problem-tp21462092p21514400.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Logic Iterate problem
) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Thanks and Regards, Crazy Worker -- View this message in context: http://www.nabble.com/Logic-Iterate-problem-tp21462092p21462092.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Logic Iterate problem
) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Thanks and Regards, Crazy Worker -- View this message in context: http://www.nabble.com/Logic-Iterate-problem-tp21462092p21462092.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Logic Iterate problem
Did you have the tld declaration at the top of your jsp page e.g %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 14 Jan 2009 10:26:04 -0800 From: anishpis...@gmail.com To: user@struts.apache.org Subject: Logic Iterate problem Hi, In one page of my application i am trying to iterate through one collection for populating one combo box. But it is showing javax.servlet.jsp.JspException: Cannot create iterator for this collection I have one LoginForm that extends Validator form and it containg one object of User. This user object contains a List of user roles .Actually i am trying to display these user roles in my combo box in the jsp page. My code is below. I am using struts 1.3 for develping this project ... Please help me My form class is below... public class Loginform extends ValidatorForm{ public String userName; public String passWord; public User user = new User(); public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } /** * Reset all properties to their default values. * * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */ public void reset(ActionMapping mapping, HttpServletRequest request) { super.reset(mapping, request); userName = ; passWord= ; } } User object is public class User implements Serializable{ public String userid = Ashli; public String userName = Ashli Isaac; public String passWord = 123456; public String userNumber = 1001; public ListString userRoles = new ArrayListString(); public String loginStatus; public String riskCounter; public User(){ userRoles.add(Admin User); userRoles.add(Trial User); userRoles.add(BackUP User); userRoles.add(Super User); } public ListString getUserRoles() { return userRoles; } public void setUserRoles(ListString userRoles) { this.userRoles = userRoles; } the code snippet for iteration in jsp is tr td width=30% logic:iterate id=results name=loginForm property=user bean:define id=result name=results property=userRoles bean:write name=result/ /bean:define /logic:iterate /td My exception stack trace is SEVERE: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Cannot create iterator for this collection at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:275) at org.apache.jsp.jsp.welcome_jsp._jspService(welcome_jsp.java:193) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436