Hi ,

I got it worked by replacing jakarta-taglibs-standard-1.1.2 jstl jars  with
sun jstl jars. I am not sure what is the difference. Also I have to add 
<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >

in  my web.xml.

Thanks a lot for all your help.

-Suneetha.

-----Original Message-----
From: Dima Gutzeit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 25, 2005 4:55 PM
To: Tag Libraries Users List
Subject: Re: Urgent: urgent jstl foreach tag is not working

Please make sure that your web.xml file is web-app version 2.4. It means it 
should start with :

<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >


Hope it helps.

Regards,
Dima Gutzeit.
----- Original Message ----- 
From: "Kurakula, Suneetha (HCF)" <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <taglibs-user@jakarta.apache.org>
Sent: Thursday, August 25, 2005 9:46 PM
Subject: RE: Urgent: urgent jstl foreach tag is not working


> Hi,
>
> I am sorry for pestering you. But I need your help desperately. Please let
> me clarify with you about my JSTL setup.
>
> 1.Downloaded jakarta-taglibs-standard-1.1.2
> 2.Copied jstl.jsr,standard.jar to web-inf/lib
> 3.Copied tlds to web-inf/tlds folder
> 4.Added taglibs to web.xml as below
> <taglib>
>   <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
>   <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
> </taglib>
>
> <taglib>
>   <taglib-uri>http://java.sun.com/jsp/jstl/functions</taglib-uri>
>   <taglib-location>/WEB-INF/tlds/fn.tld</taglib-location>
> </taglib>
>
> If I use below tag uris
> <%@ taglib  uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%>
>
> None of tags will work .They will just print out ${amount} and
> {fn.length(pmts)} instead of values
>
> And if I use
> <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
> <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="fn"%>
>
>
> Alteast core  tags are working and prints values and function tags they 
> just
> print {fn.length(pmts)}.
>
>
> Can anyone let me know if I am missing anything in my configuration?
>
> Thanks
> Suneetha
>
>
> -----Original Message-----
> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 3:29 PM
> To: Tag Libraries Users List
> Subject: Re: Urgent: urgent jstl foreach tag is not working
>
> On 8/25/05, Kurakula, Suneetha (HCF) <[EMAIL PROTECTED]> 
> wrote:
>> Hi All,
>> Great.
>> Thank you very much . I got it resolved by adding getters method to my
> class
>> as suggested by Martin. Thanks Martin.
>>
>> I have one more problem. My core tags are working in the same page but
>> function tags values are not printing
>
> That's because you're using JSTL 1.0 URIs but trying to use JSTL 1.1
> functionality. If you correct your URIs, it should work (assuming you
> actually have a JSTL 1.1 implementation).
>
> --
> Martin Cooper
>
>
>> <%@ taglib  uri="http://java.sun.com/jstl/core"; prefix="c"%>
>> <%@ taglib uri="http://java.sun.com/jstl/functions"; prefix="fn"%>
>>
>> <c:set var="tempStr" value="I love Java an www.java2s.com"/>
>> ${fn:length(tempStr)}
>> Payments length = ${fn:length(pmts)}
>>
>> Can anyone please help me out?
>>
>> Thanks,
>> Suneetha.
>>
>> -----Original Message-----
>> From: Martin Cooper [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, August 25, 2005 2:32 PM
>> To: Tag Libraries Users List
>> Subject: Re: Urgent: urgent jstl foreach tag is not working
>>
>> 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]
>>
>> ---------------------------------------------------------------------
>> 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]
>
> 



---------------------------------------------------------------------
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]

Reply via email to