RE: [Q] Struts and date formatters
There is a struts way of doing it (at least, I think, it's the struts way). You just have to declare the parameter of your bean as a java.util.Date and have a property named org.apache.struts.taglib.bean.format.date in your standard properties file, e.g. org.apache.struts.taglib.bean.format.date=dd.MM.yy. The same works for numbers, too. You can also specify your own property by using the formatKey-Property of the bean:write-Tag (http://localhost:8080/struts-documentation/userGuide/struts-bean.html#write) Björn OK, thanks, I'll look into it. I was hoping for a default struts way to do it, but it seems I have to do it by hand. --- Alex Shneyderman [EMAIL PROTECTED] wrote: Well the other way is what you are doing already except instead of attaching the bean as a date attach it as a preformatted string. Using the same SimpleDateFormat. The reason you are getting your strangely formatted string is because JSP does yourBean.toString () hence the behavior you are seeing. Alex. -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:41 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [Q] Struts and date formatters Is there a solution without using JSTL? I run on BEA WebLogic 6.1sp2 and there is a known bug which limits the number of external jars you can import into an application. Do a google search for CR064391_610sp2.jar for more details on that. Anyway, we cannot upgrade to a new version soon, which means we have to reduce the number of libs we import. It sucks, but its reality. :( --- Alex Shneyderman [EMAIL PROTECTED] wrote: Use JSTL's formatDate tag. Very easy to use and lets you format your date any way you want it. Example: fmt:formatDate value=${yourDate} pattern=-MM-dd HH:mm / it is that simple. Alex. -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:30 AM To: [EMAIL PROTECTED] Subject: [Q] Struts and date formatters I am using the bean:write tag and for date fields (java.util.Date), I get the (rather ugly) full: Wed Aug 06 12:08:07 CEST 2003 I have tried to do: DateFormdat df = DateFormat.getDateTimeInstance(); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(-MM-dd hh:mm); But it gets ignored how/where can I change the default pattern that struts uses to format dates with? Thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Struts and date formatters
1.1 Which version of struts is that? I am using 1.02 and for bean:write, neither type or formatKey are allowed attributes --- [EMAIL PROTECTED] wrote: There is a struts way of doing it (at least, I think, it's the struts way). You just have to declare the parameter of your bean as a java.util.Date and have a property named org.apache.struts.taglib.bean.format.date in your standard properties file, e.g. org.apache.struts.taglib.bean.format.date=dd.MM.yy. The same works for numbers, too. You can also specify your own property by using the formatKey-Property of the bean:write-Tag (http://localhost:8080/struts-documentation/userGuide/struts-bean.html#write) Björn OK, thanks, I'll look into it. I was hoping for a default struts way to do it, but it seems I have to do it by hand. --- Alex Shneyderman [EMAIL PROTECTED] wrote: Well the other way is what you are doing already except instead of attaching the bean as a date attach it as a preformatted string. Using the same SimpleDateFormat. The reason you are getting your strangely formatted string is because JSP does yourBean.toString () hence the behavior you are seeing. Alex. -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:41 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [Q] Struts and date formatters Is there a solution without using JSTL? I run on BEA WebLogic 6.1sp2 and there is a known bug which limits the number of external jars you can import into an application. Do a google search for CR064391_610sp2.jar for more details on that. Anyway, we cannot upgrade to a new version soon, which means we have to reduce the number of libs we import. It sucks, but its reality. :( --- Alex Shneyderman [EMAIL PROTECTED] wrote: Use JSTL's formatDate tag. Very easy to use and lets you format your date any way you want it. Example: fmt:formatDate value=${yourDate} pattern=-MM-dd HH:mm / it is that simple. Alex. -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:30 AM To: [EMAIL PROTECTED] Subject: [Q] Struts and date formatters I am using the bean:write tag and for date fields (java.util.Date), I get the (rather ugly) full: Wed Aug 06 12:08:07 CEST 2003 I have tried to do: DateFormdat df = DateFormat.getDateTimeInstance(); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(-MM-dd hh:mm); But it gets ignored how/where can I change the default pattern that struts uses to format dates with? Thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
RE: [Q] Struts and date formatters
1.1 Which version of struts is that? I am using 1.02 and for bean:write, neither type or formatKey are allowed attributes --- [EMAIL PROTECTED] wrote: There is a struts way of doing it (at least, I think, it's the struts way). You just have to declare the parameter of your bean as a java.util.Date and have a property named org.apache.struts.taglib.bean.format.date in your standard properties file, e.g. org.apache.struts.taglib.bean.format.date=dd.MM.yy. The same works for numbers, too. You can also specify your own property by using the formatKey-Property of the bean:write-Tag (http://localhost:8080/struts-documentation/userGuide/struts-bean.html#write) Björn OK, thanks, I'll look into it. I was hoping for a default struts way to do it, but it seems I have to do it by hand. --- Alex Shneyderman [EMAIL PROTECTED] wrote: Well the other way is what you are doing already except instead of attaching the bean as a date attach it as a preformatted string. Using the same SimpleDateFormat. The reason you are getting your strangely formatted string is because JSP does yourBean.toString () hence the behavior you are seeing. Alex. -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:41 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [Q] Struts and date formatters Is there a solution without using JSTL? I run on BEA WebLogic 6.1sp2 and there is a known bug which limits the number of external jars you can import into an application. Do a google search for CR064391_610sp2.jar for more details on that. Anyway, we cannot upgrade to a new version soon, which means we have to reduce the number of libs we import. It sucks, but its reality. :( --- Alex Shneyderman [EMAIL PROTECTED] wrote: Use JSTL's formatDate tag. Very easy to use and lets you format your date any way you want it. Example: fmt:formatDate value=${yourDate} pattern=-MM-dd HH:mm / it is that simple. Alex. -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:30 AM To: [EMAIL PROTECTED] Subject: [Q] Struts and date formatters I am using the bean:write tag and for date fields (java.util.Date), I get the (rather ugly) full: Wed Aug 06 12:08:07 CEST 2003 I have tried to do: DateFormdat df = DateFormat.getDateTimeInstance(); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(-MM-dd hh:mm); But it gets ignored how/where can I change the default pattern that struts uses to format dates with? Thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
RE: [ANNOUNCE] Struts Console v4.0
In my eclipse version (Version: 2.1.0, Build id: 200306051737) it runs fine, after I renamed struts-console.jar (in the lib-dir) to console.jar (this name is referenced in plugin.xml. James, I tried version 4 in WSAD 4.0.3 and received errors. Version 3.6 worked fine. Does this new version have a dependency on a newer version of Eclipse? Simon -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 10:29 PM To: 'Struts Users Mailing List' Subject: [ANNOUNCE] Struts Console v4.0 Struts Console version 4.0 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-4.0.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-4.0.tar.gz Struts Console is FREE software. This release most notably adds support for editing JSP Tag Library files (*.tld) and fixes the long running JBuilder plugin problems. Changes with Struts Console v4.0 *) Fixed long running bug where Struts Console's version of JDOM library conflicted with that used by JBuilder. *) Fixed bug where updating Global Constants in Validator config wasn't marking file as changed. *) Fixed Console to properly save files as UTF-8 instead of system encoding. *) Fixed IDEA plugin to properly refresh config file in text editor when changes are made with Console. In doing so, improved plugin performance greatly. *) Fixed a couple of very minor bugs in IDEA plugin. *) Fixed bug where using Escape key or Cancel button to close dialogs would sometimes lead to new elements being created erroneously. *) Added support for editing JSP Tag Library (*.tld) files. *) Added support for bean element in Tiles config files. *) Added instructions to IDEA plugin for newbies. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ - 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] -- +++ GMX - Mail, Messaging more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]