Subject: Re: Help ! Logic From: "bkrishna" <[EMAIL PROTECTED]> === How can I get the value from the table to populate a text column in the same form.
Thanks in Advance Bala. "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Glad I could help. > > ~ Keith > > > -----Original Message----- > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 28, 2002 12:10 PM > To: [EMAIL PROTECTED] > Subject: Re: Help ! Logic > > > Subject: Re: Help ! Logic > From: "bkrishna" <[EMAIL PROTECTED]> > === > It works know you are correct. > > Thanks Keith. > > "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED]... > > Hey, > > I think you might be using either <logic:iterate> or <bean:write> > > incorrectly. The id attribute of a <logi:iterate> is the variable that > > stores each iteration. You are supposed to use the id variable in the > body > > of the tag. Therefore, the name attribute of <bean:write> should be the > > same as the id attribute of <logic:iterate>. Does that make sense to you? > > Anybody else correct me if i'm wrong about any of this. > > Hope it helps. > > > > ~ Keith > > > > > > -----Original Message----- > > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] > > Sent: Friday, June 28, 2002 11:40 AM > > To: [EMAIL PROTECTED] > > Subject: Re: Help ! Logic > > > > > > Subject: Re: Help ! Logic > > From: "bkrishna" <[EMAIL PROTECTED]> > > === > > I did remove the scope and I am getting a different error. Here is my > code > > let me know what I am doing wrong. > > > > This is my ActionClass > > > > ArrayList instArrayList = new ArrayList(); > > InstitutionDAO myInst = new InstitutionDAO(); > > try { > > instArrayList = myInst.getInstitutions(instId, instName, "Y"); > > } catch (DataRowException dre){ > > } > > > > request.setAttribute("Result", instArrayList); > > return mapping.findForward("success"); > > > > In my JSP: > > <%@ page language="java" %> > > <%@ taglib uri="WEB-INF/struts-bean.tld" prefix="bean" %> > > <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %> > > <%@ taglib uri="WEB-INF/struts-logic.tld" prefix="logic" %> > > > > <caption> > > <b>LookupResult</b> > > </caption> > > > > <%@ page import="gov.nsf.eletter.data.lookup.Institution" %> > > > > <body bgcolor="#c0c0c0"> > > <table cellpadding="2" cellspacing="0" border="1"> > > <logic:iterate id="instArrayList" name="Result" type="Institution"> > > <tr bgcolor='FFFFFF' valign='top' align='left'> > > <td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' > > color='#003366'> > > <bean:write name="Result" property="instId"/> > > </font></td> > > <td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' > > color='#003366'> > > <bean:write name="Result" property="instName"/> > > </font></td> > > <td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' > > color='#003366'> > > <bean:write name="Result" property="instShrtName"/> > > </font></td> > > <td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' > > color='#003366'> > > <bean:write name="Result" property="awdPerfInstCode"/> > > </font></td> > > <td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' > > color='#003366'> > > <bean:write name="Result" property="instCity"/> > > </font></td> > > <td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' > > color='#003366'> > > <bean:write name="Result" property="instState"/> > > </font></td> > > </tr> > > </logic:iterate> > > </table> > > > > > > Thanks > > > > Bala. > > > > > > "Chris Hardin" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED]... > > > > > > Make sure there are no extra spaces in your tag attributes. That will > > cause > > > this error. I relly think that this error is the way you are defining > the > > > logic:iterate tag. REmove the scope attribute completely from the tag > and > > > try running the jsp. > > > > > > >From: "Krishnamoorthy, Balasubramanian " <[EMAIL PROTECTED]> > > > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > > >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > > > >CC: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > > > >Subject: Re: Help ! Logic > > > >Date: Fri, 28 Jun 2002 08:42:51 -0400 > > > > > > > >I am getting the same error. Found any solution. > > > > > > > >Thanks in Advance > > > > > > > >Bala. > > > > > > > >"Damien VIEL" <[EMAIL PROTECTED]> wrote in message > > > >news:<[EMAIL PROTECTED]>... > > > > > Hi, > > > > > I've a little error with the TagLib Logic. > > > > > I'm trying to populate a JSP file from my Action class. > > > > > In the action i'm doing : > > > > > > > > > > UserBO userBO = new UserBO(); > > > > > ResultSet rs = userBO.getAllUserProject(userid); > > > > > ArrayList proj = new ArrayList(); > > > > > while (rs.next()) { > > > > > String name = rs.getString("proj_name"); > > > > > String id = rs.getString("proj_id"); > > > > > proj.add(new LabelValueBean(name, id)); > > > > > } > > > > > request.setAttribute("projectList", proj); > > > > > return (mapping.findForward("success")); > > > > > > > > > > In my JSP : > > > > > <%@ page language="java" %> > > > > > <%@ taglib uri="/WEB-INF/tld/app.tld" prefix="app" %> > > > > > <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %> > > > > > <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %> > > > > > <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %> > > > > > > > > > > <table> > > > > > <logic:iterate name="projectList" id="proj" scope="request" > > > > > type="LabelValueBean"> > > > > > <tr> > > > > > <td> > > > > > <bean:write name="projectList" property="label"/> > > > > > </td> > > > > > <td> > > > > > <bean:write name="projectList" property="value"/> > > > > > </td> > > > > > </tr> > > > > > </logic:iterate> > > > > > </table> > > > > > > > > > > It deos not work and i have the following error: > > > > > javax.servlet.ServletException: Cannot find bean projectList in > scope > > > > > request > > > > > at > > > > > > > > > > > >org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm > > p > > > > > l.java:463) > > > > > at > > > > > > > > > > > >org.apache.jsp.myprojectcontent$jsp._jspService(myprojectcontent$jsp.java:1 > > 4 > > > > > 7) > > > > > at > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) > > > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > > > at > > > > > > > > > > > >org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j > > a > > > > > va:202) > > > > > at > > > > >org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) > > > > > at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) > > > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio > > n > > > > > FilterChain.java:247) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC > > h > > > > > ain.java:193) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j > > a > > > > > va:243) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 66) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > > > > at > > > >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j > > a > > > > > va:190) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 66) > > > > > at > > > > > > > > > > > >org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java: > > 2 > > > > > 46) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 64) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > > > > at > > > >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:18 > > 0 > > > > > ) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 66) > > > > > at > > > > > > > > > > > >org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve > > . > > > > > java:170) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 64) > > > > > at > > > > > > > > > > > >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:17 > > 0 > > > > > ) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 64) > > > > > at > > > > > > > > > >org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 64) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > > > > at > > > >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav > > a > > > > > :174) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java: > > 5 > > > > > 66) > > > > > at > > > > > > > > > > > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > > > > at > > > >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > > > > at > > > > > > > > > > > >org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java > > : > > > > > 1012) > > > > > at > > > > > > > > > > > >org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:110 > > 7 > > > > > ) > > > > > at java.lang.Thread.run(Thread.java:536) > > > > > > > > > > Help pls > > > > > > > > > > Dams > > > > > > > > > > > > > > > -- > > > > > To unsubscribe, e-mail: > > > ><mailto:[EMAIL PROTECTED]> > > > > > For additional commands, e-mail: > > > ><mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > >-- > > > >To unsubscribe, e-mail: > > > ><mailto:[EMAIL PROTECTED]> > > > >For additional commands, e-mail: > > > ><mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > Chris L Hardin > > > Java/J2EE Developer > > > Enterprise Consulting > > > > > > _________________________________________________________________ > > > MSN Photos is the easiest way to share and print your photos: > > > http://photos.msn.com/support/worldwide.aspx > > > > > > > > > -- > > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>