Yes, If file is at wrong location or key is missing then error will be >> Missing message for key "label.title"
Cause of error may be different -B -----Original Message----- From: kokro [mailto:[EMAIL PROTECTED] Sent: Thursday, August 16, 2007 7:41 PM To: user@struts.apache.org Subject: RE: Retriving values from a properties file using Struts 1.3.8 The ApplicationResources.properties file is into (being just a simple application I have just copied the project into the webapps subdir without creating a .war file): Tomcat 5.5.23 installation dir\webapps\GestioneMP3\WEB-INF\classes\it\francesco\tutorial\utils Is this what you meant Baseer? Thanks Baseer Patel MD wrote: > > Please check location of property file > It should be in "it.francesco.tutorial.utils" inside your web root > WEB-INF\classes (i.e classpath) > > -----Original Message----- > From: kokro [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 16, 2007 7:22 PM > To: user@struts.apache.org > Subject: Retriving values from a properties file using Struts 1.3.8 > > > Hi all, > > I'm developing a test application using Struts 1.3.8 and Java 1.5.0_12 > and I > have this problem: when I try to get the value linked to the key > "login.title" I get this error: > > > org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6 > > > 3: <html> > 4: <head> > 5: <title> > 6: <bean:message key="label.title"/> > 7: </title> > 8: </head> > 9: <body> > > > Stacktrace: > > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle > tWrapper.java:467) > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:389) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > root cause > > java.lang.NullPointerException: Module 'null' not found. > > org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755) > > org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735) > > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java > :1098) > org.apache.struts.taglib.TagUtils.message(TagUtils.java:956) > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:224) > > org.apache.jsp.index_jsp._jspx_meth_bean_005fmessage_005f0(index_jsp.jav > a:104) > org.apache.jsp.index_jsp._jspService(index_jsp.java:64) > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) > > > > If I have understood well it should mean that the properties file is > unreachable. > > Below I post code fragments: > > index.jsp > > <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <html> > <head> > <title> > <bean:message key="label.title"/> > </title> > </head> > <body> > <br/> > <bean:message key="label.insertNewSong"/> > <br/> > <html:link forward="searchSong"> > <bean:message key="label.searchSong"/> > </html:link> > <br/> > </body> > </html> > > > web.xml > > ........ > <taglib> > <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> > <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> > </taglib> > <taglib> > <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> > <taglib-location>/WEB-INF/struts-html.tld</taglib-location> > </taglib> > ............ > > > struts-config.xml > > ............ > <!-- Message Resources Configuration --> > <message-resources > parameter="it.francesco.tutorial.utils.ApplicationResources"/> > .................. > > > where ApplicationResources is the .properties file name. > Considering that I've already checked that each .tld and .xml file are > in > the right place, what could be the problem? (If I dont use bean:message > and > html:link but write values and use a href the page is displayed)? > > > Thanks a lot > -- > View this message in context: > http://www.nabble.com/Retriving-values-from-a-properties-file-using-Stru > ts-1.3.8-tf4279774.html#a12181793 > Sent from the Struts - User mailing list archive at Nabble.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] > > > -- View this message in context: http://www.nabble.com/Retriving-values-from-a-properties-file-using-Stru ts-1.3.8-tf4279774.html#a12182124 Sent from the Struts - User mailing list archive at Nabble.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]