Re: textbox showing currency default value
This is my idea: jsp should convert my float value to a String so to display it in my textbox. I suppose jsp uses a subclass of NumberFormat to do so... may I change this behaviour so to use DecimalFormat.getCurrencyFormat()? Thank you in advance... Paolo Paolo Niccolò Giubelli ha scritto: There's no method in the Action class returning a String. Can you help me? Thank you so much, Paolo Zheng, Qiang ha scritto: You need to implement that in action. -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 2:26 PM To: Struts Users Mailing List Subject: Re: textbox showing currency default value sorry... I meant .. I'm really tired...:D Paolo Niccolò Giubelli ha scritto: Sorry, I don't understand from where I should return what. I have a Form with a float m_price = 0.0 field (wit accessors methods). In the jsp I have I need to se a textbox like this || | 0,00 | || Thanks anyway. Zheng, Qiang ha scritto: You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message----- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textbox showing currency default value
There's no method in the Action class returning a String. Can you help me? Thank you so much, Paolo Zheng, Qiang ha scritto: You need to implement that in action. -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 2:26 PM To: Struts Users Mailing List Subject: Re: textbox showing currency default value sorry... I meant .. I'm really tired...:D Paolo Niccolò Giubelli ha scritto: Sorry, I don't understand from where I should return what. I have a Form with a float m_price = 0.0 field (wit accessors methods). In the jsp I have I need to se a textbox like this || | 0,00 | || Thanks anyway. Zheng, Qiang ha scritto: You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message----- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textbox showing currency default value
sorry... I meant .. I'm really tired...:D Paolo Niccolò Giubelli ha scritto: Sorry, I don't understand from where I should return what. I have a Form with a float m_price = 0.0 field (wit accessors methods). In the jsp I have I need to se a textbox like this || | 0,00 | || Thanks anyway. Zheng, Qiang ha scritto: You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message----- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textbox showing currency default value
Sorry, I don't understand from where I should return what. I have a Form with a float m_price = 0.0 field (wit accessors methods). In the jsp I have I need to se a textbox like this || | 0,00 | || Thanks anyway. Zheng, Qiang ha scritto: You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
textbox showing currency default value
Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: URLEncoding a string
Oleg Mikheev ha scritto: Dave Newton wrote: I'm pretty sure it's Struts 1, since there are both and Yeah, it's struts1. So, should I use ? Does it perform an urlencoding? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
URLEncoding a string
This is my scenario: I'm url-rewriting my web application, so I'm putting some strings into the html:link href attributes, so to make my links more search-engine friendly. Obviously, those strings are retrieved from the database. An example follows: The problem is ${category.name}, because sometimes string contain stressed letters, symbols and so on... How can I Urlencode ${category.name}, keeping the code tidy? Thanks in advance! PAolo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help please TOMCAT 5 + Struts
Maybe you got some memory leak in your code. Use a memory-inspecting tool and check for static objects. If you check your memory usage, maybe you'll find that you eat all the memory available, so you should tune your tomcat server changing the memory parameters. Regards, Paolo Niccolò Giubelli STRUTS SL. Mailing List ha scritto: Hello for everybody; We have a big trouble with our Web Application. Our Tomcat 5.5 Server is working properly, as we can see. The problem is concerning to the Web Project. It’s frizzing randomly. It doesn’t matter how many time was reloaded. From this moment never user can get in the Web Site. At the browser address bar we can see the session id that was assigned to the new session, but never the home page is presented, and we must be going to reload it. This reloading is making on the Tomcat Server. Web application historical summary: The Trapsatur Project was hosting on a Tomcat 4 Web Server, it was installed in our offices. It was working almost properly, but slowly. Cause that, we decided to get out this Server to be housing at office’s ISP, front to Internet. At this moment we passed to Tomcat 5.5.26. It was begin of troubles. We are adjusting the Web Application and the Tomcat Server continuously. We resolved problems with DB connection, someone errors with SMTP server. In addition we adjusted several Tomcat’s and JVM’s parameters. Now we are doing some tests. We have assumed that the problem is the difference between servlet.jar used by our Web Project, and the servlet.jar used by Tomcat Server. We want to thank in advance any help from any body. Best regard; /* Some mistakes catalina.out */ Exception in thread "DefaultQuartzScheduler_Worker-0" java.lang.OutOfMemoryError: PermGen space Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space Exception in thread "http-80-Processor31" java.lang.OutOfMemoryError: PermGen space Exception in thread "http-80-Processor32" java.lang.OutOfMemoryError: PermGen space Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space 17-jul-2008 16:37:56 org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-80 java.lang.reflect.InvocationTargetException Exception in thread "main" java.lang.OutOfMemoryError: PermGen space 17-jul-2008 16:38:59 org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jdk1.5.0_15/jre/lib/i386/server:/opt/jdk1.5.0_15/jre/lib/i386:/opt/jdk1.5.0_15/jre/../lib/i386 17-jul-2008 16:38:59 org.apache.coyote.http11.Http11BaseProtocol init Christian A. Villamizar Lamus. Dpto. Informática – Trapsatur. Tel: 91.542. – Fax: 91.548.0044 Э-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> www.trapsatur.com <http://www.trapsatur.com/> www.excursionesenmadrid.com <http://www.excursionesenmadrid.com/> www.excursionesenmadrid.es <http://www.excursionesenmadrid.es/> C/ San Bernardo 5 – 7. 28013 – Madrid. España. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieve an hashtable entry within a jsp using struts tag and a bean as the key
Ok, I used jstl and now it works! Here's the code (it's changed since the first post, so don't compare it): property="highLevelCategories"> value="${pannelloForm.highLevelCategoriesChildren[category.id]}"> ${subcategory.contenuto.name} where: - pannelloForm is the ActionForm bean - highLevelCategories is an ArrayList - highLevelCategoriesChildren is an Hashtable> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieve an hashtable entry within a jsp using struts tag and a bean as the key
Maybe using Apache Commons BeanUtils? Anybody knows? Thanks again. Paolo Paolo Niccolò Giubelli ha scritto: I'm sorry, but I'm still unable to do that. Ciro Montanino ha scritto: Try to use jstl tag library to read HashTable contents. On Mon, Jun 30, 2008 at 4:29 PM, Paolo Niccolò Giubelli < [EMAIL PROTECTED]> wrote: - 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]
Re: Retrieve an hashtable entry within a jsp using struts tag and a bean as the key
I'm sorry, but I'm still unable to do that. Ciro Montanino ha scritto: Try to use jstl tag library to read HashTable contents. On Mon, Jun 30, 2008 at 4:29 PM, Paolo Niccolò Giubelli < [EMAIL PROTECTED]> wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Retrieve an hashtable entry within a jsp using struts tag and a bean as the key
Hi! I need a little help. I'm writing a jsp using struts tags and in my ActionForm class I put an Hashtable containing keys and values (both are pojos). I can get my hashtable in this way: The key is also a bean, obtained through a (working) logic:iterate: How can I retrieve a value from ht using "product" as the "key"? I tried as I usually do with hashtables, using (and then bean:writing some properties) but, as I expected, it doesn't work. Ideas? Thank you in advance! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]