• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Not able to initialize the properties file

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could anybody tell me about the message that comes when my app server starts?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic