"Struts Newsgroup (@Basebeans.com)" wrote:

> can someone give me a hint, how i can access MessageResources (From
> ApplicationResources.properties) within a Subclass of ActionForm???
>
> My prpoblem is, the ActionForm does not know anything about the
> ActionServlet, and so I have no Chance to get the Messages within
> ActionForm.
>
> I tried this:
> servlet.getMessageResources().getMessage("STRING_TO_LOOK_UP");
>
> But "servlet" and "getServlet" returns null.

Are you using the nightly build?  One used to be able to use
getServlet().getResources() from an ActionForm, but ActionServlet.getResources
has been deprecated.  Last time I tried it, it didn't seem to be working any
longer either.

Currently I'm getting the resources by calling
"request.getAttribute(Action.MESSAGES_KEY)".

Bruce


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to