this is one of the worst JSP I ever seen.. I hope it is en experiment
and not something for a production env.

in your first pot there was an error...

 pageContext.setAttribute("pmts",pmts,page);

should be (for me..)

 pageContext.setAttribute("pmts",pmts);

I fear you are messing with different (Mejor) version of JSTL.... I
suggest "JSTL in action" from Manning


Se ya

2005/8/25, Martin Cooper <[EMAIL PROTECTED]>:
> On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> > Hi Martin,
> >
> > Thanks for the response. I defined my
> >
> > Usebean for the class I am trying to access
> 
> You don't need that. As I said, what you _do_ need is getters. Like:
> 
>   public int getAmount() { return amount; }
> 
> --
> Martin Cooper
> 
> 
> > <jsp:useBean id="pmt" class="scinsurers.server.interfaces.Payment" /> .But
> > still I am getting error
> >
> > javax.servlet.ServletException: An error occurred while evaluating custom
> > action attribute "value" with value "${pmt.amount}": Unable to find a value
> > for "amount" in object of class "scinsurers.server.interfaces.Payment" using
> > operator "." (null)
> >
> > org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> > mpl.java:848)
> >
> > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> > l.java:781)
> >
> > org.apache.jsp.view.unmatchedPayments_jsp._jspService(org.apache.jsp.view.un
> > matchedPayments_jsp:457)
> >         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > 22)
> >
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> >         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >
> > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> > va:81)
> >
> >
> > Thanks,
> > Suneetha.
> >
> > -----Original Message-----
> > From: Martin Cooper [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 25, 2005 2:18 PM
> > To: Tag Libraries Users List
> > Subject: Re: Urgent: urgent jstl foreach tag is not working
> >
> > You need to define getters for the properties you want to access via JSTL.
> >
> > --
> > Martin Cooper
> >
> >
> > On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> wrote:
> > > Hello All,
> > >
> > >
> > >
> > > I would like to thank you all who answered my question . I have
> > > jakarta-taglibs-standard-1.1.2  jars and tlds copied onto my webserver.
> > But
> > > still  I am getting error when I run my jsp
> > >
> > >
> > >
> > > As you all suggested I fixed my  jsp syntactical errors and tag errors.
> > Here
> > > is my updated code.
> > >
> > >
> > >
> > > <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> > >
> > > <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="f"%>
> > >
> > >
> > >
> > > <%!
> > >
> > >             public class Payment{
> > >
> > >                         public  int amount;
> > >
> > >                         public  String checkDate;
> > >
> > >                         public  int checkNumber;
> > >
> > >                         public Payment()
> > >
> > >                         {
> > >
> > >                         }
> > >
> > >                         public Payment(int amount,String checkDate,int
> > > checkNumber)
> > >
> > >                         {
> > >
> > >                                     this.amount = amount;
> > >
> > >                                     this.checkDate = checkDate;
> > >
> > >                                     this.checkNumber = checkNumber;
> > >
> > >                         }
> > >
> > >             }
> > >
> > >     Payment pmtone = new Payment(100,"08/12/2005",1000);
> > >
> > >     Payment pmttwo = new Payment(200,"08/13/2005",2000);
> > >
> > >     Payment pmtthree = new Payment(300,"08/15/2005",3000);
> > >
> > >             Payment[] pmts = {pmtone,pmttwo,pmtthree};
> > >
> > >
> > >
> > > %>
> > >
> > > <%
> > >
> > >             pageContext.setAttribute("pmts",pmts);
> > >
> > >             for(int i=0;i<pmts.length;i++)
> > >
> > >             {
> > >
> > >             System.out.println(pmts[i].amount);
> > >
> > >             }
> > >
> > > %>
> > >
> > >
> > >
> > > <c:forEach var="pmt" items="${pmts}" varStatus="curr">
> > >
> > >                         <c:set var="amount" value="${pmt.amount}"/>
> > >
> > >
> > >                         <c:set var="checkdate"  value="${pmt.checkdate}"/>
> > >
> > >
> > >                         <c:set var="checknumber"
> > > value="${pmt.checknumber}"/>
> > >
> > >                         <c:out value="${amount}"/>
> > >
> > >                         <c:out value="${checkdate}"/>
> > >
> > >                         <c:out value="${checknumber}"/>
> > >
> > > </c:forEach>
> > >
> > >
> > >
> > > And now I am getting error
> > >
> > >
> > >
> > > javax.servlet.ServletException: An error occurred while evaluating custom
> > > action attribute "value" with value "${pmt.amount}": Unable to find a
> > value
> > > for "amount" in object of class
> > > "org.apache.jsp.view.unmatchedPayments_jsp$Payment" using operator "."
> > > (null)
> > >
> > >
> > org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> > > mpl.java:848)
> > >
> > >
> > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> > > l.java:781)
> > >
> > >
> > org.apache.jsp.view.unmatchedPayments_jsp._jspService(org.apache.jsp.view.un
> > > matchedPayments_jsp:464)
> > >         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> > >         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > >
> > >
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > > 22)
> > >
> > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> > >         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> > >         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > >
> > >
> > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> > > va:81)
> > >
> > > root cause
> > >
> > >
> > >
> > >
> > >
> > > Can anyone please help me out?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Suneetha.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
::SammyRulez::
http://sammyprojectz.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to