Re: message resources ???key??? displaying
Hi, That was the correct path, I didn´t know about it. Thank you for your answers, guys. ;-) - Original Message - From: "Lukasz Lenart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, July 14, 2008 8:22 PM Subject: Re: message resources ???key??? displaying The ApplicationResources.properties file is under: proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties Move to the /WEB-INF/classes Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources ???key??? displaying
> The ApplicationResources.properties file is under: > proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties Move to the /WEB-INF/classes Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources ???key??? displaying
I got the same problem a few moments ago I put the ApplicationResources.properties file under WEB-INF/classes and it worked ok 2008/7/14 <[EMAIL PROTECTED]>: > It is configured as: > > struts-config.xml > > > In web.xml is not defined. > > The ApplicationResources.properties file is under: > proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties > > And the jsp code: > > > > > > > > Is something wrong about the path/classpath? Do I need to add a key to > ?? > > Regards, > > > - Original Message - From: "Lukasz Lenart" > <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Monday, July 14, 2008 6:32 PM > Subject: Re: message resources ???key??? displaying > > >> Hi, >> >> How did you configure the messages in struts-config? It should be >> something like this: >> >> >> >> >> Regards >> -- >> Lukasz >> http://www.lenart.org.pl/ >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> Email procesado por MailFoundry >> > > > - > 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: message resources ???key??? displaying
It is configured as: struts-config.xml In web.xml is not defined. The ApplicationResources.properties file is under: proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties And the jsp code: Is something wrong about the path/classpath? Do I need to add a key to ?? Regards, - Original Message - From: "Lukasz Lenart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, July 14, 2008 6:32 PM Subject: Re: message resources ???key??? displaying Hi, How did you configure the messages in struts-config? It should be something like this: Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources ???key??? displaying
Hi, How did you configure the messages in struts-config? It should be something like this: Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Re: Re: Re: Message resources configuration
Hi again, I wrote: >> Hi, >> >> Laurie Harper wrote: >> >> Sebastian Göttschkes wrote: >> >> >> Laurie Harper wrote: >> >> >> Sebastian Göttschkes wrote: >> >> >>> [...] >> >> >>> >> >> >>> I defined the message resources in the struts-config.xml: >> >> >>> >> >> >>> > >> >>> parameter="com.equitystory.pms.resources.ApplicationResources" /> >> >> >>> >> >> >>> [...] >> >> > >> >> > The strange thing is I didn't change anything except for the two empty >> >> > files I created. So I can say that the problem isn't hard-coded text in >> >> > the application or messages missing in one or the other resource. Maybe >> >> > I got something wrong with the configuration? Is there another file >> >> > where I have to configurate something related to the message resources >> >> > except for the struts-config.xml I mentioned above? >> >> >> >> >> >> Nope, that one configuration point is all there is. Check the properties >> >> files are actually being deployed to the correct place, that there >> >> aren't stale copies elsewhere on the classpath or in any JAR files >> >> you've packaged, etc. >> >> I checked everything you mentioned and there is no improvement. >> >> >> >> >> Failing that, you might try increasing Struts' logging level to DEBUG >> >> and see if there are any hints as to what's going wrong in the logs. >> >> After playing around a bit with my firefox and chaging the locale settings >> via locale switcher to en-US it's working. I don't know why, but now it's >> also working in my english browser. >> I'm a bit confused why it's working now and why it didn't worked before. >> Maybe it's because I deployed the whole app again after removing the whole >> context and building it again. >> I'm going to test the app and if it's working now, I'm fine with that. If >> it's not working properly, I'll get back to you. Ok, after testing the app I now know more about the behavoirs of the app. When the first browser launching the app after restarting the server is german, only german works fine. When afterwards connecting with an english browser, the errors I expected at first are all there. But when I connect with the english browser first after restarting the server, everything is just fine. I can change the browsers and both english and german are working. So what is happening? I'll have a deeper look at the debug log files from log4j tomorrow. Maybe anyone knows something about this problem and can help me. I don't really know what is happening here and what I'm trying to find in the logs ;-) Thanks and Regards, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Re: Re: Message resources configuration
Hi, Laurie Harper wrote: >> Sebastian Göttschkes wrote: >> >> Laurie Harper wrote: >> >> Sebastian Göttschkes wrote: >> >>> [...] >> >>> >> >>> I defined the message resources in the struts-config.xml: >> >>> >> >>> > >>> parameter="com.equitystory.pms.resources.ApplicationResources" /> >> >>> >> >>> [...] >> > >> > The strange thing is I didn't change anything except for the two empty >> > files I created. So I can say that the problem isn't hard-coded text in >> > the application or messages missing in one or the other resource. Maybe I >> > got something wrong with the configuration? Is there another file where I >> > have to configurate something related to the message resources except for >> > the struts-config.xml I mentioned above? >> >> >> Nope, that one configuration point is all there is. Check the properties >> files are actually being deployed to the correct place, that there >> aren't stale copies elsewhere on the classpath or in any JAR files >> you've packaged, etc. I checked everything you mentioned and there is no improvement. >> >> Failing that, you might try increasing Struts' logging level to DEBUG >> and see if there are any hints as to what's going wrong in the logs. After playing around a bit with my firefox and chaging the locale settings via locale switcher to en-US it's working. I don't know why, but now it's also working in my english browser. I'm a bit confused why it's working now and why it didn't worked before. Maybe it's because I deployed the whole app again after removing the whole context and building it again. I'm going to test the app and if it's working now, I'm fine with that. If it's not working properly, I'll get back to you. Thanks for your help, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Re: Message resources configuration
Sebastian Göttschkes wrote: Laurie Harper wrote: Sebastian Göttschkes wrote: [...] I defined the message resources in the struts-config.xml: [...] The strange thing is I didn't change anything except for the two empty files I created. So I can say that the problem isn't hard-coded text in the application or messages missing in one or the other resource. Maybe I got something wrong with the configuration? Is there another file where I have to configurate something related to the message resources except for the struts-config.xml I mentioned above? Nope, that one configuration point is all there is. Check the properties files are actually being deployed to the correct place, that there aren't stale copies elsewhere on the classpath or in any JAR files you've packaged, etc. Failing that, you might try increasing Struts' logging level to DEBUG and see if there are any hints as to what's going wrong in the logs. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Re: Message resources configuration
Hi, >Laurie Harper wrote: > >Sebastian Göttschkes wrote: >> Hi, >> >> I'm experiencing strange behaviours with the message resources and I'm not >> sure about where to find the problem. >> >> I defined the message resources in the struts-config.xml: >> >> > parameter="com.equitystory.pms.resources.ApplicationResources" /> >> >> In the folder named in the xml >> (Resources/src/com/equitystory/pms/resources/), I created the following >> files: >> ApplicationResources.properties >> ApplicationResources_de.properties >> >> When accessing the application with a browser "speaking" "de", I see the >> correct messages, but sometimes log4j is telling me that >> ApplicationResources_de_DE.properties is missing. I created this file and >> left it empty. >> When accessing the application with an browser "pseaking" "en", the >> application is mixed up with german and english messages (as defined in the >> ApplicationResources). I created ApplicationResources_en.properties and left >> it empty, and now everything works fine. >> >> The problem I now got is what happens if someone with a browser "speaking" >> another language is accessing the application? It would be great if there >> would be an easier solution with just the two files I named above and struts >> using the default file if there is no language-specific file (e.g. >> "ApplicationResources_de.properties" for every browser speaking "de" and >> "ApplicationResources.properties" for all other languages). > >Everything *should* work just as you describe... You shouldn't need the >empty files, and resource lookup should automatically walk 'up' the >hierarchy from ApplicationResources_de_DE.properties to >ApplicationResources_de.properties to ApplicationResources.properties, >skipping files that don't exist and using the messages defined in the >most specific file that *does* exist. >I would suggest deleting your empty files and then trying to determine >why you get a mixture of English and German when you're expecting to get >everything in one language or the other. It sounds like a problem with >how you have internationalized and/or localized the application -- e.g. >maybe you have some of your messages hard-coded still, or messages >missing from one of the properties files. The strange thing is I didn't change anything except for the two empty files I created. So I can say that the problem isn't hard-coded text in the application or messages missing in one or the other resource. Maybe I got something wrong with the configuration? Is there another file where I have to configurate something related to the message resources except for the struts-config.xml I mentioned above? Thanks, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message resources configuration
Sebastian Göttschkes wrote: Hi, I'm experiencing strange behaviours with the message resources and I'm not sure about where to find the problem. I defined the message resources in the struts-config.xml: In the folder named in the xml (Resources/src/com/equitystory/pms/resources/), I created the following files: ApplicationResources.properties ApplicationResources_de.properties When accessing the application with a browser "speaking" "de", I see the correct messages, but sometimes log4j is telling me that ApplicationResources_de_DE.properties is missing. I created this file and left it empty. When accessing the application with an browser "pseaking" "en", the application is mixed up with german and english messages (as defined in the ApplicationResources). I created ApplicationResources_en.properties and left it empty, and now everything works fine. The problem I now got is what happens if someone with a browser "speaking" another language is accessing the application? It would be great if there would be an easier solution with just the two files I named above and struts using the default file if there is no language-specific file (e.g. "ApplicationResources_de.properties" for every browser speaking "de" and "ApplicationResources.properties" for all other languages). Everything *should* work just as you describe... You shouldn't need the empty files, and resource lookup should automatically walk 'up' the hierarchy from ApplicationResources_de_DE.properties to ApplicationResources_de.properties to ApplicationResources.properties, skipping files that don't exist and using the messages defined in the most specific file that *does* exist. I would suggest deleting your empty files and then trying to determine why you get a mixture of English and German when you're expecting to get everything in one language or the other. It sounds like a problem with how you have internationalized and/or localized the application -- e.g. maybe you have some of your messages hard-coded still, or messages missing from one of the properties files. HTH, L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources in struts.xml
Also in jsp I have I also see a line in tomcat where its loading MessageResources.properties file now if I remove name tag from s:bean it compains cuz name is required but at the same time I don't know what should go in name attribute. On 8/23/07, Pavel Sapozhnikov <[EMAIL PROTECTED]> wrote: > > Oh great. Thank you very much. Do I need to include any jars or what not > > On 8/23/07, Jiang, Jane (NIH/NCI) [C] < [EMAIL PROTECTED]> wrote: > > > > I think it is the value of struts.custom.i18n.resources in > > struts.properties. You can also put it in struts.xml as > > > /> > > > > -Original Message- > > From: Pavel Sapozhnikov [mailto: [EMAIL PROTECTED] > > Sent: Thursday, August 23, 2007 2:14 PM > > To: Struts Users Mailing List > > Subject: message resources in struts.xml > > > > Hi I have a question in Struts 1 in struts-config.xml I have: > > > > > > > > What would the equivalent be in Struts2 > > > > Thank you > > > > -- > > Pavel Sapozhnikov > > xFact, Inc > > [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Pavel Sapozhnikov > xFact, Inc > [EMAIL PROTECTED] > -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
Re: message resources in struts.xml
Oh great. Thank you very much. Do I need to include any jars or what not On 8/23/07, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote: > > I think it is the value of struts.custom.i18n.resources in > struts.properties. You can also put it in struts.xml as > /> > > -Original Message- > From: Pavel Sapozhnikov [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 23, 2007 2:14 PM > To: Struts Users Mailing List > Subject: message resources in struts.xml > > Hi I have a question in Struts 1 in struts-config.xml I have: > > > > What would the equivalent be in Struts2 > > Thank you > > -- > Pavel Sapozhnikov > xFact, Inc > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
RE: message resources in struts.xml
I think it is the value of struts.custom.i18n.resources in struts.properties. You can also put it in struts.xml as -Original Message- From: Pavel Sapozhnikov [mailto:[EMAIL PROTECTED] Sent: Thursday, August 23, 2007 2:14 PM To: Struts Users Mailing List Subject: message resources in struts.xml Hi I have a question in Struts 1 in struts-config.xml I have: What would the equivalent be in Struts2 Thank you -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
Kranti wrote: hi, i have a problem related to message resources during the login time i am doing this session.setAttribute(Globals.LOCALE_KEY, locale); where locale is created by the user specific language settings there in DB. in jsp: using this and in struts config file and inthe same directory i have other ApplicationResources files also for different languages. But its not picking the properties from diff files when we change the language settings..eventhough i updated the session attribute for LOCALE_KEY What properties files do you have? Where are they deployed withing the WAR file? and what value are you setting for Globals.LOCALE_KEY? Most likely there's a mis-match between the locale you're setting and the naming of the properties files so that Struts isn't finding the file you want it to. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources
Internally the DynaForm (i.e. DynaBean) uses a Map to store the properties. This is what allows it to provide dynamic properties and save you from writing ActionForm subclasses. When you reference myDynaForm with a JSP Expression Language (EL) expression like ${myDynaForm.description} reflection is used to call a getter method (in this case getDescription() on the instance (myDynaForm). So... ${myDynaForm.description} is equivalent to myDynaForm.getDescription() The DynaForm class does not have this method. It does however have a method public Map getMap() which returns the Map used to store your properties. So, by putting ${myDynaForm.map.description} the equivalent is myDynaForm.getMap().get("description") which will return your property. When using the struts bean tags such as bean write the tags are aware of the DynaBean, and therefore know that they need to get the underlying Map, then call get(String) using the supplied property. Make sense? -Adam -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 9:47 AM To: Struts Users Mailing List Subject: Re: message resources > > When using EL with dyna beans you need to reference the map property > then your property. The struts tags (i.e. bean:write) handle this for > you. > >
Re: message resources
Marcus wrote: >> When using EL with dyna beans you need to reference the map property >> then your property. The struts tags (i.e. bean:write) handle this for >> you. >> >> > Or do you really mean a map? I am not using one.. ...but you're using a DynaForm, so you are, so just do what he said ;) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
When using EL with dyna beans you need to reference the map property then your property. The struts tags (i.e. bean:write) handle this for you. Sorry, call me dumb, but I didn't really get what you tried to explain. EL ? - map property - you mean my dynaForm? Or do you really mean a map? I am not using one.. Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources
When using EL with dyna beans you need to reference the map property then your property. The struts tags (i.e. bean:write) handle this for you. -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 9:28 AM To: Struts Users Mailing List Subject: Re: message resources > Nope... That means Servlet spec 2.2, which is less than you need ;) > > Pre-advice caveat: I've never figured out XML, DOCTYPEs, and people > make fun of me for it. > > 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";> > > Try that and see what happens... You can always do a sanity check JSP > page by displaying something you know to be a scoped value. Now I get thrown an error that it can't find the value! yaho! ;-) javax.servlet.ServletException: Unable to find a value for "description" in object of class "org.apache.struts.validator.DynaValidatorForm" using operator "." However, this does work!!! ??? Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Paychex, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
Nope... That means Servlet spec 2.2, which is less than you need ;) Pre-advice caveat: I've never figured out XML, DOCTYPEs, and people make fun of me for it. 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";> Try that and see what happens... You can always do a sanity check JSP page by displaying something you know to be a scoped value. Now I get thrown an error that it can't find the value! yaho! ;-) javax.servlet.ServletException: Unable to find a value for "description" in object of class "org.apache.struts.validator.DynaValidatorForm" using operator "." However, this does work!!! ??? Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
Marcus wrote: > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > 2.2 means 2.0-ish, I assume? Nope... That means Servlet spec 2.2, which is less than you need ;) Pre-advice caveat: I've never figured out XML, DOCTYPEs, and people make fun of me for it. 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";> Try that and see what happens... You can always do a sanity check JSP page by displaying something you know to be a scoped value. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> 2.2 means 2.0-ish, I assume? Marcus Dave Newton schrieb: Marcus wrote: Any ideas? What does your web.xml DOCTYPE look like? Irritatingly enough, you have to tell Tomcat to go ahead and be 2.0-ish. Dave - 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: message resources
Marcus wrote: > Any ideas? What does your web.xml DOCTYPE look like? Irritatingly enough, you have to tell Tomcat to go ahead and be 2.0-ish. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
Mine is to either use a JSP 2.0 container so the original EL suggestion ${myBean.value} EL will work, or use the struts-el tags if you're using a < JSP 2.0 container, which will do the same thing in a different way. I am using Apache Tomcat 5.5, and AFAIK, it does support JSP 2.0. For "myBean" I used my dynaActionForm - but it didn't work. My struts-config: My properties file: valueAdded=Value {0} added. My JSP: value="true"> arg0="${MyDynaActionForm.description}"/> Any ideas? Thx, Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
> From: Marcus [mailto:[EMAIL PROTECTED] > > Value "myValue" has been added. > (With the value of "myValue" printed!) > Anyway, you've gotten a lot of... advice. Mine is to either use a JSP 2.0 container so the original EL suggestion ${myBean.value} EL will work, or use the struts-el tags if you're using a < JSP 2.0 container, which will do the same thing in a different way. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
>It's awfull, but assuming you have myDynaForm in some scope should work Yes, indeed! ;-) Isn't there something more struts like (using tags..) Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
Marcus wrote: > I wrote: And it returns literally: ${myDynaForm.value} Sorry, thought bean:message was supporting el notation :) try this It's awfull, but assuming you have myDynaForm in some scope should work - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources
It will be displayed as a message only. For code-cleaning purpose, since it gives an incorrect interpretation, you can achieve the same result by slightly manipulating this code. Try replacing ActionErrors with ActionMessages In jsp also, replace with It should work. Actually I had that implementation for error messages in my project. So, I just sent that code to you :) -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 3:01 PM To: Struts Users Mailing List Subject: Re: message resources >In your Action class, add following statements before return statement: >ActionMessages oMsgs = new ActionErrors(); > oMsgs.add(ActionMessages.GLOBAL_MESSAGE, >new ActionMessage("myValueAdded", "")); >saveErrors(oRequest.getSession(), oMsgs); >In your jsp, you must be having >It will work. It's not an error, it's just a message to the user. Marcus - 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: message resources
In your Action class, add following statements before return statement: ActionMessages oMsgs = new ActionErrors(); oMsgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("myValueAdded", "")); saveErrors(oRequest.getSession(), oMsgs); In your jsp, you must be having It will work. It's not an error, it's just a message to the user. Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources
In your Action class, add following statements before return statement: ActionMessages oMsgs = new ActionErrors(); oMsgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("myValueAdded", "")); saveErrors(oRequest.getSession(), oMsgs); In your jsp, you must be having It will work. -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 2:44 PM To: Struts Users Mailing List Subject: Re: message resources > I wrote: And it returns literally: ${myDynaForm.value} >What do you have in the java class for the value you want to put in your >message, is it a has table or something else ? It's all just plain simple. I store my value in a dynaForm, forward to an action, compute stuff, forward to to a jsp, and then I want to print Value "YOURVALUE" has been added. >What do you mean by " Action adds value"?? >Where does Action add this value? My Action stores the value in a database, that's basically all it does. On the jsp, I want to show the user that storing the value worked, and as a "proof" I want to redisplay the value the user typed in. Marcus - 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: message resources
> I wrote: And it returns literally: ${myDynaForm.value} What do you have in the java class for the value you want to put in your message, is it a has table or something else ? It's all just plain simple. I store my value in a dynaForm, forward to an action, compute stuff, forward to to a jsp, and then I want to print Value "YOURVALUE" has been added. What do you mean by " Action adds value"?? Where does Action add this value? My Action stores the value in a database, that's basically all it does. On the jsp, I want to show the user that storing the value worked, and as a "proof" I want to redisplay the value the user typed in. Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources
Hi, What do you have in the java class for the value you want to put in your message, is it a has table or something else ? Olivier. -Message d'origine- De : Marcus [mailto:[EMAIL PROTECTED] Envoyé : jeudi 8 juin 2006 10:58 À : Struts Users Mailing List Objet : Re: message resources >Pass the argument {0} as follows: > I tried that, but then it writes literally: Value value has been added. But what need the VALUE of hte variable "myValue" to be printed. :-( Marcus - 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: message resources
What do you mean by " Action adds value"?? Where does Action add this value? -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 2:30 PM To: Struts Users Mailing List Subject: Re: message resources >Where do you want to print this message ? I type in my value into a textbox. Forward to action. Action adds value, forwards to jsp. Now jsp should say: Value "myValue" has been added. (With the value of "myValue" printed!) >What type of data do you use ? Strings Marcus - 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: message resources
Try using -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 2:28 PM To: Struts Users Mailing List Subject: Re: message resources >Pass the argument {0} as follows: > I tried that, but then it writes literally: Value value has been added. But what need the VALUE of hte variable "myValue" to be printed. :-( Marcus - 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: message resources
Marcus wrote: Pass the argument {0} as follows: I tried that, but then it writes literally: Value value has been added. But what need the VALUE of hte variable "myValue" to be printed. :-( Marcus - 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: message resources
I'm assuming that there is a key-value pair defined in your message-resources (.properties) file as follows: myValueAdded=my value {0} has been added. And that you want to print a value at location {0} to be passed from some jsp or some other file. Moreover, you can pass upto 5 arguments using arg0, arg1, .., arg4 in the same manner. HTH, Mukta. -Original Message- From: Mukta [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 1:40 PM To: 'Struts Users Mailing List' Subject: RE: message resources Pass the argument {0} as follows: -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 1:32 PM To: Struts Users Mailing List Subject: message resources Hi, I want to print a message like this: myValueAdded=my value{0} has been added. How can I fill in the corresponding value? Thx, Marcus - 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]
Re: message resources
Where do you want to print this message ? I type in my value into a textbox. Forward to action. Action adds value, forwards to jsp. Now jsp should say: Value "myValue" has been added. (With the value of "myValue" printed!) What type of data do you use ? Strings Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources
Pass the argument {0} as follows: I tried that, but then it writes literally: Value value has been added. But what need the VALUE of hte variable "myValue" to be printed. :-( Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources
Hi Marcus, Where do you want to print this message ? What type of data do you use ? Regards, Olivier -Message d'origine- De : Marcus [mailto:[EMAIL PROTECTED] Envoyé : jeudi 8 juin 2006 10:02 À : Struts Users Mailing List Objet : message resources Hi, I want to print a message like this: myValueAdded=my value{0} has been added. How can I fill in the corresponding value? Thx, Marcus - 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: message resources
Pass the argument {0} as follows: -Original Message- From: Marcus [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 1:32 PM To: Struts Users Mailing List Subject: message resources Hi, I want to print a message like this: myValueAdded=my value{0} has been added. How can I fill in the corresponding value? Thx, Marcus - 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: message-resources key/parameter
Thanks Niall, That was very helpful. I have another issue with my validator.xml. Based on my investigation, I have configured everything correctly. But there must be something wrong with this basic and barebone validator.xml file, because even if I change the form name to something bogus, I don't get any sort of errors. So I think for some reason, my form name in struts-config doesn't map to the form name in validation.xml. Note: - I'm using tiles. Do I need to do anything in my tiles-defs.xml. - Also, I'm using Struts 1.1 (although even though I'm using 1.1 I needed to add the commons-validator.jar to my classpath) Here is my entire validation.xml: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";> /form-validation> From my struts-config.xml Niall Pemberton <[EMAIL PROTECTED]> wrote: This explains how "key" is used: http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section6 In respect of validator, although it has had a "bundle" attribute (which is the same as "key" in struts-config.xml) for a while, it was only actually supported since Struts 1.2.7 and Validator 1.1.4: http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section7_2 Niall On 5/10/06, josh t wrote: > > > > Can someone please explain to me how and where in my code I need to refer to > message-resources key? When doing validation, how does the validator know > where to loopup the ApplicationResources? Do I need to include the key > somwhere in my validator.xml? > > Thanks! > > > > > - > Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Get amazing travel prices for air and hotel in one click on Yahoo! FareChase
Re: message-resources key/parameter
This explains how "key" is used: http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section6 In respect of validator, although it has had a "bundle" attribute (which is the same as "key" in struts-config.xml) for a while, it was only actually supported since Struts 1.2.7 and Validator 1.1.4: http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section7_2 Niall On 5/10/06, josh t <[EMAIL PROTECTED]> wrote: Can someone please explain to me how and where in my code I need to refer to message-resources key? When doing validation, how does the validator know where to loopup the ApplicationResources? Do I need to include the key somwhere in my validator.xml? Thanks! - Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Message Resources from DB
Actually I saw that one and never was able to get it running. And you are certainly right that I wouldn't want to have any jndi or sql references in my struts config. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 5:15 PM To: Struts Users Mailing List Subject: RE: Message Resources from DB I got one of these solutions out and it talks about setting up the resource like this: 1. I do not want to put jndi information in my struts 2. I do not want to put any SQL or SQL-Like pieces into my struts. So, is there a way to configure this to call a Service Object instead of the "JNDI | SQL" above? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 3:56 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB No, you are not wrong. Struts will likely be changed to use Commons Resources after a 1.3.x goes "GA". Of course, Commons Resources needs to go "GA" itself soon. I have already written several Database implementations for Commons Resources (Hibernate, iBatis, JDBC-only). However, some of that work is not checked into SVN and some of it (at the time it was written) was not allowed in SVN due to incompatible licensing with ASL. I don't really have a lot of free time to assist, but I'll do what I can. Are you using any O/R frameworks or are you just doing straight jdbc? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 4:08 PM, Brian Russell wrote: > I got James's solution from: > > http://sourceforge.net/project/showfiles.php? > group_id=49385&package_id=7 > 6369 > > I also found another solution at: > > http://sourceforge.net/project/showfiles.php? > group_id=49385&package_id=1 > 49742 > > And I know the team is working on a solution to be included in > Commons-Resources and hopefully Struts 1.3.. but I may be wrong about > that. > > Brian Russell > www.closerware.com > > > -Original Message- > From: Mick Knutson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 4:00 PM > To: Struts Users Mailing List > Subject: RE: Message Resources from DB > > Can you send me the solution to that? I don't have that book, I > have an > older version without that solution. > > -Original Message- > From: Brian Russell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 12:58 PM > To: 'Struts Users Mailing List' > Subject: RE: Message Resources from DB > > Ah.. the man himself! I'm using MySql. I set up my database with the > tables from the scripts in the /sql directory. And of course did the > rest of the steps (i.e. updating struts-config, placing xml files in > /WEB-INF/classes dir, etc.) > > Thanks! > > Brian Russell > www.closerware.com > > > -Original Message- > From: James Mitchell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 3:47 PM > To: Struts Users Mailing List > Subject: Re: Message Resources from DB > > What database would you like to use? > > -- > James Mitchell > 678.910.8017 > Skpe: jmitchtx > > > > On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: > >> I know this topic has come up before but.. Does anyone have a >> suggestion >> on a method for pulling Message Resources from a DB, as well as >> making >> sure a restart of the app isn't required when the message key/ >> value is >> updated in the db? Is there a recommended, working, solution out >> there >> (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? >> >> I tried to implement the solution found in "Jakarta Struts Cookbook" >> Chapter 2 Section 7 "Accessing Message Resources from a Database". As >> you may know, the OJB Message Resources distribution by James >> Mitchell >> requires an OJB jar to be available to a webapp attempting to use >> this >> approach. However, I am unable to pin down exactly what version of >> OJB >> is required to work with this solution. I have currently tried 0.9.4, >> 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found >> errors >> on any that I choose. >> >> My current environment is as such: >> >> Java: 1.5.0_05 >> Tomcat: 4.1.29 >> Mysql: 3.2.3.58 >> Struts: 1.2.7 >> >> If anyone has been able to implement this and can give me a >> recommended >> solution, that would be great. >> >> Thank you. >> >> Brian Russell >> www.closerware.com >> >> >> >> >>
RE: Message Resources from DB
I got one of these solutions out and it talks about setting up the resource like this: 1. I do not want to put jndi information in my struts 2. I do not want to put any SQL or SQL-Like pieces into my struts. So, is there a way to configure this to call a Service Object instead of the "JNDI | SQL" above? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 3:56 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB No, you are not wrong. Struts will likely be changed to use Commons Resources after a 1.3.x goes "GA". Of course, Commons Resources needs to go "GA" itself soon. I have already written several Database implementations for Commons Resources (Hibernate, iBatis, JDBC-only). However, some of that work is not checked into SVN and some of it (at the time it was written) was not allowed in SVN due to incompatible licensing with ASL. I don't really have a lot of free time to assist, but I'll do what I can. Are you using any O/R frameworks or are you just doing straight jdbc? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 4:08 PM, Brian Russell wrote: > I got James's solution from: > > http://sourceforge.net/project/showfiles.php? > group_id=49385&package_id=7 > 6369 > > I also found another solution at: > > http://sourceforge.net/project/showfiles.php? > group_id=49385&package_id=1 > 49742 > > And I know the team is working on a solution to be included in > Commons-Resources and hopefully Struts 1.3.. but I may be wrong about > that. > > Brian Russell > www.closerware.com > > > -Original Message- > From: Mick Knutson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 4:00 PM > To: Struts Users Mailing List > Subject: RE: Message Resources from DB > > Can you send me the solution to that? I don't have that book, I > have an > older version without that solution. > > -Original Message- > From: Brian Russell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 12:58 PM > To: 'Struts Users Mailing List' > Subject: RE: Message Resources from DB > > Ah.. the man himself! I'm using MySql. I set up my database with the > tables from the scripts in the /sql directory. And of course did the > rest of the steps (i.e. updating struts-config, placing xml files in > /WEB-INF/classes dir, etc.) > > Thanks! > > Brian Russell > www.closerware.com > > > -Original Message- > From: James Mitchell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 3:47 PM > To: Struts Users Mailing List > Subject: Re: Message Resources from DB > > What database would you like to use? > > -- > James Mitchell > 678.910.8017 > Skpe: jmitchtx > > > > On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: > >> I know this topic has come up before but.. Does anyone have a >> suggestion >> on a method for pulling Message Resources from a DB, as well as >> making >> sure a restart of the app isn't required when the message key/ >> value is >> updated in the db? Is there a recommended, working, solution out >> there >> (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? >> >> I tried to implement the solution found in "Jakarta Struts Cookbook" >> Chapter 2 Section 7 "Accessing Message Resources from a Database". As >> you may know, the OJB Message Resources distribution by James >> Mitchell >> requires an OJB jar to be available to a webapp attempting to use >> this >> approach. However, I am unable to pin down exactly what version of >> OJB >> is required to work with this solution. I have currently tried 0.9.4, >> 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found >> errors >> on any that I choose. >> >> My current environment is as such: >> >> Java: 1.5.0_05 >> Tomcat: 4.1.29 >> Mysql: 3.2.3.58 >> Struts: 1.2.7 >> >> If anyone has been able to implement this and can give me a >> recommended >> solution, that would be great. >> >> Thank you. >> >> Brian Russell >> www.closerware.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] > > &
Re: Message Resources from DB
Dear Brian, I have some Source code regarding the issue of getting Message resource from DB.Also some excerpts gathered from various forums written in "forumsum.txt". I hope it will help you. Regards, Shailesh Barde [EMAIL PROTECTED] Alphonso Informex Pvt. Ltd., Pune(India) 9890799722 On Thu, 17 Nov 2005 Brian Russell wrote : >I know this topic has come up before but.. Does anyone have a suggestion >on a method for pulling Message Resources from a DB, as well as making >sure a restart of the app isn't required when the message key/value is >updated in the db? Is there a recommended, working, solution out there >(i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? > >I tried to implement the solution found in Jakarta Struts Cookbook >Chapter 2 Section 7 Accessing Message Resources from a Database. As >you may know, the OJB Message Resources distribution by James Mitchell >requires an OJB jar to be available to a webapp attempting to use this >approach. However, I am unable to pin down exactly what version of OJB >is required to work with this solution. I have currently tried 0.9.4, >1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found errors >on any that I choose. > >My current environment is as such: > >Java: 1.5.0_05 >Tomcat: 4.1.29 >Mysql: 3.2.3.58 >Struts: 1.2.7 > >If anyone has been able to implement this and can give me a recommended >solution, that would be great. > >Thank you. > >Brian Russell >www.closerware.com > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >
RE: Message Resources from DB
I am using straight jdbc. I downloaded the latest from cvs for commons-resource, and built the jar.. but have yet to fool around with it. I had emailed Bill Siggelkow and he let me know about the Commons Resources, and although he wasn't sure of its status he did give me this advice: "The only thing you will then have to do is write your own MessageResourceFactory that adapts the Resources MessagesResourceFactory to the Struts MessageResourcesFactory. These classes are near identical (the Commons Resource one was based on the Struts one) so you can probably just delegate your adapter to the Commons Resources one." So I'm going to take a look and see if I can work it into my struts app, otherwise I'll just stick with the old fashion way and wait for the commons-resources pkg to go "GA". That's great news that it'll likely be included in 1.3.x! Thanks! Brian Russell www.closerware.com -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 6:56 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB No, you are not wrong. Struts will likely be changed to use Commons Resources after a 1.3.x goes "GA". Of course, Commons Resources needs to go "GA" itself soon. I have already written several Database implementations for Commons Resources (Hibernate, iBatis, JDBC-only). However, some of that work is not checked into SVN and some of it (at the time it was written) was not allowed in SVN due to incompatible licensing with ASL. I don't really have a lot of free time to assist, but I'll do what I can. Are you using any O/R frameworks or are you just doing straight jdbc? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 4:08 PM, Brian Russell wrote: > I got James's solution from: > > http://sourceforge.net/project/showfiles.php? > group_id=49385&package_id=7 > 6369 > > I also found another solution at: > > http://sourceforge.net/project/showfiles.php? > group_id=49385&package_id=1 > 49742 > > And I know the team is working on a solution to be included in > Commons-Resources and hopefully Struts 1.3.. but I may be wrong about > that. > > Brian Russell > www.closerware.com > > > -Original Message----- > From: Mick Knutson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 4:00 PM > To: Struts Users Mailing List > Subject: RE: Message Resources from DB > > Can you send me the solution to that? I don't have that book, I > have an > older version without that solution. > > -Original Message- > From: Brian Russell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 12:58 PM > To: 'Struts Users Mailing List' > Subject: RE: Message Resources from DB > > Ah.. the man himself! I'm using MySql. I set up my database with the > tables from the scripts in the /sql directory. And of course did the > rest of the steps (i.e. updating struts-config, placing xml files in > /WEB-INF/classes dir, etc.) > > Thanks! > > Brian Russell > www.closerware.com > > > -Original Message- > From: James Mitchell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 3:47 PM > To: Struts Users Mailing List > Subject: Re: Message Resources from DB > > What database would you like to use? > > -- > James Mitchell > 678.910.8017 > Skpe: jmitchtx > > > > On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: > >> I know this topic has come up before but.. Does anyone have a >> suggestion >> on a method for pulling Message Resources from a DB, as well as >> making >> sure a restart of the app isn't required when the message key/ >> value is >> updated in the db? Is there a recommended, working, solution out >> there >> (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? >> >> I tried to implement the solution found in "Jakarta Struts Cookbook" >> Chapter 2 Section 7 "Accessing Message Resources from a Database". As >> you may know, the OJB Message Resources distribution by James >> Mitchell >> requires an OJB jar to be available to a webapp attempting to use >> this >> approach. However, I am unable to pin down exactly what version of >> OJB >> is required to work with this solution. I have currently tried 0.9.4, >> 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found >> errors >> on any that I choose. >> >> My current environment is as such: >> >> Java: 1.5.0_05 >> Tomcat: 4.1.29 >> Mysql: 3.2.3.58 >> Struts: 1.2.7 >> >> If anyone has b
Re: Message Resources from DB
No, you are not wrong. Struts will likely be changed to use Commons Resources after a 1.3.x goes "GA". Of course, Commons Resources needs to go "GA" itself soon. I have already written several Database implementations for Commons Resources (Hibernate, iBatis, JDBC-only). However, some of that work is not checked into SVN and some of it (at the time it was written) was not allowed in SVN due to incompatible licensing with ASL. I don't really have a lot of free time to assist, but I'll do what I can. Are you using any O/R frameworks or are you just doing straight jdbc? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 4:08 PM, Brian Russell wrote: I got James's solution from: http://sourceforge.net/project/showfiles.php? group_id=49385&package_id=7 6369 I also found another solution at: http://sourceforge.net/project/showfiles.php? group_id=49385&package_id=1 49742 And I know the team is working on a solution to be included in Commons-Resources and hopefully Struts 1.3.. but I may be wrong about that. Brian Russell www.closerware.com -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 4:00 PM To: Struts Users Mailing List Subject: RE: Message Resources from DB Can you send me the solution to that? I don't have that book, I have an older version without that solution. -Original Message- From: Brian Russell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 12:58 PM To: 'Struts Users Mailing List' Subject: RE: Message Resources from DB Ah.. the man himself! I'm using MySql. I set up my database with the tables from the scripts in the /sql directory. And of course did the rest of the steps (i.e. updating struts-config, placing xml files in /WEB-INF/classes dir, etc.) Thanks! Brian Russell www.closerware.com -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 3:47 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB What database would you like to use? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: I know this topic has come up before but.. Does anyone have a suggestion on a method for pulling Message Resources from a DB, as well as making sure a restart of the app isn't required when the message key/ value is updated in the db? Is there a recommended, working, solution out there (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? I tried to implement the solution found in "Jakarta Struts Cookbook" Chapter 2 Section 7 "Accessing Message Resources from a Database". As you may know, the OJB Message Resources distribution by James Mitchell requires an OJB jar to be available to a webapp attempting to use this approach. However, I am unable to pin down exactly what version of OJB is required to work with this solution. I have currently tried 0.9.4, 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found errors on any that I choose. My current environment is as such: Java: 1.5.0_05 Tomcat: 4.1.29 Mysql: 3.2.3.58 Struts: 1.2.7 If anyone has been able to implement this and can give me a recommended solution, that would be great. Thank you. Brian Russell www.closerware.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] "MMS " made the following annotations. -- -- -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == == == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---
RE: Message Resources from DB
I got James's solution from: http://sourceforge.net/project/showfiles.php?group_id=49385&package_id=7 6369 I also found another solution at: http://sourceforge.net/project/showfiles.php?group_id=49385&package_id=1 49742 And I know the team is working on a solution to be included in Commons-Resources and hopefully Struts 1.3.. but I may be wrong about that. Brian Russell www.closerware.com -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 4:00 PM To: Struts Users Mailing List Subject: RE: Message Resources from DB Can you send me the solution to that? I don't have that book, I have an older version without that solution. -Original Message- From: Brian Russell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 12:58 PM To: 'Struts Users Mailing List' Subject: RE: Message Resources from DB Ah.. the man himself! I'm using MySql. I set up my database with the tables from the scripts in the /sql directory. And of course did the rest of the steps (i.e. updating struts-config, placing xml files in /WEB-INF/classes dir, etc.) Thanks! Brian Russell www.closerware.com -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 3:47 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB What database would you like to use? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: > I know this topic has come up before but.. Does anyone have a > suggestion > on a method for pulling Message Resources from a DB, as well as making > sure a restart of the app isn't required when the message key/value is > updated in the db? Is there a recommended, working, solution out there > (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? > > I tried to implement the solution found in "Jakarta Struts Cookbook" > Chapter 2 Section 7 "Accessing Message Resources from a Database". As > you may know, the OJB Message Resources distribution by James Mitchell > requires an OJB jar to be available to a webapp attempting to use this > approach. However, I am unable to pin down exactly what version of OJB > is required to work with this solution. I have currently tried 0.9.4, > 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found > errors > on any that I choose. > > My current environment is as such: > > Java: 1.5.0_05 > Tomcat: 4.1.29 > Mysql: 3.2.3.58 > Struts: 1.2.7 > > If anyone has been able to implement this and can give me a > recommended > solution, that would be great. > > Thank you. > > Brian Russell > www.closerware.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] "MMS " made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - 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: Message Resources from DB
Can you send me the solution to that? I don't have that book, I have an older version without that solution. -Original Message- From: Brian Russell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 12:58 PM To: 'Struts Users Mailing List' Subject: RE: Message Resources from DB Ah.. the man himself! I'm using MySql. I set up my database with the tables from the scripts in the /sql directory. And of course did the rest of the steps (i.e. updating struts-config, placing xml files in /WEB-INF/classes dir, etc.) Thanks! Brian Russell www.closerware.com -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 3:47 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB What database would you like to use? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: > I know this topic has come up before but.. Does anyone have a > suggestion > on a method for pulling Message Resources from a DB, as well as making > sure a restart of the app isn't required when the message key/value is > updated in the db? Is there a recommended, working, solution out there > (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? > > I tried to implement the solution found in "Jakarta Struts Cookbook" > Chapter 2 Section 7 "Accessing Message Resources from a Database". As > you may know, the OJB Message Resources distribution by James Mitchell > requires an OJB jar to be available to a webapp attempting to use this > approach. However, I am unable to pin down exactly what version of OJB > is required to work with this solution. I have currently tried 0.9.4, > 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found > errors > on any that I choose. > > My current environment is as such: > > Java: 1.5.0_05 > Tomcat: 4.1.29 > Mysql: 3.2.3.58 > Struts: 1.2.7 > > If anyone has been able to implement this and can give me a > recommended > solution, that would be great. > > Thank you. > > Brian Russell > www.closerware.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] "MMS " made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Message Resources from DB
Ah.. the man himself! I'm using MySql. I set up my database with the tables from the scripts in the /sql directory. And of course did the rest of the steps (i.e. updating struts-config, placing xml files in /WEB-INF/classes dir, etc.) Thanks! Brian Russell www.closerware.com -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 3:47 PM To: Struts Users Mailing List Subject: Re: Message Resources from DB What database would you like to use? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: > I know this topic has come up before but.. Does anyone have a > suggestion > on a method for pulling Message Resources from a DB, as well as making > sure a restart of the app isn't required when the message key/value is > updated in the db? Is there a recommended, working, solution out there > (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? > > I tried to implement the solution found in "Jakarta Struts Cookbook" > Chapter 2 Section 7 "Accessing Message Resources from a Database". As > you may know, the OJB Message Resources distribution by James Mitchell > requires an OJB jar to be available to a webapp attempting to use this > approach. However, I am unable to pin down exactly what version of OJB > is required to work with this solution. I have currently tried 0.9.4, > 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found > errors > on any that I choose. > > My current environment is as such: > > Java: 1.5.0_05 > Tomcat: 4.1.29 > Mysql: 3.2.3.58 > Struts: 1.2.7 > > If anyone has been able to implement this and can give me a > recommended > solution, that would be great. > > Thank you. > > Brian Russell > www.closerware.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources from DB
What database would you like to use? -- James Mitchell 678.910.8017 Skpe: jmitchtx On Nov 16, 2005, at 3:41 PM, Brian Russell wrote: I know this topic has come up before but.. Does anyone have a suggestion on a method for pulling Message Resources from a DB, as well as making sure a restart of the app isn't required when the message key/value is updated in the db? Is there a recommended, working, solution out there (i.e. OJB solution by James Mitchell, Commons-Resources, etc.)? I tried to implement the solution found in “Jakarta Struts Cookbook” Chapter 2 Section 7 “Accessing Message Resources from a Database”. As you may know, the OJB Message Resources distribution by James Mitchell requires an OJB jar to be available to a webapp attempting to use this approach. However, I am unable to pin down exactly what version of OJB is required to work with this solution. I have currently tried 0.9.4, 1.0.0, 1.0.1, 1.0.1, 1.0.3, with invalid class or class not found errors on any that I choose. My current environment is as such: Java: 1.5.0_05 Tomcat: 4.1.29 Mysql: 3.2.3.58 Struts: 1.2.7 If anyone has been able to implement this and can give me a recommended solution, that would be great. Thank you. Brian Russell www.closerware.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]
RE: Message Resources error
Hi, You can checkout archived messages on this issue at http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15779.html answered by Ted himself. Before preceeding do once again verify these things. 1. struts-config.xml has an entry for 'Message Resource Defintion' Ex: 2. This resource bundle should be in the classpath. An ideal place would be to put it in WEB-INF/classes directory. For the above case it would be WEB-INF/classes/resources/application.properties 3. The jsp page has proper tag-lib definition. Regards, Ashutosh -Original Message- From: Vijaya S [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 3:40 PM To: Struts User mailing List Subject: Message Resources error Hi, I am getting an exception error when I try to display error messages from my jsp file. The error I get is, 'Cannot find message resources under key org.apache.struts.action.MESSAGE'. What is this error mean? In my action, I have saveMessages(request, messages) where 'messages' is an object of type ActionMessages. In debug I noticed the messages are not saved in the request object. Can someone please help me as I have run out of all possible solutions? Thanks, Vijaya - 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: message-resources question
Here's some code: MessageResources messages =MessageResources.getMessageResources("messages"); String message = messages.getMessage(msg_key, args); Here's my struts.xml: . -Original Message- From: Scott Purcell <[EMAIL PROTECTED]> Sent: Feb 24, 2005 3:10 PM To: user@struts.apache.org Subject: message-resources question In an action class, can one get access to the message-resources? I use the resources from JSP pages, but do not know if I can access them from a action class in the execute method? Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message-resources question
Thanks I do see that in the javadoc, and it takes a request. The return is a MessageResources object. I am good with all that, but how do I isolate the property file that I configured in the struts-config.xml ? According to the API, it looks like I could just ask for the String by asking MessageResources.getString("findthis"); But if I have two or three message-resources, how do I tell MessageResources where the value for my string lives? Thanks, Scott -Original Message- From: Scott Piker [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:23 PM To: Struts Users Mailing List Subject: RE: message-resources question Yes, you can. Take a look at getResources(request) - Scott -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 3:10 PM To: user@struts.apache.org Subject: message-resources question In an action class, can one get access to the message-resources? I use the resources from JSP pages, but do not know if I can access them from a action class in the execute method? Thanks, Scott - 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: message-resources question
Yes, you can. Take a look at getResources(request) - Scott -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 3:10 PM To: user@struts.apache.org Subject: message-resources question In an action class, can one get access to the message-resources? I use the resources from JSP pages, but do not know if I can access them from a action class in the execute method? Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources not displayed
I would debug this problem in the following ways: * Verify if you are saving the "errors" to the request * Make sure you are using "saveErrors" and not "saveMessages" * Write a "StrutsTestCase" or a similiar testcase to verify the ActionErrors * Have a dump of the request and see that the ActionErrors are put into the request * Try the suggestion suggested here [ http://www.mail-archive.com/struts-user@jakarta.apache.org/msg67135.html ] Although I can't answer why 2.2 in web.xml wouldn't show the ActionErrors. On Wed, 19 Jan 2005 09:15:15 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Sorry James, I thought you wanted to know if the file is there. > > I package the application as a war file with Websphere Studio and deploy it > as a war file via the iPlanet interface. > > I have also packaged the war file on the comand line with the jar toll. > > Any idea > > > "James Mitchell" <[EMAIL PROTECTED]> wrote: > > >That's not what I was asking. > > > > > > > >-- > >James Mitchell > >Software Engineer / Open Source Evangelist > >EdgeTech, Inc. > >678.910.8017 > >AIM: jmitchtx > > > >- Original Message - > >From: <[EMAIL PROTECTED]> > >To: ""Struts Users Mailing List"" > >Sent: Wednesday, January 19, 2005 8:42 AM > >Subject: Re: Message Resources not displayed > > > > > >> It is there because Tomcat does display the messages. > >> > >> > >> > >> "James Mitchell" <[EMAIL PROTECTED]> wrote: > >> > >>>How are you deploying your app? Packaged with Ant? > >>> > >>>Many times, people forget to have resources copied during the build > >>>process. > >>>This is automatically done for us with most IDEs, but Ant won't do it > >>>unless > >>>you tell it to. > >>> > >>>Open your .war and make sure it is there under > >>>/WEB-INF/classes/org/app/resources > >>> > >>> > >>> > >>>-- > >>>James Mitchell > >>>Software Engineer / Open Source Evangelist > >>>EdgeTech, Inc. > >>>678.910.8017 > >>>AIM: jmitchtx > >>> > >>>- Original Message - > >>>From: <[EMAIL PROTECTED]> > >>>To: > >>>Sent: Wednesday, January 19, 2005 8:26 AM > >>>Subject: Message Resources not displayed > >>> > >>> > >>>> > >>>> > >>>> Hi there, > >>>> > >>>> I have a small Struts application which requires a user to login before > >>>> he > >>>> can call an admin action. > >>>> > >>>> The application is running fine under Tomcat 4.1 on my local system. > >>>> > >>>> When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that > >>>> the > >>>> error messages in ApplicationResouces.properties are not displayed. > >>>> The ApplicationResources.properties is specified within > >>>> struts-config.xml. > >>>> Everything else works correct. > >>>> > >>>> So for example if I call an admin action and the user is not logged in > >>>> yet, he will be redirect to the login screen. (This works fine) > >>>> When I submit wrong credentials for the login the login page shall be > >>>> displayed again with the appropriate error message. > >>>> > >>>> This is the line where I add the error in my LoginAction... > >>>> > >>>> errors.add("ActionErrors.GLOBAL_ERROR", new > >>>> ActionError("error.login.failed")); > >>>> > >>>> In the JSP page I use ... > >>>> > >>>> > >>>> and the in the ApplicationResources.properties I have a line like ... > >>>> error.login.failed = Your username or password is not valid > >>>> > >>>> The struts-config.xml has this line ... > >>>> > >>>> > >>>> As I said before on Tomcat the error messages are displayed when needed. > >>>> > >>>> Your input is much appreciated, > >>>> > >>>> Thanks > >>>> > >>>> > >>>> Karim &
Re: Message Resources not displayed
Thanks for your attention James, I have found the cause of the problem. iPlanet seems to not load the classes inside {approot}/WEB-INF/lib unless the jar files are mentioned on the classpath. Since I have done this now it works. Thought just to let you know. "James Mitchell" <[EMAIL PROTECTED]> wrote: >Then it sounds like packaging issue (without knowing more about what you are >doing). > > > >-- >James Mitchell >Software Engineer / Open Source Evangelist >EdgeTech, Inc. >678.910.8017 >AIM: jmitchtx > >- Original Message - >From: <[EMAIL PROTECTED]> >To: ""Struts Users Mailing List"" >Sent: Wednesday, January 19, 2005 9:37 AM >Subject: Re: Message Resources not displayed > > >> James, >> >> the taglib for is declared on the page. >> I can run the application on iPlanet and it works just as on Tomcat, but >> Error messages are not displayed. >> >> Karim >> >> >> >> "James Mitchell" <[EMAIL PROTECTED]> wrote: >> >>> >>>I was reacting to this... >>> >>>> It is there because Tomcat does display the messages. >>> >>>...see, I know better. In my experience on this list (over 3 years now), >>>people who say things like "it works on my machine, so it should work on >>>the >>>server" are jumping to a few assumptions. Technically I think they call >>>this "reading between the lines". >>> >>>Now, after re-reading the problem, I see another possibility here. You may >>>have forgotten to add the taglib declaration to the error page. So your >>>view souce would show in it. Can you check that too? >>> >>> >>>-- >>>James Mitchell >>>Software Engineer / Open Source Evangelist >>>EdgeTech, Inc. >>>678.910.8017 >>>AIM: jmitchtx >>> >>>- Original Message - >>>From: <[EMAIL PROTECTED]> >>>To: ""Struts Users Mailing List"" >>>Sent: Wednesday, January 19, 2005 9:15 AM >>>Subject: Re: Message Resources not displayed >>> >>> >>>> Sorry James, I thought you wanted to know if the file is there. >>>> >>>> I package the application as a war file with Websphere Studio and deploy >>>> it as a war file via the iPlanet interface. >>>> >>>> I have also packaged the war file on the comand line with the jar toll. >>>> >>>> Any idea >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> "James Mitchell" <[EMAIL PROTECTED]> wrote: >>>> >>>>>That's not what I was asking. >>>>> >>>>> >>>>> >>>>>-- >>>>>James Mitchell >>>>>Software Engineer / Open Source Evangelist >>>>>EdgeTech, Inc. >>>>>678.910.8017 >>>>>AIM: jmitchtx >>>>> >>>>>- Original Message - >>>>>From: <[EMAIL PROTECTED]> >>>>>To: ""Struts Users Mailing List"" >>>>>Sent: Wednesday, January 19, 2005 8:42 AM >>>>>Subject: Re: Message Resources not displayed >>>>> >>>>> >>>>>> It is there because Tomcat does display the messages. >>>>>> >>>>>> >>>>>> >>>>>> "James Mitchell" <[EMAIL PROTECTED]> wrote: >>>>>> >>>>>>>How are you deploying your app? Packaged with Ant? >>>>>>> >>>>>>>Many times, people forget to have resources copied during the build >>>>>>>process. >>>>>>>This is automatically done for us with most IDEs, but Ant won't do it >>>>>>>unless >>>>>>>you tell it to. >>>>>>> >>>>>>>Open your .war and make sure it is there under >>>>>>>/WEB-INF/classes/org/app/resources >>>>>>> >>>>>>> >>>>>>> >>>>>>>-- >>>>>>>James Mitchell >>>>>>>Software Engineer / Open Source Evangelist >>>>>>>EdgeTech, Inc. >>>>>>>678.910.8017 >>>>>>>AIM: jmitchtx >>>>>>> >>>>>>>- Original Message - >&
Re: Message Resources not displayed
Then it sounds like packaging issue (without knowing more about what you are doing). -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: ""Struts Users Mailing List"" Sent: Wednesday, January 19, 2005 9:37 AM Subject: Re: Message Resources not displayed James, the taglib for is declared on the page. I can run the application on iPlanet and it works just as on Tomcat, but Error messages are not displayed. Karim "James Mitchell" <[EMAIL PROTECTED]> wrote: I was reacting to this... It is there because Tomcat does display the messages. ...see, I know better. In my experience on this list (over 3 years now), people who say things like "it works on my machine, so it should work on the server" are jumping to a few assumptions. Technically I think they call this "reading between the lines". Now, after re-reading the problem, I see another possibility here. You may have forgotten to add the taglib declaration to the error page. So your view souce would show in it. Can you check that too? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: ""Struts Users Mailing List"" Sent: Wednesday, January 19, 2005 9:15 AM Subject: Re: Message Resources not displayed Sorry James, I thought you wanted to know if the file is there. I package the application as a war file with Websphere Studio and deploy it as a war file via the iPlanet interface. I have also packaged the war file on the comand line with the jar toll. Any idea "James Mitchell" <[EMAIL PROTECTED]> wrote: That's not what I was asking. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: ""Struts Users Mailing List"" Sent: Wednesday, January 19, 2005 8:42 AM Subject: Re: Message Resources not displayed It is there because Tomcat does display the messages. "James Mitchell" <[EMAIL PROTECTED]> wrote: How are you deploying your app? Packaged with Ant? Many times, people forget to have resources copied during the build process. This is automatically done for us with most IDEs, but Ant won't do it unless you tell it to. Open your .war and make sure it is there under /WEB-INF/classes/org/app/resources -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, January 19, 2005 8:26 AM Subject: Message Resources not displayed Hi there, I have a small Struts application which requires a user to login before he can call an admin action. The application is running fine under Tomcat 4.1 on my local system. When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that the error messages in ApplicationResouces.properties are not displayed. The ApplicationResources.properties is specified within struts-config.xml. Everything else works correct. So for example if I call an admin action and the user is not logged in yet, he will be redirect to the login screen. (This works fine) When I submit wrong credentials for the login the login page shall be displayed again with the appropriate error message. This is the line where I add the error in my LoginAction... errors.add("ActionErrors.GLOBAL_ERROR", new ActionError("error.login.failed")); In the JSP page I use ... and the in the ApplicationResources.properties I have a line like ... error.login.failed = Your username or password is not valid The struts-config.xml has this line ... As I said before on Tomcat the error messages are displayed when needed. Your input is much appreciated, Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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] __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You
Re: Message Resources not displayed
James, the taglib for is declared on the page. I can run the application on iPlanet and it works just as on Tomcat, but Error messages are not displayed. Karim "James Mitchell" <[EMAIL PROTECTED]> wrote: > >I was reacting to this... > >> It is there because Tomcat does display the messages. > >...see, I know better. In my experience on this list (over 3 years now), >people who say things like "it works on my machine, so it should work on the >server" are jumping to a few assumptions. Technically I think they call >this "reading between the lines". > >Now, after re-reading the problem, I see another possibility here. You may >have forgotten to add the taglib declaration to the error page. So your >view souce would show in it. Can you check that too? > > >-- >James Mitchell >Software Engineer / Open Source Evangelist >EdgeTech, Inc. >678.910.8017 >AIM: jmitchtx > >- Original Message - >From: <[EMAIL PROTECTED]> >To: ""Struts Users Mailing List"" >Sent: Wednesday, January 19, 2005 9:15 AM >Subject: Re: Message Resources not displayed > > >> Sorry James, I thought you wanted to know if the file is there. >> >> I package the application as a war file with Websphere Studio and deploy >> it as a war file via the iPlanet interface. >> >> I have also packaged the war file on the comand line with the jar toll. >> >> Any idea >> >> >> >> >> >> >> >> "James Mitchell" <[EMAIL PROTECTED]> wrote: >> >>>That's not what I was asking. >>> >>> >>> >>>-- >>>James Mitchell >>>Software Engineer / Open Source Evangelist >>>EdgeTech, Inc. >>>678.910.8017 >>>AIM: jmitchtx >>> >>>- Original Message - >>>From: <[EMAIL PROTECTED]> >>>To: ""Struts Users Mailing List"" >>>Sent: Wednesday, January 19, 2005 8:42 AM >>>Subject: Re: Message Resources not displayed >>> >>> >>>> It is there because Tomcat does display the messages. >>>> >>>> >>>> >>>> "James Mitchell" <[EMAIL PROTECTED]> wrote: >>>> >>>>>How are you deploying your app? Packaged with Ant? >>>>> >>>>>Many times, people forget to have resources copied during the build >>>>>process. >>>>>This is automatically done for us with most IDEs, but Ant won't do it >>>>>unless >>>>>you tell it to. >>>>> >>>>>Open your .war and make sure it is there under >>>>>/WEB-INF/classes/org/app/resources >>>>> >>>>> >>>>> >>>>>-- >>>>>James Mitchell >>>>>Software Engineer / Open Source Evangelist >>>>>EdgeTech, Inc. >>>>>678.910.8017 >>>>>AIM: jmitchtx >>>>> >>>>>- Original Message - >>>>>From: <[EMAIL PROTECTED]> >>>>>To: >>>>>Sent: Wednesday, January 19, 2005 8:26 AM >>>>>Subject: Message Resources not displayed >>>>> >>>>> >>>>>> >>>>>> >>>>>> Hi there, >>>>>> >>>>>> I have a small Struts application which requires a user to login >>>>>> before >>>>>> he >>>>>> can call an admin action. >>>>>> >>>>>> The application is running fine under Tomcat 4.1 on my local system. >>>>>> >>>>>> When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that >>>>>> the >>>>>> error messages in ApplicationResouces.properties are not displayed. >>>>>> The ApplicationResources.properties is specified within >>>>>> struts-config.xml. >>>>>> Everything else works correct. >>>>>> >>>>>> So for example if I call an admin action and the user is not logged in >>>>>> yet, he will be redirect to the login screen. (This works fine) >>>>>> When I submit wrong credentials for the login the login page shall be >>>>>> displayed again with the appropriate error message. >>>>>> >>>>>> This is the line where I add the error in my LoginAction... >>>>>> >>>>>>
Re: Message Resources not displayed
I was reacting to this... It is there because Tomcat does display the messages. ...see, I know better. In my experience on this list (over 3 years now), people who say things like "it works on my machine, so it should work on the server" are jumping to a few assumptions. Technically I think they call this "reading between the lines". Now, after re-reading the problem, I see another possibility here. You may have forgotten to add the taglib declaration to the error page. So your view souce would show in it. Can you check that too? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: ""Struts Users Mailing List"" Sent: Wednesday, January 19, 2005 9:15 AM Subject: Re: Message Resources not displayed Sorry James, I thought you wanted to know if the file is there. I package the application as a war file with Websphere Studio and deploy it as a war file via the iPlanet interface. I have also packaged the war file on the comand line with the jar toll. Any idea "James Mitchell" <[EMAIL PROTECTED]> wrote: That's not what I was asking. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: ""Struts Users Mailing List"" Sent: Wednesday, January 19, 2005 8:42 AM Subject: Re: Message Resources not displayed It is there because Tomcat does display the messages. "James Mitchell" <[EMAIL PROTECTED]> wrote: How are you deploying your app? Packaged with Ant? Many times, people forget to have resources copied during the build process. This is automatically done for us with most IDEs, but Ant won't do it unless you tell it to. Open your .war and make sure it is there under /WEB-INF/classes/org/app/resources -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, January 19, 2005 8:26 AM Subject: Message Resources not displayed Hi there, I have a small Struts application which requires a user to login before he can call an admin action. The application is running fine under Tomcat 4.1 on my local system. When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that the error messages in ApplicationResouces.properties are not displayed. The ApplicationResources.properties is specified within struts-config.xml. Everything else works correct. So for example if I call an admin action and the user is not logged in yet, he will be redirect to the login screen. (This works fine) When I submit wrong credentials for the login the login page shall be displayed again with the appropriate error message. This is the line where I add the error in my LoginAction... errors.add("ActionErrors.GLOBAL_ERROR", new ActionError("error.login.failed")); In the JSP page I use ... and the in the ApplicationResources.properties I have a line like ... error.login.failed = Your username or password is not valid The struts-config.xml has this line ... As I said before on Tomcat the error messages are displayed when needed. Your input is much appreciated, Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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] __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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] __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.n
Re: Message Resources not displayed
Sorry James, I thought you wanted to know if the file is there. I package the application as a war file with Websphere Studio and deploy it as a war file via the iPlanet interface. I have also packaged the war file on the comand line with the jar toll. Any idea "James Mitchell" <[EMAIL PROTECTED]> wrote: >That's not what I was asking. > > > >-- >James Mitchell >Software Engineer / Open Source Evangelist >EdgeTech, Inc. >678.910.8017 >AIM: jmitchtx > >- Original Message - >From: <[EMAIL PROTECTED]> >To: ""Struts Users Mailing List"" >Sent: Wednesday, January 19, 2005 8:42 AM >Subject: Re: Message Resources not displayed > > >> It is there because Tomcat does display the messages. >> >> >> >> "James Mitchell" <[EMAIL PROTECTED]> wrote: >> >>>How are you deploying your app? Packaged with Ant? >>> >>>Many times, people forget to have resources copied during the build >>>process. >>>This is automatically done for us with most IDEs, but Ant won't do it >>>unless >>>you tell it to. >>> >>>Open your .war and make sure it is there under >>>/WEB-INF/classes/org/app/resources >>> >>> >>> >>>-- >>>James Mitchell >>>Software Engineer / Open Source Evangelist >>>EdgeTech, Inc. >>>678.910.8017 >>>AIM: jmitchtx >>> >>>- Original Message - >>>From: <[EMAIL PROTECTED]> >>>To: >>>Sent: Wednesday, January 19, 2005 8:26 AM >>>Subject: Message Resources not displayed >>> >>> >>>> >>>> >>>> Hi there, >>>> >>>> I have a small Struts application which requires a user to login before >>>> he >>>> can call an admin action. >>>> >>>> The application is running fine under Tomcat 4.1 on my local system. >>>> >>>> When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that >>>> the >>>> error messages in ApplicationResouces.properties are not displayed. >>>> The ApplicationResources.properties is specified within >>>> struts-config.xml. >>>> Everything else works correct. >>>> >>>> So for example if I call an admin action and the user is not logged in >>>> yet, he will be redirect to the login screen. (This works fine) >>>> When I submit wrong credentials for the login the login page shall be >>>> displayed again with the appropriate error message. >>>> >>>> This is the line where I add the error in my LoginAction... >>>> >>>> errors.add("ActionErrors.GLOBAL_ERROR", new >>>> ActionError("error.login.failed")); >>>> >>>> In the JSP page I use ... >>>> >>>> >>>> and the in the ApplicationResources.properties I have a line like ... >>>> error.login.failed = Your username or password is not valid >>>> >>>> The struts-config.xml has this line ... >>>> >>>> >>>> As I said before on Tomcat the error messages are displayed when needed. >>>> >>>> Your input is much appreciated, >>>> >>>> Thanks >>>> >>>> >>>> Karim >>>> >>>> >>>> __ >>>> Switch to Netscape Internet Service. >>>> As low as $9.95 a month -- Sign up today at >>>> http://isp.netscape.com/register >>>> >>>> Netscape. Just the Net You Need. >>>> >>>> New! Netscape Toolbar for Internet Explorer >>>> Search from anywhere on the Web and block those annoying pop-ups. >>>> Download now at http://channels.netscape.com/ns/search/install.jsp >>>> >>>> - >>>> 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] >>> >>> >> >> __ >> Switch to Netscape Internet Service. >> As low as $9.95 a month -- Sign up today at >> http://isp.netscape.com/register >> >> Netscape. Just the Net You Need. >> >> New! Netscape Toolbar for Internet Explorer >> Search from anywhere on the Web and block those annoying pop-ups. >> Download now at http://channels.netscape.com/ns/search/install.jsp >> >> - >> 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] > > __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources not displayed
That's not what I was asking. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: ""Struts Users Mailing List"" Sent: Wednesday, January 19, 2005 8:42 AM Subject: Re: Message Resources not displayed It is there because Tomcat does display the messages. "James Mitchell" <[EMAIL PROTECTED]> wrote: How are you deploying your app? Packaged with Ant? Many times, people forget to have resources copied during the build process. This is automatically done for us with most IDEs, but Ant won't do it unless you tell it to. Open your .war and make sure it is there under /WEB-INF/classes/org/app/resources -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, January 19, 2005 8:26 AM Subject: Message Resources not displayed Hi there, I have a small Struts application which requires a user to login before he can call an admin action. The application is running fine under Tomcat 4.1 on my local system. When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that the error messages in ApplicationResouces.properties are not displayed. The ApplicationResources.properties is specified within struts-config.xml. Everything else works correct. So for example if I call an admin action and the user is not logged in yet, he will be redirect to the login screen. (This works fine) When I submit wrong credentials for the login the login page shall be displayed again with the appropriate error message. This is the line where I add the error in my LoginAction... errors.add("ActionErrors.GLOBAL_ERROR", new ActionError("error.login.failed")); In the JSP page I use ... and the in the ApplicationResources.properties I have a line like ... error.login.failed = Your username or password is not valid The struts-config.xml has this line ... As I said before on Tomcat the error messages are displayed when needed. Your input is much appreciated, Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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] __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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: Message Resources not displayed
It is there because Tomcat does display the messages. "James Mitchell" <[EMAIL PROTECTED]> wrote: >How are you deploying your app? Packaged with Ant? > >Many times, people forget to have resources copied during the build process. >This is automatically done for us with most IDEs, but Ant won't do it unless >you tell it to. > >Open your .war and make sure it is there under >/WEB-INF/classes/org/app/resources > > > >-- >James Mitchell >Software Engineer / Open Source Evangelist >EdgeTech, Inc. >678.910.8017 >AIM: jmitchtx > >- Original Message - >From: <[EMAIL PROTECTED]> >To: >Sent: Wednesday, January 19, 2005 8:26 AM >Subject: Message Resources not displayed > > >> >> >> Hi there, >> >> I have a small Struts application which requires a user to login before he >> can call an admin action. >> >> The application is running fine under Tomcat 4.1 on my local system. >> >> When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that the >> error messages in ApplicationResouces.properties are not displayed. >> The ApplicationResources.properties is specified within >> struts-config.xml. >> Everything else works correct. >> >> So for example if I call an admin action and the user is not logged in >> yet, he will be redirect to the login screen. (This works fine) >> When I submit wrong credentials for the login the login page shall be >> displayed again with the appropriate error message. >> >> This is the line where I add the error in my LoginAction... >> >> errors.add("ActionErrors.GLOBAL_ERROR", new >> ActionError("error.login.failed")); >> >> In the JSP page I use ... >> >> >> and the in the ApplicationResources.properties I have a line like ... >> error.login.failed = Your username or password is not valid >> >> The struts-config.xml has this line ... >> >> >> As I said before on Tomcat the error messages are displayed when needed. >> >> Your input is much appreciated, >> >> Thanks >> >> >> Karim >> >> >> __ >> Switch to Netscape Internet Service. >> As low as $9.95 a month -- Sign up today at >> http://isp.netscape.com/register >> >> Netscape. Just the Net You Need. >> >> New! Netscape Toolbar for Internet Explorer >> Search from anywhere on the Web and block those annoying pop-ups. >> Download now at http://channels.netscape.com/ns/search/install.jsp >> >> - >> 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] > > __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources not displayed
How are you deploying your app? Packaged with Ant? Many times, people forget to have resources copied during the build process. This is automatically done for us with most IDEs, but Ant won't do it unless you tell it to. Open your .war and make sure it is there under /WEB-INF/classes/org/app/resources -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, January 19, 2005 8:26 AM Subject: Message Resources not displayed Hi there, I have a small Struts application which requires a user to login before he can call an admin action. The application is running fine under Tomcat 4.1 on my local system. When I deploy it to iPlanet WebServer 6.0 SP5 I have the problem that the error messages in ApplicationResouces.properties are not displayed. The ApplicationResources.properties is specified within struts-config.xml. Everything else works correct. So for example if I call an admin action and the user is not logged in yet, he will be redirect to the login screen. (This works fine) When I submit wrong credentials for the login the login page shall be displayed again with the appropriate error message. This is the line where I add the error in my LoginAction... errors.add("ActionErrors.GLOBAL_ERROR", new ActionError("error.login.failed")); In the JSP page I use ... and the in the ApplicationResources.properties I have a line like ... error.login.failed = Your username or password is not valid The struts-config.xml has this line ... As I said before on Tomcat the error messages are displayed when needed. Your input is much appreciated, Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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: message resources in db
> -Original Message- > From: Nathan Coast [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 29, 2004 7:01 PM > To: Struts Users Mailing List > Subject: Re: message resources in db > > > > > > Then you have the apparent fact that by doing so you are > now outside the Java provided i18n stuff, > > when you mention 'java provided i18n stuff' are you referring to the > message resources features in struts (message bundles, > locales etc)? or > have I missed another java feature somewhere? Struts makes use of that. http://java.sun.com/j2se/1.4.2/docs/guide/intl/index.html > > > So, you gain what? it's in a database? > > I'm curios as to what you're reasoning is to put these into > a database, > > some of my sites require the client to be able to manage the content, > this includes i18n labels and messages. Our deployments are done via > war files, so to change a label requires to rebuild the war file and > redeploy. I have a push button war builder, so building wars with changed applicaiton resource bundles doesn't bother me. Changing these often enough to warrant worrying about how often I have to bounce a production server Okay, maybe. Given the cheapness of hardware, and a clustering web app server, even this can be worked around. > > What I'd prefer is a user friendly gui to manage messages (yes would > require cache flushing etc). Another useful feature would be to > highlight discrepancies between messages in different locale bundles. Now that would be cool :) > > aside I'm guessing someone has already implemented a caching > system for clusters? does spring provide something like this? > I guess > if you need to refresh the cache from one server you need to > refresh all > of the caches. I believe Spring does, but not necessarily for a clustered environment. > > cheers > Nathan > > - > 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: message resources in db
Then you have the apparent fact that by doing so you are now outside the Java provided i18n stuff, when you mention 'java provided i18n stuff' are you referring to the message resources features in struts (message bundles, locales etc)? or have I missed another java feature somewhere? So, you gain what? it's in a database? I'm curios as to what you're reasoning is to put these into a database, some of my sites require the client to be able to manage the content, this includes i18n labels and messages. Our deployments are done via war files, so to change a label requires to rebuild the war file and redeploy. What I'd prefer is a user friendly gui to manage messages (yes would require cache flushing etc). Another useful feature would be to highlight discrepancies between messages in different locale bundles. aside I'm guessing someone has already implemented a caching system for clusters? does spring provide something like this? I guess if you need to refresh the cache from one server you need to refresh all of the caches. cheers Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources in db
> -Original Message- > From: James Mitchell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 29, 2004 11:18 AM > To: Struts Users Mailing List > Subject: Re: message resources in db > > > My reasoning for what I've done is: > a) it scratches my own itch > b) it scratches many other peoples itch > > My work did not stop with OJBMessageResources. I have several > Database-based Impls of commons-resources sitting on sf.net > that are ready > for release as soon as common-resources goes 1.0. > > When you use a Hibernate backed impl, you get many added benfits (see > Hibernate docs for details). > > Besides all that.if this doesn't scratch an itch for you, > don't knock > it. I wasn't trying to knock it... I'm just trying to see the benefit of doing this. > > > -- > James Mitchell > Software Engineer / Open Source Evangelist > EdgeTech, Inc. > 678.910.8017 > AIM: jmitchtx > > - Original Message - > From: "Jim Barrows" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Wednesday, December 29, 2004 11:15 AM > Subject: RE: message resources in db > > > > -Original Message- > > From: Nathan Coast [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, December 29, 2004 4:17 AM > > To: Struts Users Mailing List > > Subject: message resources in db > > > > > > Hi, > > > > Has anyone developed message resources that pulls messages > > from a db? I > > have followed a few links that discuss this but can't find any code: > > > > http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase > > This notion keeps popping up, and I keep wondering why. On > the surface it > seems okay, keep everything where it's easy to maintain... > but in reality, > you really don't buy anything with it. > If you do it so you can dynamically change the values, then > you slow down > your page throughput quite painfully. So, of course you > cache the data... > which means it's not dynamic and you either provide a way to > flush the cache > (which you could do for a flat file as well, as Spring has > apparently done). > Then you have the apparent fact that by doing so you are now > outside the > Java provided i18n stuff, so you might be in a position of trying to > maintain this code to keep up with what Java provides for you > autmatically. > So, you gain what? it's in a database? > I'm curios as to what you're reasoning is to put these into a > database, coz > I'm looking for a good excuse to do it myself :) > > > > > > these docs mention > > org.apache.struts.util.OJBMessageResourcesFactory but > > I can't find this class anywhere. > > > > If there is a db implementation for message resources? I guess the > > natural progression is a web-app gui for managing those > > resources. Does > > such a thing exist? > > > > cheers > > Nathan > > -- > > Nathan Coast > > Managing Director > > Codeczar Ltd > > mob : (852) 9049 5581 > > tel : (852) 2834 8733 > > fax : (852) 2834 8755 > > web : http://www.codeczar.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] > > > > > - > 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: message resources in db
> -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 29, 2004 8:15 AM > To: Struts Users Mailing List > Subject: RE: message resources in db > > > -Original Message- > > From: Nathan Coast [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, December 29, 2004 4:17 AM > > To: Struts Users Mailing List > > Subject: message resources in db > > > > > > Hi, > > > > Has anyone developed message resources that pulls messages > > from a db? I > > have followed a few links that discuss this but can't find any code: > > > > http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase > > This notion keeps popping up, and I keep wondering why. On > the surface it seems okay, keep everything where it's easy to > maintain... but in reality, you really don't buy anything with it. > If you do it so you can dynamically change the values, then > you slow down your page throughput quite painfully. So, of > course you cache the data... which means it's not dynamic and > you either provide a way to flush the cache (which you could > do for a flat file as well, as Spring has apparently done). > Then you have the apparent fact that by doing so you are now > outside the Java provided i18n stuff, so you might be in a > position of trying to maintain this code to keep up with what > Java provides for you autmatically. > So, you gain what? it's in a database? > I'm curios as to what you're reasoning is to put these into a > database, coz I'm looking for a good excuse to do it myself :) Why? Well reporting (crystal reports) is much easier if all the strings for statuses and types are in the DB. Also we allow the client to translate/modify strings and I can see it would be easier to use the DB than modify .properties files (although we went with the latter for other reasons). There are not really any of the problems you mentioned. You just override loadLocale() to load from some other source - could be a database, XML file, or whatever. The rest of the class does all the caching just like with a .properties file and the rest of your application can't even tell the difference. No slowdown because its cached. If you want it dynamic you will have to add a way to detect changes and clear the cache, but that is really a separate issue from where your i18n data is stored. The app I am working on now has dynamic values with .properties files. - Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources in db
My reasoning for what I've done is: a) it scratches my own itch b) it scratches many other peoples itch My work did not stop with OJBMessageResources. I have several Database-based Impls of commons-resources sitting on sf.net that are ready for release as soon as common-resources goes 1.0. When you use a Hibernate backed impl, you get many added benfits (see Hibernate docs for details). Besides all that.if this doesn't scratch an itch for you, don't knock it. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: "Jim Barrows" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, December 29, 2004 11:15 AM Subject: RE: message resources in db -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 4:17 AM To: Struts Users Mailing List Subject: message resources in db Hi, Has anyone developed message resources that pulls messages from a db? I have followed a few links that discuss this but can't find any code: http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase This notion keeps popping up, and I keep wondering why. On the surface it seems okay, keep everything where it's easy to maintain... but in reality, you really don't buy anything with it. If you do it so you can dynamically change the values, then you slow down your page throughput quite painfully. So, of course you cache the data... which means it's not dynamic and you either provide a way to flush the cache (which you could do for a flat file as well, as Spring has apparently done). Then you have the apparent fact that by doing so you are now outside the Java provided i18n stuff, so you might be in a position of trying to maintain this code to keep up with what Java provides for you autmatically. So, you gain what? it's in a database? I'm curios as to what you're reasoning is to put these into a database, coz I'm looking for a good excuse to do it myself :) these docs mention org.apache.struts.util.OJBMessageResourcesFactory but I can't find this class anywhere. If there is a db implementation for message resources? I guess the natural progression is a web-app gui for managing those resources. Does such a thing exist? cheers Nathan -- Nathan Coast Managing Director Codeczar Ltd mob : (852) 9049 5581 tel : (852) 2834 8733 fax : (852) 2834 8755 web : http://www.codeczar.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resources in db
> -Original Message- > From: Nathan Coast [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 29, 2004 4:17 AM > To: Struts Users Mailing List > Subject: message resources in db > > > Hi, > > Has anyone developed message resources that pulls messages > from a db? I > have followed a few links that discuss this but can't find any code: > > http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase This notion keeps popping up, and I keep wondering why. On the surface it seems okay, keep everything where it's easy to maintain... but in reality, you really don't buy anything with it. If you do it so you can dynamically change the values, then you slow down your page throughput quite painfully. So, of course you cache the data... which means it's not dynamic and you either provide a way to flush the cache (which you could do for a flat file as well, as Spring has apparently done). Then you have the apparent fact that by doing so you are now outside the Java provided i18n stuff, so you might be in a position of trying to maintain this code to keep up with what Java provides for you autmatically. So, you gain what? it's in a database? I'm curios as to what you're reasoning is to put these into a database, coz I'm looking for a good excuse to do it myself :) > > these docs mention > org.apache.struts.util.OJBMessageResourcesFactory but > I can't find this class anywhere. > > If there is a db implementation for message resources? I guess the > natural progression is a web-app gui for managing those > resources. Does > such a thing exist? > > cheers > Nathan > -- > Nathan Coast > Managing Director > Codeczar Ltd > mob : (852) 9049 5581 > tel : (852) 2834 8733 > fax : (852) 2834 8755 > web : http://www.codeczar.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]
Re: message resources in db
http://sourceforge.net/project/showfiles.php?group_id=49385&package_id=76369 -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: "Nathan Coast" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, December 29, 2004 6:16 AM Subject: message resources in db Hi, Has anyone developed message resources that pulls messages from a db? I have followed a few links that discuss this but can't find any code: http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase these docs mention org.apache.struts.util.OJBMessageResourcesFactory but I can't find this class anywhere. If there is a db implementation for message resources? I guess the natural progression is a web-app gui for managing those resources. Does such a thing exist? cheers Nathan -- Nathan Coast Managing Director Codeczar Ltd mob : (852) 9049 5581 tel : (852) 2834 8733 fax : (852) 2834 8755 web : http://www.codeczar.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]
RE: message-resources in struts-config.xml won't work!
That's your problem. You need to have elements in the order they are listed in the dtd. So, message-resources go between controller and plug-in or if you don't have those they should be after action-mappings. -Original Message- From: René Thol [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 2:08 AM To: Struts Users Mailing List Subject: Re: message-resources in struts-config.xml won't work! Hello again, I'm wondering where to place message-resources within the struts-config.xml in struts version 1.0.2? I'm always getting errors in tomcat's log file regarding the struts-config.xml whenever I insert a message-resource tag!? Any ideas? Many thanx Best regards -- René Thol E-Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message-resources in struts-config.xml won't work!
Ok now it seems that I've found the solution: When using struts1.0.2 the documentation of the tags claims that "bundle" can be used with bean:message, html:image, etc. But the struts-config dtd that is provided within the struts.jar does not support the message-resource tag at all! But what is wrong within this release of struts? The dtd within the jar file or the documentation of the tags? By the way the application does not have access to the WWW and is therefore not able to check its struts-config file against another dtd specified within the struts-config.xml using a WWW URL. Best regards -- René Thol E-Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message-resources in struts-config.xml won't work!
Hello again, I'm wondering where to place message-resources within the struts-config.xml in struts version 1.0.2? I'm always getting errors in tomcat's log file regarding the struts-config.xml whenever I insert a message-resource tag!? Any ideas? Many thanx Best regards -- René Thol E-Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message-resources in struts-config.xml won't work!
Hello again, Lane, Brad schrieb: Use key=""/> Unfortunately this did not change anything. I'm still getting this error. Kind regards -- René Thol E-Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message-resources in struts-config.xml won't work!
Use -Original Message- From: René Thol [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 9:15 AM To: Struts Users Mailing List Subject: message-resources in struts-config.xml won't work! Hello again everybody, I just changed my application from having its message resources defined in web.xml via init parameter to defining it in struts-config.xml using I left my JSPs unchanged using tags. But now the JSPs won't be compiled anymore. I'm always getting: Cannot find message resources under key org.apache.struts.action.MESSAGE Why? I can't find anything that is declared against specification? Can please smbd. help here? Many thanks in advance Best regards -- René Thol E-Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message-resources parameter setting for struts 1.2
Thanks for the quick reply. I am just curious why the struts-blank.war for struts 1.2 uses MessageResources at the message resource setting when there is no MessageResource.properties file inside the resources folder. So is there a mistake there and that the resource setting should have been resources.application instead since there is only this file in the resources folder? --- Michael McGrady <[EMAIL PROTECTED]> wrote: > Lai Boon Hui wrote: > > >I am just playing around with struts-blnak.war that > >comes with all dist. > > > > The reason that the references to resources works is > that the references > really refer to the files in question. Just any old > name won't do. So, > if you use a file name that is totally different > from the file you are > trying to reference, that won't work. This is not > magic. I know you > know that, but try to remember that there have to be > connections between > the things you are talking about. Do you > understand? When resources > are sought under /classes, they are sought in much > the same way that > CLASSPATH works under /classes, except there is a > seeking. Try to > figure out how resources are sought by the > ClassLoader class. > > Michael > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message-resources parameter setting for struts 1.2
Lai Boon Hui wrote: I am just playing around with struts-blnak.war that comes with all dist. The reason that the references to resources works is that the references really refer to the files in question. Just any old name won't do. So, if you use a file name that is totally different from the file you are trying to reference, that won't work. This is not magic. I know you know that, but try to remember that there have to be connections between the things you are talking about. Do you understand? When resources are sought under /classes, they are sought in much the same way that CLASSPATH works under /classes, except there is a seeking. Try to figure out how resources are sought by the ClassLoader class. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message-resources parameter setting for struts 1.2
I am just playing around with struts-blnak.war that comes with all dist. The structure is like: C:. |---META-INF |---pages |---WEB-INF |---classes | |--resources |---lib |---src |---java |---resources where application.properties file is in the resources folder. Thus when you set the application recognizes the setting but not --- Michael McGrady <[EMAIL PROTECTED]> wrote: > Lai Boon Hui wrote: > > >In struts 1.1, struts-confgi.xml we declare > properties > >file setting using: > > parameter="resources.application"/> > > > >but in struts 1.2, it has become: > > > as > >seen in struts-blank.war. I tried to extract and > >recompile and redeploy this war file and it didn't > >work like the properties file is not recognized. It > >only worked when i revert to struts 1.1 kind of > >setting. > > > >Is there a reason why struts 1.2 does things this > way? > >How can i make it work? > > > > > > Why don't you give us the name of your file, where > it is located, and > the actual code you have in the config file? Then, > you can get an > immediate answer, because that is all that is > relevant, I think. > > Michael McGrady > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message-resources parameter setting for struts 1.2
Lai Boon Hui wrote: In struts 1.1, struts-confgi.xml we declare properties file setting using: but in struts 1.2, it has become: as seen in struts-blank.war. I tried to extract and recompile and redeploy this war file and it didn't work like the properties file is not recognized. It only worked when i revert to struts 1.1 kind of setting. Is there a reason why struts 1.2 does things this way? How can i make it work? Why don't you give us the name of your file, where it is located, and the actual code you have in the config file? Then, you can get an immediate answer, because that is all that is relevant, I think. Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources Confusion
The answer is, (someone correct me if i am wrong!) No, Globals.MESSAGES_KEY key only holds the default MessageResources. If you look you will find an attribute named 'systemErrors' wich contains the MessageResources object of app.resources.SystemErrors And if you use this bundle for error messages, notice the use of bundle in Henrique Viecili - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 05, 2004 12:23 PM Subject: Message Resources Confusion Greetings, I am somewhat unclear with the Message Resources. I have defined in my struts-config: In my Action class I have the following code: if (getSPName() == null) { MessageResources errorMessages = (MessageResources) request.getAttribute(Globals.MESSAGES_KEY); String errorMessage = errorMessages.getMessage("errors.invalid.SPName"); logger.error(errorMessage); errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("errors.9000")); saveErrors(request, errors); return mapping.findForward(errorMessages.getMessage("forward.systemError")); } Question 1: Does the request.getAttribute(Globals.MESSAGES_KEY) load the keys of both resources found in the struts-config? The message with the key ("errors.invalid.SPName") returns a null. Question 2: If I code it this way the message found. MessageResources errorMessages = this.getResources(request, "systemErrors"); Any help explaining this is appreciated. TIA, Glenn
Re: Message Resources
You do not need to load the Message ressources. I would suggest you to place the following in your AS classpath : A file named : SimpleLog.properties (may be all small letters) with the following content : # # # # # # # Author : $Author$ # Revision : $Revision$ # Last updated : $Date$ # ### # Logging detail level, # Must be one of ("trace", "debug", "info", "warn", "error", or "fatal"). org.apache.commons.logging.simplelog.defaultlog=info # Id : $Id$ # # Log # # # $Log$ # and another one : File named : commons-logging.properties file content is # # # # # # # Author : $Author$ # Revision : $Revision$ # Last updated : $Date$ # ### org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog # Id : $Id$ # # Log # # # $Log$ doing that you will allow to see the jakarta logging being flushed out : [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true[INFO] PropertyMessageResources - -Initializing, config='YourResource_1', returnNull=true[INFO] PropertyMessageResources - -Initializing, config='YourResource_2', returnNull=true[INFO] PropertyMessageResources - -Initializing, config='YourResource_3', returnNull=true[INFO] PropertyMessageResources - -Initializing, config='YourResource_4', returnNull=true[INFO] PropertyMessageResources - -Initializing, config='ApplicationResources', returnNull=true I have NO idea what decided on the order they are loaded as it is definitively NOT the order we declared them in our Struts-config.xml Cheers, \T, > Greetings, > > The following code snippet is from my ActionForm.validate() method. > What I don't like and wonder if there is a better way to this: is the > loading of the Message Resources. > I need to do this to get a value that is passed as a parameter to a > message. > > private static MessageResources messages = > MessageResources.getMessageResources("resources.ApplicationResources"); > > errors.add(ActionErrors.GLOBAL_ERROR, new > ActionMessage("errors.general.alphabetic.required", > messages.getMessage(hrOnlineLocale.getLocaleLocale(), > "label.first.name"))); > > Is there a better way to do this? > > TIA, > Glenn -- Thomas SMETS rue J. Wytsmanstraat 62 1050 Brussels - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources
If you want to get MessageResources in your validate method then you can just do: MessageResources messages = ((MessageResources) request.getAttribute(Globals.MESSAGES_KEY)); and that should do the trick. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 21, 2004 3:45 PM Subject: Message Resources > Greetings, > > The following code snippet is from my ActionForm.validate() method. > What I don't like and wonder if there is a better way to this: is the > loading of the Message Resources. > I need to do this to get a value that is passed as a parameter to a > message. > > private static MessageResources messages = > MessageResources.getMessageResources("resources.ApplicationResources"); > > errors.add(ActionErrors.GLOBAL_ERROR, new > ActionMessage("errors.general.alphabetic.required", > messages.getMessage(hrOnlineLocale.getLocaleLocale(), > "label.first.name"))); > > Is there a better way to do this? > > TIA, > Glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]