You can get the app.properties as long as you have the request

        MessageResources mr = (MessageResources)
pageContext.findAttribute( Action.MESSAGES_KEY );

The MESSAGES_KEY is static so you don't need the action.

-----Original Message-----
From: Andy Kriger [mailto:akriger@;greaterthanone.com] 
Sent: Friday, November 15, 2002 2:24 PM
To: 'Struts Users Mailing List'
Subject: giving biz classes access to MessageResources?


I have an organizational question. On my current project, we keep SQL
queries in our App.properties file to allow us to update the queries
without recomiling code. However, this means that (afaik) only the
Action can access the query Strings. So, whenever calls are made to our
dB class, we have to pass the query as a parameter.

Or do we?
The dB is a bunch of static methods (could be a singleton just as
easily). Is there a better way to set this up that allows the dB class
to know about the message resources? Will a call to System.getResource
work here? How are other folks handling this kind of thing?

thx
andy



--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to