• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with ApplicationResources properties file.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
When an error occurs in my application I am getting the words "null null" appearing and nothing else.
I know the normal problem when you receive the "null null" message is that
there is no "errors.footer" or "errors.header" lines in the properties file.
My ApplicationResources.properties file is in the WEB-INF/classes directory
and I have set an init-param in my web.xml file.
But, I don't think the application is accessing my intended properties file.
Has anyone experienced a similar problem ?
Does anyone have any constructive hints / tips for me to keep looking to solve this problem ?
Would this be related to a CLASSPATH problem ?
Could the application be accessing another "properties" file somewhere?
Thanks in advance,
Mike Deegan

I have read the setup guide as per:
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_view.html#i18n

I have a properties file name ApplicationResources.properties in my /WEB-INF/classes dir
errors.footer=</ul><hr>
errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
errors.ioException=I/O exception rendering error messages: {0}
error.removed.attraction=<li><font color="red">Selected attraction has been removed.</font></li>
error.create.attraction=<li><font color="red">Unable to create the attraction.</font></li>
error.duplicate.attraction=<li><font color="red">Specified attraction already exists.</font></li>
error.removed.event=<li><font color="red">Selected event has been removed.</font></li>
error.create.event=<li><font color="red">Unable to create the event.</font></li>
error.duplicate.event=<li><font color="red">Specified event already exists.</font></li>
error.removed.userRole=<li><font color="red">Selected user role has been removed.</font></li>
error.create.userRole=<li><font color="red">Unable to create the user role.</font></li>
error.duplicate.userRole=<li><font color="red">Specified user role already exists.</font></li>
error.removed.occassion=<li><font color="red">Selected occassion has been removed.</font></li>
error.create.occassion=<li><font color="red">Unable to create the occassion.</font></li>
error.duplicate.occassion=<li><font color="red">Specified occassion already exists.</font></li>
error.missing.userId=<li><font color="red">Please enter the user id.</font></li>
error.missing.password=<li><font color="red">Please enter the password.</font></li>
error.missing.name=<li><font color="red">Please enter the name.</font></li>
error.missing.description=<li><font color="red">Please enter the description.</font></li>
error.missing.webSite=<li><font color="red">Please enter the web site.</font></li>
error.missing.address=<li><font color="red">Please enter the address.</font></li>
error.missing.ticketPrice=<li><font color="red">Please enter the ticket price.</font></li>
error.missing.webSiteURL=<li><font color="red">Please enter the webSiteURL.</font></li>
error.missing.location=<li><font color="red">Please enter the location.</font></li>
error.missing.startDate=<li><font color="red">Please enter the startDate.</font></li>
error.missing.endDate=<li><font color="red">Please enter the endDate.</font></li>
error.missing.dateString=<li><font color="red">Please enter the dateString.</font></li>
error.missing.image=<li><font color="red">Please enter the image.</font></li>
error.missing.activeFlag=<li><font color="red">Please enter the activeFlag.</font></li>
error.missing.createTS=<li><font color="red">Please enter the createTS.</font></li>
error.missing.createUser=<li><font color="red">Please enter the createUser.</font></li>
error.missing.lastUpdateUserTS=<li><font color="red">Please enter the lastUpdateUserTS.</font></li>
error.missing.lastUpdateUser=<li><font color="red">Please enter the lastUpdateUser.</font></li>
error.missing.id=<li><font color="red">Please enter the id.</font></li>
error.database.missing=<li><font color="red">Database is missing, cannot continue.</font></li>
error.dataaccess.invalid=<li><font color="red">Data Access problem encountered - Please try again later.</font></li>
error.loginId.required=<li><font color="red">User Id must be supplied.</font></li>
error.loginId.notfound=<li><font color="red">User Id not found.</font></li>
error.loginId.notactive=<li><font color="red">User Id not active.</font></li>
error.userPassword.required=<li><font color="red">Password must be supplied.</font></li>
error.userPassword.invalid=<li><font color="red">Password invalid - Please try again.</font></li>
error.unexpected=<font color="red">Unxpected error, Please contact webmaster.</font>

I have added the following to my web.xml
<!-- Standard Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>convertNull</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
 
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure, but I see
null [message] [message] ... null
when I am using Struts 1.0.2
when using 1.1b its gone.
 
Mike Deegan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem when you receive the "null [message detail] null" is that there is no "errors.footer" or "errors.header" lines in the properties file.
I am just getting the words "null null" there is no detail of the actual intended error message.
I am using jakarta-struts-1.0.2 - should I be using a later version ?
[ September 10, 2002: Message edited by: Mike Deegan ]
reply
    Bookmark Topic Watch Topic
  • New Topic