I think the best solution is to keep business code like that out of
Struts actions and even away from the Struts framework altogether.
Personally, I'd use Spring to manage my services, then use the
property placeholder to inject String constants into my services using
a properties file.  In the most simple case, have your service class,
which sends the email, look for a "/email.properties" file on the
classpath and load it in your constructor.

Don

On 12/27/06, Wesley Wannemacher <[EMAIL PROTECTED]> wrote:
Hello,

Seeking some advice...

I am hoping to create a standard method for passing configuration
snippets to Actions. For instance, let's say I have a method that among
other things, sends an email message. I don't want to hard-code which
email server I am planning on using, so how do I tell the Action that I
want to use serverX? I figure that whatever I do now, I'll be
copying/pasting (if not extending) in the future, so what would be the
best method, or what are you guys doing?

--
Wes Wannemacher
Double A Trailer Sales, Inc.
[EMAIL PROTECTED]

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



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

Reply via email to