| Author |
Not able to initialize the properties file
|
J Brown
Greenhorn
Joined: Jan 03, 2006
Posts: 6
|
|
This is the message that I am getting when starting the resin server: - Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true - Initializing, config='org.apache.struts.action.ActionResources', returnNull=tr ue - Initializing, config='properties/ApplicationResources', returnNull=true --------------------------------------------------------------------------- web.xml... <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> --------------------------------------------------------------------------- struts-config.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <form-beans> <form-bean name="lookupForm" type="ch03.LookupForm" /> </form-beans> <action-mappings> <action path="/Lookup" type="ch03.LookupAction" name="lookupForm" scope="request" validate="false"> <forward name="success" path="/quote.jsp"/> <forward name="failure" path="/index.jsp"/> </action> </action-mappings> <message-resources key="application" parameter="ApplicationResources" /> </struts-config> --------------------------------------------------------------------------- index.jsp... <%@ page language="java" %> <html> <head> <title>Wrox Struts Application</title> </head> <body> <form action="Lookup" name="lookupForm" type="ch03.LookupForm" > <table width="45%" border="0"> <tr> <td><bean:message bundle='application' key='label.dotTimeJob'/>:</td> </tr> </table></form></body></html> --------------------------------------------------------------------------- My ApplicationResources.properties file is in /WEB-INF/classes dir and has the following... label.dotTimeJob=Time and Jobs --------------------------------------------------------------------------- Where am I going wrong?? Plz help...
|
 |
sai prasanna
Ranch Hand
Joined: May 02, 2005
Posts: 167
|
|
Hi Try with this Add an ActionServlet <init-param> subelement, naming the ApplicationResources, to the web.xml file as <init-param> <param-name>application</param-name> <param-value>ApplicationResources(ur app resource name)</param-value> <init-param> saiprasanna
|
 |
J Brown
Greenhorn
Joined: Jan 03, 2006
Posts: 6
|
|
My earlier config seemed to be fine. When I included <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> to my jsp; it worked though the foll messages are still coming. - Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true - Initializing, config='org.apache.struts.action.ActionResources', returnNull=true - Initializing, config='ApplicationResources', returnNull=true Thanks.
|
 |
J Brown
Greenhorn
Joined: Jan 03, 2006
Posts: 6
|
|
|
Could anybody tell me about the message that comes when my app server starts?
|
 |
 |
|
|
subject: Not able to initialize the properties file
|
|
|