velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony E. Carlos" <anth...@digitalphenom.com>
Subject Struts 1.2.4 / ActionMessages tool not using properties file?
Date Thu, 21 Oct 2004 13:23:29 GMT
Hello!

I'm moving my webapp to Struts 1.2.4 from 1.1.x and it looks like the 
ActionMessages tool stopped working. Instead of using a key to lookup a 
message from the application.properties file, the ActionMessages tool 
is simply displaying the key.

Here's what I'm doing in my Struts Action:

	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		ActionMessages messages = new ActionMessages();
		ActionMessage m1 = new ActionMessage("status.notLoggedIn"); // Here's 
the key-
		messages.add(ActionMessages.GLOBAL_MESSAGE, m1);
		saveMessages(request, messages);
		return mapping.findForward("success");
	}



On the vm page, I'm using:

#foreach($m in $messages.getAll())
     $m<br>
#end



I've double-checked my application.properties file and it has an entry 
for status.notLoggedIn:

status.notLoggedIn=You were not logged in.


Unfortunately, what shows in my web browser is:

status.notLoggedIn



which should really say:
You were not logged in.



Therefore, my question is has anyone seen this kind of behavior before? 
Is the ActionMessages tool compatible with Struts 1.2.x? One of the big 
changes is that Struts 1.2.x deprecated the use of ActionErrors.  I 
know that some of the other tools work. For example, the Link tool is 
still working and correctly converting references for me.

Any ideas? Am I missing something really obvious?

Thanks,

-Anthony Carlos


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message