Should be located in struts-core http://www.java2s.com/Code/Jar/Apache/Downloadstrutscore135jar.htm
make sure you struts-core*.jar goes in ./WEB-INF/lib As you are located in Canada it is possible you *may* have be using different Locales in which case you want to use getMessage(Locale,key) http://www.up.ac.za/services/it/intranet/sysops/docs/struts/struts-1.2.7/webapps/api/org/apache/struts/util/MessageResources.html#getMessage(java.util.Locale,%20java.lang.String) HTH Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Wed, 21 Jan 2009 18:18:06 -0800 > From: ee...@ncf.ca > To: user@struts.apache.org > Subject: s1: java.lang.NoClassDefFoundError MessageResources > > > Hi, > > I have a Java class as a model which has a method taking a MessageResources > as a parameter and returning a String loaded from a properties file using > the MessageResources. The model is created in Action.execute(). The project > can be compiled but when running it, we get java.lang.NoClassDefFoundError > org/apache/struts/util/MessageResources. > > I checked classpath and it contains struts-core-1.3.5.jar. I also checked > the MessageResources argument and it is not null. Any idea about why it > happens? Thanks. > > In Search.java (model): > public String getSearchIntro(MessageResources mr) { > return mr.getMessage("search.intro"); > } > > In Action.execute(): > MessageResources mr = getResources(...); > Search s = new Search(); > String intro = mr.getSearchIntro(mr); > -- > View this message in context: > http://www.nabble.com/s1%3A-java.lang.NoClassDefFoundError-MessageResources-tp21593753p21593753.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Windows Liveā¢: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_012009