logic:iterate, length, offset
Hi: I have 12 items in a collection. I want to display the first 10 items on the first page, and the rest 2 items in the next page. How can I control it using logic:iterate tag. I used length=10 and offset=%= pagerOffset% as the attribute of logic:iterate. But it only show the first page(first 10 items)---I mean it only iterate over the first 10 items. After that, it stops iterate. What's wrong? Could you help me out? Thank you for your help. Regards, Cathy - Post your free ad now! Yahoo! Canada Personals
logic:iterate
Hi: I have 12 items in a collection. I want to display the first 10 items on the first page, and the rest 2 items in the next page. How can I control it using logic:iterate tag. Thank you for your help. Regards, Cathy - Post your free ad now! Yahoo! Canada Personals
struts-config.xml
I have html: form action=/pay.do?id=1type= + type/ in my Jsp. What should be in path of action tag of struts-config.xml? Can I simply have path=pay or I must include parameter in the path. Thank you for your reply. Cathy - Post your free ad now! Yahoo! Canada Personals
display error message including dynamic data
Hi: According to the result from my action class, I need to display message to user using the dynamic data. This is what I am doing: In my action class, I got the result that user can only retrieve maximum 50 dollars from his credit card. When user try to retrieve more than 50 dollars, I want to display the error message: you can't retrieve more that 50 dollars. (50 is dynamic data here). In my action class, I have errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.amount)); in my Jsp, I have html:error/. How can I achieve it in ApplicationResource.properties?(I am using struts1.1-b2). Thank you very much for your reply - Post your free ad now! Yahoo! Canada Personals
display error message including dynamic data
Hi: According to the result from my action class, I need to display message to user using the dynamic data. This is what I am doing: In my action class, I got the result that user can only retrieve maximum 50 dollars from his credit card. When user try to retrieve more than 50 dollars, I want to display the error message: you can't retrieve more that 50 dollars. (50 is dynamic data here). In my action class, I have errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.amount)); in my Jsp, I have html:error/. How can I achieve it in ApplicationResource.properties?(I am using struts1.1-b2). Thank you very much for your reply - Post your free ad now! Yahoo! Canada Personals
Re: display error message including dynamic data
Hi, Patrice: That works. Thank you so much! One more question. If I have two or more dynamic data which I want to display them in the error message. How can I achieve that using the above approach? Thank you. Cathy Patrice [EMAIL PROTECTED] wrote:Hi, You can specify dynamic data in your errors like this: errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.amount, dynamicAmount)); where dynamicAmount contains the amount you want to display in your error message. In your ApplicationResource.properties: error.amount=you can't retrieve more that {0} dollars {0} will be replaced by the content of dynamicAmount. Hope it helps Patrice - Original Message - From: Cathy Osekizoglu To: Struts Users Mailing List Sent: Thursday, November 28, 2002 8:12 PM Subject: display error message including dynamic data Hi: According to the result from my action class, I need to display message to user using the dynamic data. This is what I am doing: In my action class, I got the result that user can only retrieve maximum 50 dollars from his credit card. When user try to retrieve more than 50 dollars, I want to display the error message: you can't retrieve more that 50 dollars. (50 is dynamic data here). In my action class, I have errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.amount)); in my Jsp, I have . How can I achieve it in ApplicationResource.properties?(I am using struts1.1-b2). Thank you very much for your reply - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
Re: display error message including dynamic data
Patrice and Sven, thank you very much!! You are very helpful. Have a good day. Cathy Patrice lt;[EMAIL PROTECTED]gt; wrote: Hi Cathy, You can use 4 dynamic data at the maximum, in an error message. The values can be defined in the ActionError constructor: errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.myError, dynamicValue1, dynamicValue2, dynamicValue3, dynamicValue4)); and in you resources file: error.myError=blah blah {0} blah blah {1} {2} blah{3} {0}, {1}, {2} and {3} will be replaced with the contents of dynamicValue1, dynamicValue2, dynamicValue3, and dynamicValue4. Best regards Patrice - Original Message - From: Cathy Osekizoglu To: Struts Users Mailing List Sent: Thursday, November 28, 2002 9:10 PM Subject: Re: display error message including dynamic data Hi, Patrice: That works. Thank you so much! One more question. If I have two or more dynamic data which I want to display them in the error message. How can I achieve that using the above approach? Thank you. Cathy Patrice wrote:Hi, You can specify dynamic data in your errors like this: errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.amount, dynamicAmount)); where dynamicAmount contains the amount you want to display in your error message. In your ApplicationResource.properties: error.amount=you can't retrieve more that {0} dollars {0} will be replaced by the content of dynamicAmount. Hope it helps Patrice - Original Message - From: Cathy Osekizoglu To: Struts Users Mailing List Sent: Thursday, November 28, 2002 8:12 PM Subject: display error message including dynamic data Hi: According to the result from my action class, I need to display message to user using the dynamic data. This is what I am doing: In my action class, I got the result that user can only retrieve maximum 50 dollars from his credit card. When user try to retrieve more than 50 dollars, I want to display the error message: you can't retrieve more that 50 dollars. (50 is dynamic data here). In my action class, I have errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.amount)); in my Jsp, I have . How can I achieve it in ApplicationResource.properties?(I am using struts1.1-b2). Thank you very much for your reply - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
String comparation
This question is not related to struts. Sorry I ask here because I don't know where I should put this message. Please help me forward to the right place if you know. If you know the answer, please help me. Thanks. My question: How to compare test1, test10 and test2, so that the result will be test1, test2, test10. Now I got test1, test10, test2 Thanks again - Post your free ad now! Yahoo! Canada Personals
display Date in struts1.1
I got Date from DB, I used formatKey=EEE MMM d, yy hh:mm, in my jsp file.The Date is displayed as Thu Oct 9, 02 09:37 on my page. I want to display it as 10-09-02 09:37. What format should I use to achieve this? Please help me. Best regards, Cathy - Post your free ad now! Yahoo! Canada Personals
Re: display Date in struts1.1
Thank you, Antoni and Thomas. The solution that you gave me works! Best regards, Cathy Antoni Reus [EMAIL PROTECTED] wrote: Hi, A Dijous 10 Octubre 2002 16:53, Cathy Osekizoglu va escriure: I got Date from DB, I used formatKey=EEE MMM d, yy hh:mm, in my jsp file.The Date is displayed as Thu Oct 9, 02 09:37 on my page. I want to display it as 10-09-02 09:37. What format should I use to achieve this? Please help me. Best regards, Cathy MM-dd-yy hh:mm - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
uae logic:notEqual to compare with several values
Hi, dear: I want to use logic:notEqual to compare with several values. Can I use logic:notEqual name=myForm property=myProperty value=3, 6/logic:notEqual? If I use: logic:notEqual name=.. property=... value=3 logic:notEqual name=.. property=.. value=6 doSomething /logic:notEqual /logic:notEqual doSomething is never been excuted even the property is not equal to 3 or 6. How can I do it in struts1.1? Please help me. Thank you very much. Cathy - Post your free ad now! Yahoo! Canada Personals
Re: uae logic:notEqual to compare with several values
Craige: Thank you for your reply. I am not familar with JSTL. I will learn it later. Now, I need a quick fix on this problem. Could you or anybody help me? Thank you. Craig R. McClanahan [EMAIL PROTECTED] wrote: On Wed, 9 Oct 2002, Cathy Osekizoglu wrote: Date: Wed, 9 Oct 2002 11:58:15 -0400 (EDT) From: Cathy Osekizoglu Reply-To: Struts Users Mailing List To: Struts Users Mailing List , Frederic Barozzi Subject: uae logic:notEqual to compare with several values Hi, dear: I want to use logic:notEqual to compare with several values. Can I use ? If I use: doSomething doSomething is never been excuted even the property is not equal to 3 or 6. How can I do it in struts1.1? Please help me. Thank you very much. If you're running on a Servlet 2.3 / JSP 1.2 container, this is a place where the expression language in JSTL 1.0 can be very helpful. In addition, JSTL supports a tag that acts much like a switch statement in Java, letting you specify alternative behavior for any number of different values. Cathy Craig -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
How to set default
I am using html:options tag to get a dropdown list. How can I make an item as default so every time I open the page that contains the dropdown list, it will show the default. Thanks. Cathy - Post your free ad now! Yahoo! Canada Personals
display long data
Hi, I got a big data(amount) from DB. For example, 1099. In my jsp, I use bean:write to display the data. But it displays 1.099E11. I am required to display it the same way as it in DB, which is 1099. Does any one know how to do it? I am using struts1.1. Thank you for your reply. Cathy - Post your free ad now! Yahoo! Canada Personals
Re: display big data using bean:write
Does bean:write tag automatically format 1099 to 1.099E11. How can I have the number displayed as 1099 instead of 1.099E11? Please help me! Thanks! Cathy Osekizoglu [EMAIL PROTECTED] wrote: Hi, I got a big data(amount) from DB. For example, 1099(float type). In my jsp, I use bean:write to display the data. But it displays 1.099E11. I am required to display it the same way as it in DB, which is 1099. Does any one know how to do it? I am using struts1.1. Thank you for your reply. Cathy - Post your free ad now! Yahoo! Canada Personals - Post your free ad now! Yahoo! Canada Personals
bean:write and Date format
Using bean:write name=aPayment property=date/, I got the date as: Fri Aug 24 23:42:00 EDT 2002. How can I change it to Fri Aug 24 02 23:42 using struts tag? Thank you for your help. Cathy - Post your free ad now! Yahoo! Canada Personals
Re: bean:write and Date format
Jeff: I am using struts1.1. I tried use formatKey as you discribed, but the whole page becomes balnk. So I guess I need to put Date or Timestamp to my page. How can I put date ot Timestamp in my page. Sorry for the simple question. I am new to java and jsp. Thanks [EMAIL PROTECTED] wrote: If you are using Struts 1.1 then you can use the formatKey attribute of the tag formatKey=format.date.long with a key in you properties file as such: format.date.long= d, ** I think this only works if you are putting Date or Timestamp to the page. If not 1.1 then I guess you could a helper method is the form bean that formats the date called String getDateFormatted() .. Cathy Osekizoglu on 09/23/2002 03:17:42 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject: bean:write and Date format Using , I got the date as: Fri Aug 24 23:42:00 EDT 2002. How can I change it to Fri Aug 24 02 23:42 using struts tag? Thank you for your help. Cathy - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
stativ variable in action class
Hi, If I use static variable in action class, is there some disadvantages? Thank you for your information. Cathy - Post your free ad now! Yahoo! Canada Personals
Re: static variable in action class
Cathy Osekizoglu [EMAIL PROTECTED] wrote: Hi, If I use static variable in action class, is there some disadvantages? Thank you for your information. Cathy - Post your free ad now! Yahoo! Canada Personals - Post your free ad now! Yahoo! Canada Personals
Get only first value using logic:iterate
Hi: I am using the following to iterate over payments(Vector). logic:iterate id=aPayment name=payments scope=session type=com.test.Payment bean:write name=aPayment property=amount/ /logic:iterate In my action class, I have session.setAttribute(payments,payments); When I run it, I can get only first item of payments. I am using Struts1.1. What could be wrong? Please help me. Thanks. Cathy - Post your free ad now! Yahoo! Canada Personals
RE: Get only first value using logic:iterate
Thank you, Galbreath, for your help. Unfortunately, I can't use br / because I have many data on one row. Do you have any other solutions? Thanks. Galbreath, Mark [EMAIL PROTECTED] wrote: try -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 3:04 PM To: Struts Users Mailing List Subject: Get only first value using logic:iterate Hi: I am using the following to iterate over payments(Vector). type=com.test.Payment In my action class, I have session.setAttribute(payments,payments); When I run it, I can get only first item of payments. I am using Struts1.1. What could be wrong? Please help me. Thanks. Cathy - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
RE: Get only first value using logic:iterate
Thank you, Mark. I did exactly as what you did. But it can just get the first value. Any ideas? Thanks Galbreath, Mark [EMAIL PROTECTED] wrote: or some variation of this, depending upon your data. Mark -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: Get only first value using logic:iterate Thank you, Galbreath, for your help. Unfortunately, I can't use because I have many data on one row. Do you have any other solutions? Thanks. Galbreath, Mark wrote: try -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 3:04 PM To: Struts Users Mailing List Subject: Get only first value using logic:iterate Hi: I am using the following to iterate over payments(Vector). type=com.test.Payment In my action class, I have session.setAttribute(payments,payments); When I run it, I can get only first item of payments. I am using Struts1.1. What could be wrong? Please help me. Thanks. Cathy - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
RE: Get only first value using logic:iterate
Thank you, Mark. I confirmed, there are two items in my payments(Vector). When I iterate over payments, I should get two records, but for some reason, I only get the first one. Please help me. The following is my part of my jsp file: tr logic:iterate id=aPayment name=payments scope=session tdbean:write name=aPayment property=amount/td logic:iterate /tr In my action class, I have HttpSession = request.getSession(); session.setAttribute(payments, payments);//in payments, I have two items. This question seems simple. I spend lot of time trying to solve it, but no success. Could anyone help me? Thank you very much. Cathy Galbreath, Mark [EMAIL PROTECTED] wrote: Someone please help Cathy...I am leaving the office for the pub. Thanks, Mark -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 3:47 PM To: Struts Users Mailing List Subject: RE: Get only first value using logic:iterate Thank you, Mark. I did exactly as what you did. But it can just get the first value. Any ideas? Thanks Galbreath, Mark wrote: or some variation of this, depending upon your data. Mark -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: Get only first value using logic:iterate Thank you, Galbreath, for your help. Unfortunately, I can't use because I have many data on one row. Do you have any other solutions? Thanks. Galbreath, Mark wrote: try -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 3:04 PM To: Struts Users Mailing List Subject: Get only first value using logic:iterate Hi: I am using the following to iterate over payments(Vector). type=com.test.Payment In my action class, I have session.setAttribute(payments,payments); When I run it, I can get only first item of payments. I am using Struts1.1. What could be wrong? Please help me. Thanks. Cathy - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
ProcessRequest--null
When I submit a form, in the error log, it shows me RequestProcessor--null, I can't figure out what is wrong. Could someone help me out? Thanks! Cathy - Post your free ad now! Yahoo! Canada Personals
Re: ProcessRequest--null
Eddie, thank you for your reply. And I am sorry for not provide enough information. I am using Struts1.1. On a page, I have a link. When I click on the link, it should open another page. This is part of the page that has link: function newHistoryWindow() { window.open('viewHistory.jsp'); } li A HREF=javascript:newHistoryWindow() bean:message key=mainMenu.history//A /li The following is part of my history.jsp: html:form action=/history.do ... html:submit/ The following is part of the struts-config.xml form-bean name=historyForm type=com.test.HistoryForm/ actionpath=/history type=com.test.HistoryAction name=historyForm scope=request validate=false input=/history.jsp forward name=successpath=/history.jsp/ /action When I click on the link, I can get history.jsp displayed. But when I click submit button, in the error log file, I got RequestProcessor--null. I thought it is URLMapping problem. I checked several times for the config in struts-config.xml, I seems everthing fine there. Any idea? Please help me. I am really stunk here. Many thanks. Cathy die Bush [EMAIL PROTECTED] wrote: You haven't given any information about your environment or what sort of application you're trying to run. Are you using the Tiles plugin? Are you supplying a custom RequestProcessor? You'll probably get better feedback if you're able to tell us more about what you're using ;-) Cathy Osekizoglu wrote: When I submit a form, in the error log, it shows me RequestProcessor--null, I can't figure out what is wrong. Could someone help me out? Thanks! Cathy -- Eddie Bush -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
onclick in html:radio tag doesn't work
Hi: I have a jsp using form, when I click a radio button in the form, I want the form to be submitted. The following is the jsp snippet: html:form action=/payments.do html:radio property=criteria value=all onclick=document.form[0].submit()/ But when I click on the button, in the status bar, it showserror on page, but nothing showing on the error log. I have tried both onClick(upper case C) and onclick. Neither works. accountHistory.do has correctly defined in my struts-config.xml. Thanks for your help. - Post your free ad now! Yahoo! Canada Personals
RE: onclick in html:radio tag doesn't work
I put semi-colon ; after submit(). So now it is like html:radio property=criteria value=all onclick=document.form[0].submit();. When I click on the radio button, I got document.form.0 is null or not an object in the pop up window. The source I got by viewing source is: input type=radio name=criteria value=all checked=checked onclick=document.form[0].submit(); I have enabled script debugging. Any ideas. Thanks for all your reply. Regards Also, have you visually checked the HTML source (and included JavaScript) that Struts/JSP has produced to make sure it looks sensible. If in doubt post the relevant bit here. Howard Miller -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: 18 September 2002 16:10 To: Struts Users Mailing List Subject: onclick in html:radio tag doesn't work Hi: I have a jsp using form, when I click a radio button in the form, I want the form to be submitted. The following is the jsp snippet: onclick=document.form[0].submit()/ But when I click on the button, in the status bar, it showserror on page, but nothing showing on the error log. I have tried both onClick(upper case C) and onclick. Neither works. accountHistory.do has correctly defined in my struts-config.xml. Thanks for your help. - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
Re: RES: onclick in html:radio tag doesn't work(fixed)
thanks you all. I use the actual form name instead of form[0]. it is working now. Thanks for all your help. Regards. Paulo Guilherme de Souza [EMAIL PROTECTED] wrote: Hi Cathy. Try this: Change form to forms (include a s) Paulo -Mensagem original- De: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 18 de setembro de 2002 13:39 Para: Struts Users Mailing List Assunto: RE: onclick in html:radio tag doesn't work I put semi-colon ; after submit(). So now it is like property=criteria value=all onclick=document.form[0].submit();. When I click on the radio button, I got document.form.0 is null or not an object in the pop up window. The source I got by viewing source is: [input] onclick=document.form[0].submit(); I have enabled script debugging. Any ideas. Thanks for all your reply. Regards Also, have you visually checked the HTML source (and included JavaScript) that Struts/JSP has produced to make sure it looks sensible. If in doubt post the relevant bit here. Howard Miller -Original Message- From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]] Sent: 18 September 2002 16:10 To: Struts Users Mailing List Subject: onclick in html:radio tag doesn't work Hi: I have a jsp using form, when I click a radio button in the form, I want the form to be submitted. The following is the jsp snippet: onclick=document.form[0].submit()/ But when I click on the button, in the status bar, it showserror on page, but nothing showing on the error log. I have tried both onClick(upper case C) and onclick. Neither works. accountHistory.do has correctly defined in my struts-config.xml. Thanks for your help. - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals - Post your free ad now! Yahoo! Canada Personals
bean:write with Date type
Hi: I want to iterate payments(Vector type) and get paymentDate (type of Date) for every individual payment. The following is my jsp snippet: logic:iterate id=aPayment name=paymentHistoryForm property=payments bean:write name=aPayment property=paymentDate???my question: paymentDate is Date type, is this line work? /logic:iterate If that line works, that means I can use = to assign Date type value, like: Date myDate1; Date myDate2=myDate1;///??? also, should this line work? Thanks for your help. - Post your free ad now! Yahoo! Canada Personals
not really solved
Hi: I have html:form action=/payment.do html:radio property=criteria value=all onclick=document.myForm.submit();/ payment.do and myForm are correctly configed in struts-config.xml. When I submit the form by clicking on radio button, the URL changed to http://localhost:7001/rootContext/payment.do, which is expected, but the page displayed error 500-internal server error. The error log is:RequestProcessor---null. If I use a submit button to submit the form, it works fine. Is there something wrong with radio button onclick? any ideas? I am using struts1.1 Thank you for your help. - Post your free ad now! Yahoo! Canada Personals
RequestProcessor--null
Hi, I got RequestProcessor--null when I submit a form. What could cause RequestProcessor to be null. Could you please recommend a way to debug struts? I am using WSAD, I imported my project into WSAD by choosing file system, but resources of my project never goes under webApplication in WSAD. By the way, If you know how to correctly import file sysytem into WSAD, could you please let me know, too? thanks Thanks for your help. - Post your free ad now! Yahoo! Canada Personals