Re: Pass acute characters by URL
#C3B3 is an utf-8 encoding. A quick workaround could be to use entities oacute; For more in depth details (iso-l1/utf-8), check this thread : http://www.theserverside.com/discussions/thread.tss?thread_id=28944 On 3/12/06, Yariel Ramos Moreno [EMAIL PROTECTED] wrote: Hello: How can I pass acute characters by URL? I try this: http://localhost:8080/newsSystem/menu.do?clasification=Programaci%C3%B3n where Programaci%C3%B3n is the equivalent of Programación. Then, when I show this in one Page it appears with those characters instead of the correct word. Regards... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[shale] LoadBundle basename not set
I'm trying to update from the 20060130 nightly to the 20060312 nightly and I'm getting an IllegalStateException from the LoadBundle component that I wasn't getting before. It looks like the basename attribute isn't being set for some reason, and I'm a bit lost as to why. I haven't changed anything in my code other than the version of shale-core.jar and shale-clay.jar. I've looked through the code and everything looks fine to me. Here's the exception that I'm getting and the configuration of the LoadBundle in my faces-config.xml: Caused by: java.lang.IllegalStateException: The 'basename' property cannot be null at org.apache.shale.util.LoadBundle.getMap(LoadBundle.java:152) at org.apache.shale.faces.ShalePropertyResolver.getType(ShalePropertyResolver.java:263) at org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:164) at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:55) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311) at org.apache.shale.faces.ShaleVariableResolver.resolveVariable(ShaleVariableResolver.java:152) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:110) at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:569) at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140) at org.apache.commons.el.ExpressionString.evaluate(ExpressionString.java:114) at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378) ... 66 more managed-bean managed-bean-namelabels/managed-bean-name managed-bean-class org.apache.shale.util.LoadBundle /managed-bean-class managed-bean-scoperequest/managed-bean-scope managed-property property-namebasename/property-name valuecom.contentconnections.mpl.publicschools.labels/value /managed-property /managed-bean I have no idea why all of a sudden the basename wouldn't be getting set. It doesn't look there is anything wrong with the LoadBundle component itself. Did something change in other parts of shale-core that could be causing this? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] LoadBundle basename not set
From: Richard Wallace [EMAIL PROTECTED] I'm trying to update from the 20060130 nightly to the 20060312 nightly and I'm getting an IllegalStateException from the LoadBundle component that I wasn't getting before. It looks like the basename attribute isn't being set for some reason, and I'm a bit lost as to why. I haven't changed anything in my code other than the version of shale-core.jar and shale-clay.jar. I've looked through the code and everything looks fine to me. Here's the exception that I'm getting and the configuration of the LoadBundle in my faces-config.xml: [snippet] I have no idea why all of a sudden the basename wouldn't be getting set. It doesn't look there is anything wrong with the LoadBundle component itself. Did something change in other parts of shale-core that could be causing this? I can not recreate this one but it has already been reported (http://issues.apache.org/bugzilla/show_bug.cgi?id=38784). There was a recent change to the LoadBundle making it implement the Map interface. This allows you to use it directly in an EL #{labels.mylabel} or #{labels.map.mylabel}. What version of myfaces are you using? It's working under 1.1.1. Thanks, Rich Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] LoadBundle basename not set
Gary VanMatre wrote: From: Richard Wallace [EMAIL PROTECTED] I'm trying to update from the 20060130 nightly to the 20060312 nightly and I'm getting an IllegalStateException from the LoadBundle component that I wasn't getting before. It looks like the basename attribute isn't being set for some reason, and I'm a bit lost as to why. I haven't changed anything in my code other than the version of shale-core.jar and shale-clay.jar. I've looked through the code and everything looks fine to me. Here's the exception that I'm getting and the configuration of the LoadBundle in my faces-config.xml: [snippet] I have no idea why all of a sudden the basename wouldn't be getting set. It doesn't look there is anything wrong with the LoadBundle component itself. Did something change in other parts of shale-core that could be causing this? I can not recreate this one but it has already been reported (http://issues.apache.org/bugzilla/show_bug.cgi?id=38784). There was a recent change to the LoadBundle making it implement the Map interface. This allows you to use it directly in an EL #{labels.mylabel} or #{labels.map.mylabel}. What version of myfaces are you using? It's working under 1.1.1. I'm using myfaces 1.1.1. And the above bug is exactly what I'm running into. I've tried with both versions of the usage #{labels.map['default.title']} and #{labels['default.title']} and both result in the same exception being thrown. I've created a small example project that is giving me the problem. It's 6MB so I've uploaded it rather than attaching it. You can find it at http://www.thewallacepack.net/shale-loadbundle-bug.tar.gz. I use maven 2 to build and deploy it, but it also contains the war file in the target directory which you can just deploy directly. After deploying goto http://localhost:8080/shale-loadbundle-bug/test.faces and you should get an exception saying it Cannot get value for expression '#{labels['default.title']}'. Upon closer inspection of the tomcat logs you should find the same IllegalStateException because the basename is null that I've been encountering. I hope it helps, Rich Thanks, Rich Gary - 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: [shale] LoadBundle basename not set
From: Richard Wallace [EMAIL PROTECTED] Gary VanMatre wrote: From: Richard Wallace I'm trying to update from the 20060130 nightly to the 20060312 nightly and I'm getting an IllegalStateException from the LoadBundle component that I wasn't getting before. It looks like the basename attribute isn't being set for some reason, and I'm a bit lost as to why. I haven't changed anything in my code other than the version of shale-core.jar and shale-clay.jar. I've looked through the code and everything looks fine to me. Here's the exception that I'm getting and the configuration of the LoadBundle in my faces-config.xml: [snippet] I have no idea why all of a sudden the basename wouldn't be getting set. It doesn't look there is anything wrong with the LoadBundle component itself. Did something change in other parts of shale-core that could be causing this? I can not recreate this one but it has already been reported (http://issues.apache.org/bugzilla/show_bug.cgi?id=38784). There was a recent change to the LoadBundle making it implement the Map interface. This allows you to use it directly in an EL #{labels.mylabel} or #{labels.map.mylabel}. What version of myfaces are you using? It's working under 1.1.1. I'm using myfaces 1.1.1. And the above bug is exactly what I'm running into. I've tried with both versions of the usage #{labels.map['default.title']} and #{labels['default.title']} and both result in the same exception being thrown. I've created a small example project that is giving me the problem. It's 6MB so I've uploaded it rather than attaching it. You can find it at http://www.thewallacepack.net/shale-loadbundle-bug.tar.gz. I use maven 2 to build and deploy it, but it also contains the war file in the target directory which you can just deploy directly. After deploying goto http://localhost:8080/shale-loadbundle-bug/test.faces and you should get an exception saying it Cannot get value for expression '#{labels['default.title']}'. Upon closer inspection of the tomcat logs you should find the same IllegalStateException because the basename is null that I've been encountering. Rich, thank you for the example. I'm not sure what I was missing in my setup but your example helped me find the problem. The basename property was falling into the logic in the shale property resolver instead of delegating to the original property resolver. I closed out this ticket http://issues.apache.org/bugzilla/show_bug.cgi?id=38784. The fix will be in the 20060313 nightly build. Please reopen if needed. Thanks for the help, Gary I hope it helps, Rich Thanks, Rich Gary - 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]
has struts reached the saturation
Hi I have heard that struts have reached a saturation point and nothing more can be build over it. New frame works like spring would take over struts. How valid are these opinions. sncerely jubs
Catch me up!
Hi, I've been away from my Struts project for a while. I hear there have been several developments. What's the latest version of Struts I should be using? What about using other packages with Struts, like Spring, and I hear there are others. I'd appreciate enough direction to get me restarted on the right foot. Thx! C# Online.NET http://wiki.csharp-online.net http://wiki.csharp-online.net/
Re: has struts reached the saturation
On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: Hi I have heard that struts have reached a saturation point and nothing more can be build over it. New frame works like spring would take over struts. How valid are these opinions. RTFA, where A stands for archives. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Catch me up!
On 3/12/06, e-denton Java Programmer [EMAIL PROTECTED] wrote: I've been away from my Struts project for a while. I hear there have been several developments. What's the latest version of Struts I should be using? * http://struts.apache.org/kickstart.html#choice What about using other packages with Struts, like Spring, and I hear there are others. I'd appreciate enough direction to get me restarted on the right foot. * http://www-128.ibm.com/developerworks/java/library/j-sr2.html Thx! -- HTH, Ted. ** http://www.husted.com/ted/blog/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: has struts reached the saturation
On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: I have heard that struts have reached a saturation point and nothing more can be build over it. New frame works like spring would take over struts. How valid are these opinions. Why traffic in opinions? Spend a few minutes browsing Planet Struts and Struts Central and make a decision based on true facts. * http://www.PlanetStruts.org/ * http://www.StrutsCentral.net/ -- HTH, Ted. ** http://www.husted.com/ted/blog/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: has struts reached the saturation
Just the opposite actually. I think if, as Michael says, you browse through the list archives over the last year, you will see that there has been quite a bit of activity building Struts up. I think the thing that makes people think Struts has stagnated is that it moves at a slow pace, slower than many other frameworks. But I think that isn't looking at it with the proper perspective. Struts is STABLE and MATURE, and hence has no need to progress at a breakneck pace any more. Spring, Wicket, WebWork, JSF, RoR, etc., all of these are trying to compete with something (in terms of mindshare) and take over the top spot from something that does the job for a great many of us and has built up a fabulous community over a number of years. To think this will happen overnight is folly. It in fact may not happen at all. But in either case, Struts will continue to progress and in fact learn lessons from the other frameworks... witness the migration to Chain in 1.3, I suspect because of the influence of JSF, and of course the planned merging of WebWork itself. No, Struts has not reached a saturation point. It has reached a point of maturity where it doesn't need to be revolutionary. Let the other frameworks blaze some new trails for a while, try some new ideas... there's nothing wrong with that. Struts is like that Ford truck in the garage... it may not have all the latest bells and whistles that the newer models do, but it's still the workhorse you haul all your stuff with! And, over time, you'll find that you mod it up a bit anyway too! Frank Jubin Kuriakose wrote: Hi I have heard that struts have reached a saturation point and nothing more can be build over it. New frame works like spring would take over struts. How valid are these opinions. sncerely jubs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: has struts reached the saturation
Ted Husted wrote: On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: I have heard that struts have reached a saturation point and nothing more can be build over it. New frame works like spring would take over struts. How valid are these opinions. Why traffic in opinions? Spend a few minutes browsing Planet Struts and Struts Central and make a decision based on true facts. * http://www.PlanetStruts.org/ * http://www.StrutsCentral.net/ -- HTH, Ted. ** http://www.husted.com/ted/blog/ Why does the phrase 'true facts' make me shiver and think of George Orwell? ;-) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts html taglib and javascript
Hi I am trying to put dynamic javascript in html:text tag. I have a checkbox next to a name (names are backed up by a list) and whenever the user changes the name the checkbox next to the name is automatically checked. javascript: document.someform.chkbox[%=indexId property in nested:iterate tag%].checked=true; but whenever I put jsp expression in the onchange attribute of the html:text, it never gets parsed. How to get over it? To solve, i used the plain old html input tag but I would really like to use the struts html:text tag... Please help... The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an 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 me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you.
Re: has struts reached the saturation
I've got a bit of advice for you ... either point at the opinions you are referring to directly (so people can evaluate them for themselves), or people are going to think you are yet another clone of Dakota Jack :-). Wht did u mean by that ??
Re: has struts reached the saturation
On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: I've got a bit of advice for you ... either point at the opinions you are referring to directly (so people can evaluate them for themselves), or people are going to think you are yet another clone of Dakota Jack :-). Wht did u mean by that ?? I mean that people who say this is what I heard or this is what I read, without giving others a chance to evaluate what *you* are basing your opinions on, are less likely to pay as much credence to your remarks as you might like. Unsubstantiated comments come across like rumors, innuendo, and FUD rather than sincere questions. Search the archives of this list and you will see classic examples of a person who illustrates this behavior pattern, and gets ignored by a wide part of the community *because* of that behavior. If you heard something, tell us *where* you heard it and *who* said it. Otherwise, nobody has a clue whether it is something we should pay attention to, or whether it is just noise. Craig
Re: has struts reached the saturation
oh sorry I wasn't aware of that rule. Anyway the quote Some might say that the Spring framework just *handles* Struts better than Struts handles itself I got from this link... http://www-128.ibm.com/developerworks/java/library/j-sr2.html I will adhere to that rule thnks Craig On 3/13/06, Craig McClanahan [EMAIL PROTECTED] wrote: On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: I've got a bit of advice for you ... either point at the opinions you are referring to directly (so people can evaluate them for themselves), or people are going to think you are yet another clone of Dakota Jack :-). Wht did u mean by that ?? I mean that people who say this is what I heard or this is what I read, without giving others a chance to evaluate what *you* are basing your opinions on, are less likely to pay as much credence to your remarks as you might like. Unsubstantiated comments come across like rumors, innuendo, and FUD rather than sincere questions. Search the archives of this list and you will see classic examples of a person who illustrates this behavior pattern, and gets ignored by a wide part of the community *because* of that behavior. If you heard something, tell us *where* you heard it and *who* said it. Otherwise, nobody has a clue whether it is something we should pay attention to, or whether it is just noise. Craig
java.lang.VerifyError: Cannot inherit from final class
I am developing a small web application with tomcat,struts and hibernate. At first,I am working at home useing the Jcreator as IDE,and there were no problems. Then I want to work at my company using myeclipse as IDE. I carefully transplant the code,jars and xml files to the eclipse project. When I deploy it to the tomcat, a big problem happens in the initial stage of initializing the ActionSerlvet.The problem is as follow: javax.servlet.ServletException: Servlet.init() for servlet action threw exception root case: java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.createContentDispatcher(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.(XMLDocumentFragmentScannerImpl.java:248) at org.apache.xerces.impl.XMLDocumentScannerImpl.(XMLDocumentScannerImpl.java:245) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.(Unknown Source) Through painful work of analyzing the problem with my coworkers, I find out this problem happens when use both the struts capability and hibernate capability in the myeclipse. Can somebody tell me what's the cause,and how to deal with it
Re: has struts reached the saturation
On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: oh sorry I wasn't aware of that rule. Anyway the quote Some might say that the Spring framework just *handles* Struts better than Struts handles itself I got from this link... http://www-128.ibm.com/developerworks/java/library/j-sr2.html I wondered if that might have been what you meant. It seems to me this article is all about how you can use Struts and Spring *together* to gain the benefits of both. It's a pretty classic example of how well designed frameworks (and both of these are) let you extend them seamlessly to tie them together. In this particular scenario, the author discusses using Spring's inversion of control facilities to let you configure your Struts actions in a way that is somewhat more flexible than the standard mechanisms that Struts supports (you can do it by customizing the action configuration classes, but it's not particularly user friendly). Out of curiousity, how does that translate to saturation in your opinion? I will adhere to that rule It's not really a rule ... but it's certainly a custom that will gain you more useful responses. thnks Craig Craig On 3/13/06, Craig McClanahan [EMAIL PROTECTED] wrote: On 3/12/06, Jubin Kuriakose [EMAIL PROTECTED] wrote: I've got a bit of advice for you ... either point at the opinions you are referring to directly (so people can evaluate them for themselves), or people are going to think you are yet another clone of Dakota Jack :-). Wht did u mean by that ?? I mean that people who say this is what I heard or this is what I read, without giving others a chance to evaluate what *you* are basing your opinions on, are less likely to pay as much credence to your remarks as you might like. Unsubstantiated comments come across like rumors, innuendo, and FUD rather than sincere questions. Search the archives of this list and you will see classic examples of a person who illustrates this behavior pattern, and gets ignored by a wide part of the community *because* of that behavior. If you heard something, tell us *where* you heard it and *who* said it. Otherwise, nobody has a clue whether it is something we should pay attention to, or whether it is just noise. Craig
Re: Error finding tiles-defs.xml
hi Dave, Even in Tomcat, cos u have to configure your ActionServlet,and tell it which initial parameter to load at startup, hence you need to specify your tiles-defs.xml as an initial parameter. This is tomcat/Jboss related, I have never worked on Websphere. On 3/10/06, Dave Newton [EMAIL PROTECTED] wrote: Hilton, Steve wrote: Oshima, thank you VERY VERY much! That fixed it. I had looked on so many web site, and at so many examples, and in so many books, and not one single resource I looked at EVER said to add that code to web.xml. Thanks again. I really appreciate it! Wow; I'm very confused. I've never put anything regarding tiles into my web.xml and can't figure out why you had to unless this is something websphere-ish. Is this a modules thing? I've never used them. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Name : Oshima Tlholoe Cell No: +2773 342 4393 Tel No : +2712 350 1282(w) E-mail : [EMAIL PROTECTED] simplicity is the ultimate sophistication
[ANN] JSP Controls Tag Library 0.5 has been released
New version of JSP Controls Tag Library (the Library) is much closer to future official public version 1.0. Since this release no major changes in API is expected. Heck, I am using it for a real website :) so the code has to be stable enough. No more big changes. Documentation on site is in process of being updated. The biggest change - Accept tag is removed. Check out the samples. Login component may seem very simple, but it showcases most features of the Library and of this release. Now some noticeable news in detail. Accept tag is removed - Previous versions of the Library used an idea that events must conform to certain format, that is, having specific suffix or prefix. Paul Benedict moved event-dispatching on a new level with EventActionDispatcher that does not require suffixes or prefixes. I liked it so much that I updated the Library along these lines. Previously Accept tag checked whether request contained an event (any event). This is not needed anymore. Instead, handler tags just grab whatever they feel appropriate as an event: jspc:handler event=logoutEvent % session.removeAttribute(USER); % /jspc:handler Struts Actions also can be used as controller using catch-all Handler tag with no event attribute: jspc:handler jsp:include page=/logincomponent.do / /jspc:handler Ajax request sequencing now works - Thanks to Laurie and Frank I implemented ordered Ajax requests. What for? Say, your composite page contains the following components: Main Menu, Change Language, Login/Logout and maybe something else. When a user logs in or out, user status is changed. Main Menu depends on user status, it shows different menu for a guest and for registered user. Change Language component does not depend on user status. So, the choices are: * After logging user in or out reload the whole page, then Main Menu will be reloaded automatically. This worked in previous versions. * Another option is to declare Main Menu as dependant of Login/Logout component. This way, after Login/Logout component is activated on and updated, another XHR is fired to redraw Main Menu. Voila! jspc:attach source=loginComponent.jsp dependants=['loginStatusComponent.jsp'] / Check Login sample for details. No need to use coarse-grained Form and Link tags anymore New Prepare tag exports important URLs and pre-built Javascript expressions to page context. These variables can be used with JSTL inside plain HTML to build forms and links, and to insert proper reload expressions. The exported variables are: jspcParentAddress jspcComponentAddress jspcFormOnsubmit jspcInputOnclick The JSP code looks like this: form action=${jspcComponentAddress} onsubmit=${jspcFormOnsubmit} label for=usernameUsername:/label input type=text name=username value=${username} /br/ label for=passwordPassword:/label input type=text name=password value= /br/ input type=submit name=loginEvent value=Log In onclick=${jspcInputOnclick}/br/ /form See their usage in Login/Logout example. This example indeed has it all. Usage of JSTL conditional expressions instead of Render tags -- c:if test='${empty USER}' jsp:include page=loginComponent-viewLogin.jsp / /c:if c:if test='${not empty USER}' jsp:include page=loginComponent-viewLogout.jsp / /c:if Again, see Login sample for details. Compatibility - Some variables are removed or renamed, some tags are renamed too, so... But things will get better from now on, the API is stabilized now. Wendy, Tag Component may see some improvements, but 0.5-compliant code won't break. So, feel free to try :-) Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: has struts reached the saturation
Out of curiousity, how does that translate to saturation in your opinion? I didn't come to an conclusion from this one article... It is the general opnion that struts is a mature and complete product and most programmers would choose struts. But its growth is limited to being a webframework only. Spring on the other hand is the whole deal. Struts have grown in almost all areas that concerns web development eg. validation security, presentation etc. And If you need another framework like Spring to carry it to the next step then its because it cant do it by itsself. also Its only an opinion by the way. dont crucify me. sincerley jubs
Using message resources in non-action class
In my struts application, I have resources file application.properties. This has been configured in the struts-config.xml file message-resources key=allMessages parameter=resources.application / Now, I would like to use this in my source code , in a non-action class. I tried the following MessageResources messageresources = MessageResources.getMessageResources(allMessages); When i tried to retrieve the message in the file String message = messageresources.getMessage(username.invalid); the message is null,altho' corresponding message for the key username.invalid is defined in the application.properties file. Can someone indicate the missing link? Regards, Anuradha S.Athreya
RE: Using message resources in non-action class
The following should work. MessageResources messageresources = (MessageResources) servlet.getServletContext().getAttribute(allMessages); Chandra -Original Message- From: Anuradha S.Athreya [mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 1:09 PM To: 'Struts Users Mailing List' Subject: Using message resources in non-action class In my struts application, I have resources file application.properties. This has been configured in the struts-config.xml file message-resources key=allMessages parameter=resources.application / Now, I would like to use this in my source code , in a non-action class. I tried the following MessageResources messageresources = MessageResources.getMessageResources(allMessages); When i tried to retrieve the message in the file String message = messageresources.getMessage(username.invalid); the message is null,altho' corresponding message for the key username.invalid is defined in the application.properties file. Can someone indicate the missing link? Regards, Anuradha S.Athreya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using message resources in non-action class
Yes this is a good solution! Do you also have a solution to access these message resources from a plain java-class there you don't have the servlet context? Nice greetings -- Initial Header --- From : [EMAIL PROTECTED] To : user@struts.apache.org, [EMAIL PROTECTED] Cc : Date : Mon, 13 Mar 2006 13:11:34 +0530 Subject : RE: Using message resources in non-action class The following should work. MessageResources messageresources = (MessageResources) servlet.getServletContext().getAttribute(allMessages); Chandra -Original Message- From: Anuradha S.Athreya [mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 1:09 PM To: 'Struts Users Mailing List' Subject: Using message resources in non-action class In my struts application, I have resources file application.properties. This has been configured in the struts-config.xml file message-resources key=allMessages parameter=resources.application / Now, I would like to use this in my source code , in a non-action class. I tried the following MessageResources messageresources = MessageResources.getMessageResources(allMessages); When i tried to retrieve the message in the file String message = messageresources.getMessage(username.invalid); the message is null,altho' corresponding message for the key username.invalid is defined in the application.properties file. Can someone indicate the missing link? Regards, Anuradha S.Athreya - 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]