You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Muhammad Momin Rashid <mo...@amaana.com> on 2004/09/27 14:19:25 UTC

Re: Upgrading to 1.2.4 : problem with message resources

Hello Charl,

One nice guy point me to the following URL, which cleared a lot of 
confusions about upgrading to struts 1.2.4 and taking care of depricated 
methods.

http://wiki.apache.org/struts/StrutsDeprecatedActionErrors

Hope this helps you as well.

The point to keep in mind is that ActionError is depricated, while 
ActionErrors is not.  The existing code probably had a lot of dependency on 
ActionErrors, and perhaps due to that reason the team thought it would be 
more appropriate to depricate ActionErrors at a later date.  Eventually the 
ActionErrors will be depricated, but for now, it is part and parcel of 
ActionForm.

I recently upgraded my companies application from struts 1.1 to 1.2.4, and 
so far things seems to be working fine.

I am not sure where your problem lies, but here are a few things you can 
cross check to see if you didn't miss out anything during your upgrade

* Since ActionErrors is not depricated, so I didn't change any of my 
ActionErrors (they are being used in my form and action classes).

1. Make sure that you've changed your configuration (*.xml) files from 
struts 1.1 to 1.2.4 (change their DOCTYPE tags to newer version).
2. Make sure that in your action classes, all ActionError are changed to 
ActionMessage
3. Change SaveErrors to SaveMessages in your action classes.
4. Make sure that in your form beans all ActionError are changed to 
ActionMessage.
5. Check if you accidently changed any of "ActionErrors" (not ActionError) 
in your form beans you were using to ActionMessages (this can happen if you 
are using search and replace).
6. Make sure that you've deleted all of previous tld's and copied over the 
ones from 1.2.4.
7. Make sure that you have deleted all of your previous jars and copied over 
the newer ones from 1.2.4.
8. Make sure that you have deleted all of your previous dtd's and copied 
over the newer ones from 1.2.4.
9. Make sure that you've deleted the old deployments from the J2EE server 
you are using (also delete the older files from the server cache i.e. temp 
and work folders)'

Redeploy your application and it should work

Let me know if that helps,

Regards,
Muhammad Momin Rashid.

"Charl Gerber" <ch...@yahoo.com> wrote in message 
news:20040927090146.25783.qmail@web41213.mail.yahoo.com...
> Hi,
>
> I've upgraded from 1.1 to 1.2.4. As far as possible, I
> changed the ActionError instances with ActionMessage
> (In ActionForm and Action classes). Used the 1.2.4
> tld's and jars instead of 1.1 and the rest stayed
> exactly the same.
>
> When form validation returns an error, I know get:
>
> javax.servlet.jsp.JspException: Cannot find message
> resources under key org.apache.struts.action.MESSAGE
>
> The ApplicationResources.properties file is still in
> /WEB-INF/classes and configured according. Nothing
> else changed - the app worked fine in 1.1 but not in
> 1.2.4.
>
> In 1.2.4, why does the ActionForm still return
> ActionsErrors and not ActionMessages? Weird that
> ActionError is deprecated and not ActionErrors....
>
> Can anyone shed some light on this? Thanks.
>
> Charl 




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