I got my answer from struts-dev:

MessageResources resources =
            (MessageResources) request.getAttribute(Action.MESSAGES_KEY)

So basically anytime you have the request, you've got your resources (and a
fair bit of other stuff too, I imagine).  I'm not sure if this is ideal for
everyone, but it seems better than other options...

-JT

-----Original Message-----
From: Bryan Hilterbrand [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 21, 2002 11:29 AM
To: Struts Users Mailing List
Subject: Re: getting MessageResources within ActionForm.reset()


Why don't you do your initialization in the action method?

Bryan

----- Original Message ----- 
From: "Taylor, Jason" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 21, 2002 12:06 PM
Subject: getting MessageResources within ActionForm.reset()


Since the ActionServlet.getResources() method is now deprecated, you need a
request and an Action object to get Resources.  That's fine so long as
you're operating within the Action class, but if you're in the ActionForm
object and you want to get Resources, you can't because
Action.getResources(HttpServletRequest) has protected access.  
 
Am I missing something or is this a job for struts-dev?
 
-JT



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

Reply via email to