struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Liles" <d...@dynamichostings.com>
Subject RE: ResourceBundle not available in ActionForm
Date Tue, 11 Nov 2003 15:53:13 GMT
Not sure if it matters, but is there a difference as to where the reference should be located
(ie: web.xml vs. struts-config.xml) between Struts 1.0 and 1.1? 

	-----Original Message----- 
	From: alvin antony [mailto:alvinbush@yahoo.com] 
	Sent: Tue 11/11/2003 9:42 AM 
	To: Struts Users Mailing List 
	Cc: 
	Subject: Re: ResourceBundle not available in ActionForm
	
	

	Hi Dominique,
	      Make sure that "ApplicationResources.properties" and "ApplicationErrors.properties"
are available in a package 'resources'
	under WEB-INF/classes or WEB-INF/lib/
	
	Alvin
	
	Dominique Kraus-Ahma <periodika@kraus-ahma.de> wrote:
	Hi,
	i am trying to access a message-resource, that holds my error messages.
	Since i have two message resources, i need to give them an id to identify
	them. This is how my struts-config.xml looks like:
	
	
	parameter="resources.ApplicationResources" />
	parameter="resources.ApplicationErrors" />
	
	Using them in the jsp-Page is no problem at all, e.g.:
	
	
	But when i try to retrieve a key in the appropriate ActionForm-class, i get
	the well known "Cannot find message resources under key
	org.apache.struts.action.MESSAGE" error. How come? Here is an excerpt of my
	ActionForm:
	
	ActionErrors errors = new ActionErrors();
	if( ( null == this.accountname ) || ( 1 > this.accountname.length() ) )
	errors.add( "accountname", new ActionError(
	"application.text.login.account" ) );
	
	
	I checked the spelling, i moved the resource files around within my
	catalouges, but it just won't work.
	Is there a way to specify the bundle to use, when trying to retrieve a
	message from the ActionForm class?
	
	Thanx in advance,
	
	Dominique
	
	
	
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
	For additional commands, e-mail: struts-user-help@jakarta.apache.org
	
	Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now. 

Mime
View raw message