Problem while converting JSP scriplet in to struts tags - Help requested
Following JSP scriplet is working fine jsp:useBean id=costDistForm class=CostDistForm scope=session/ % float totalPaymentAmount = 0.0f; List compItems = null; compItems = costDistForm.getCompleteItems(); Iterator it = compItems.iterator(); while (it.hasNext()) { ItemCostRowForm row = (ItemCostRowForm)it.next(); float payAmountSort = row.getPaymentAmountSort().floatValue(); totalPaymentAmount = totalPaymentAmount + payAmountSort; } if(totalPaymentAmount 1000.00) { % tr td b Values is greater than 1000 /b /td /tr % } % When I tried to convert above scriptlet into Struts using nested:iterate I am getting null pointer exception nested:notEmpty property=completeItems nested:iterate property=completeItems id=complete indexId=completeIdx nested:write property=paymentAmountSort/ nested:greaterEqual property=paymentAmountSort value=1000.00 tr td b Greater Equal 1000 /b /td /tr nested:greaterEqual /nested:iterate /nested:notEmpty Can you please help me out in getting the correct struts equivalent for above scriplet! - Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
logic:iterate - Question
I have following scenario. I have getExSummary() method in exForm which returns a arraylist of A object. How to use logic:iterate tag to print all the values which methods in A object. getACount(),getBCount() are methods in A object. I tried following tag, which is not working. Please suggest me the correct logic:iterate tag. logic:notEmpty name =exForm property=exSummary logic:iterate name =exForm property=exSummary id=e indexId=edx tr td bean:write name=exSummary property=aCount / /td td bean:write name=expSummary property=bCount / /td /tr /logic:iterate /logic:notEmpty /table Error which I am getting Aug 9, 2007 3:52:43 PM IST Error HTTP BEA-101020 [weblogic.servlet.inte [EMAIL PROTECTED] - appName: 'AAA', name: 'aaa', context-path: '/ eem'] Servlet failed with Exception java.lang.NullPointerException at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95) at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59) at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1036) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:999) Truncated. see log file for complete stacktrace - Got a little couch potato? Check out fun summer activities for kids.
logic:greaterThan tag - issue
Following is my actual code nested:notEmpty property=completeItems nested:iterate property=completeItems id=complete indexId=completeIdx nested:write property=paymentAmount / nested:greaterEqual property=paymentAmount value=1000.00 tr b Greater Equal 1000 /b /tr /nested:greaterEqual /nested:iterate /nested:notEmpty This is working for all the values greater and equal to 1000 but it also works for all the values less than 1000, which it should not. Can you help me out in this. I am getting Greater Equal 1000 message even for values less than 1000. The bean property returns a big Decimal. But still this comparision fails! Not able to get to the root of the cause, do you have any idea. I am retriving the values from Database, and I have checked the return value its a big decimal. Even logic:greaterEqual is not working for me. We are using Struts 1.2 version. Still problem exists. Specification-Title: Struts Framework Specification-Vendor: The Apache Software Foundation Specification-Version: 1.2.7 Implementation-Title: Struts Framework Implementation-Vendor: The Apache Software Foundation Implementation-Vendor-Id: org.apache Implementation-Version: 1.2.7 struts-logic.tld entries tlibversion1.2/tlibversion jspversion1.1/jspversion - Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
How to print values using nested:iterate tag
I have following scenario. I have getExSummary() method in exForm which returns a arraylist of A object. How to use logic:iterate tag to print all the values which methods in A object. getACount(),getBCount() are methods in A object. I tried following tag, which is not working. Please suggest me the correct nested:iterate tag. table nested:notEmpty name =exForm property=exSummary nested:iterate name =exForm property=exSummary id=e indexId=edx tr td nested:write property=aCount / /td td nested:write property=bCount / /td /tr /nested:iterate /nested:notEmpty /table Error which I am getting Aug 9, 2007 3:52:43 PM IST Error HTTP BEA-101020 [weblogic.servlet.inte [EMAIL PROTECTED] - appName: 'AAA', name: 'aaa', context-path: '/ eem'] Servlet failed with Exception java.lang.NullPointerException at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95) at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59) at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1036) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:999) Truncated. see log file for complete stacktrace - Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
Re: logic:greaterThan tag - issue
Thanks Leon, Big Decimal is our project requirement. Looks like the tld files under my WEB-INF directory are not correct. Can you please let me know the compatable nested tld files for struts1.2.7 version. Regards Leon Rosenberg [EMAIL PROTECTED] wrote: have you tried to use double instead? Leon On 8/9/07, Mad Shop wrote: Following is my actual code Greater Equal 1000 This is working for all the values greater and equal to 1000 but it also works for all the values less than 1000, which it should not. Can you help me out in this. I am getting Greater Equal 1000 message even for values less than 1000. The bean property returns a big Decimal. But still this comparision fails! Not able to get to the root of the cause, do you have any idea. I am retriving the values from Database, and I have checked the return value its a big decimal. Even is not working for me. We are using Struts 1.2 version. Still problem exists. Specification-Title: Struts Framework Specification-Vendor: The Apache Software Foundation Specification-Version: 1.2.7 Implementation-Title: Struts Framework Implementation-Vendor: The Apache Software Foundation Implementation-Vendor-Id: org.apache Implementation-Version: 1.2.7 struts-logic.tld entries 1.2 1.1 - Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more.
Re: logic:iterate - Question
Thanks Leon, We are using log4j for logging. Existing project is working fine and I added the following block for new requirement. when I remove bean:write tags then it won't give any error!!! Leon Rosenberg [EMAIL PROTECTED] wrote: you seems to have problems with logging configuration. apparently your weblogic server isn't properly configured which log to use with commons-logging adaptor. On 8/9/07, Mad Shop wrote: I have following scenario. I have getExSummary() method in exForm which returns a arraylist of A object. How to use logic:iterate tag to print all the values which methods in A object. getACount(),getBCount() are methods in A object. I tried following tag, which is not working. Please suggest me the correct logic:iterate tag. Error which I am getting [weblogic.servlet.inte [EMAIL PROTECTED] - appName: 'AAA', name: 'aaa', context-path: '/ eem'] Servlet failed with Exception java.lang.NullPointerException at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95) at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59) at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1036) at org.apache.struts.taglib.TagUtils.message(TagUtils.java:999) Truncated. see log file for complete stacktrace - Got a little couch potato? Check out fun summer activities for kids. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
Re: logic:greaterThan tag - issue
Hi Leon, I just now verified that the tld files i.e., struts-nested.tld, struts-nested.tld in struts.jar and tld files under WEB-INF are different. Does this make any difference! When I extracted these two tld's from struts.jar and replaced with exisiting tld files under WEB-INF directory, but now its not even entering in the tag Are there any other related changes we have to make! Leon Rosenberg [EMAIL PROTECTED] wrote: How is the BigDecimal a requirement for a jsp page? You know that you can (and often should) use different formats for storage and computations and for presentation? regards Leon On 8/9/07, Mad Shop wrote: Thanks Leon, Big Decimal is our project requirement. Looks like the tld files under my WEB-INF directory are not correct. Can you please let me know the compatable nested tld files for struts1.2.7 version. Regards Leon Rosenberg wrote: have you tried to use double instead? Leon On 8/9/07, Mad Shop wrote: Following is my actual code Greater Equal 1000 This is working for all the values greater and equal to 1000 but it also works for all the values less than 1000, which it should not. Can you help me out in this. I am getting Greater Equal 1000 message even for values less than 1000. The bean property returns a big Decimal. But still this comparision fails! Not able to get to the root of the cause, do you have any idea. I am retriving the values from Database, and I have checked the return value its a big decimal. Even is not working for me. We are using Struts 1.2 version. Still problem exists. Specification-Title: Struts Framework Specification-Vendor: The Apache Software Foundation Specification-Version: 1.2.7 Implementation-Title: Struts Framework Implementation-Vendor: The Apache Software Foundation Implementation-Vendor-Id: org.apache Implementation-Version: 1.2.7 struts-logic.tld entries 1.2 1.1 - Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
Re: logic:greaterThan tag - issue
Following are the differences Will this make any difference struts-logic.tld file in struts.jar file tlibversion1.0/tlibversion jspversion1.1/jspversion struts-logic.tld file under WEB-INF folder tlibversion1.2/tlibversion jspversion1.1/jspversion Mad Shop [EMAIL PROTECTED] wrote: Hi Leon, I just now verified that the tld files i.e., struts-nested.tld, struts-nested.tld in struts.jar and tld files under WEB-INF are different. Does this make any difference! When I extracted these two tld's from struts.jar and replaced with exisiting tld files under WEB-INF directory, but now its not even entering in the tag Are there any other related changes we have to make! Leon Rosenberg wrote: How is the BigDecimal a requirement for a jsp page? You know that you can (and often should) use different formats for storage and computations and for presentation? regards Leon On 8/9/07, Mad Shop wrote: Thanks Leon, Big Decimal is our project requirement. Looks like the tld files under my WEB-INF directory are not correct. Can you please let me know the compatable nested tld files for struts1.2.7 version. Regards Leon Rosenberg wrote: have you tried to use double instead? Leon On 8/9/07, Mad Shop wrote: Following is my actual code Greater Equal 1000 This is working for all the values greater and equal to 1000 but it also works for all the values less than 1000, which it should not. Can you help me out in this. I am getting Greater Equal 1000 message even for values less than 1000. The bean property returns a big Decimal. But still this comparision fails! Not able to get to the root of the cause, do you have any idea. I am retriving the values from Database, and I have checked the return value its a big decimal. Even is not working for me. We are using Struts 1.2 version. Still problem exists. Specification-Title: Struts Framework Specification-Vendor: The Apache Software Foundation Specification-Version: 1.2.7 Implementation-Title: Struts Framework Implementation-Vendor: The Apache Software Foundation Implementation-Vendor-Id: org.apache Implementation-Version: 1.2.7 struts-logic.tld entries 1.2 1.1 - Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. - Shape Yahoo! in your own image. Join our Network Research Panel today!