Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > locale strings in struts

Thread Tools

locale strings in struts

Mike Mayer
Posts: n/a
I'm having two problems with trying to read strings out of struts config
files. My google skills must be out of whack, because this should be easy
enough to find

First problem:
I'm trying to read a param in web.xml. Here's a snippet of the web.xml and
the code I am using to try to read the value. Does this look like I'm on the
right track? Because smtpServer is null...


public class MyAction extends Action {

void someMethod() {
ServletContext context = this.getServlet().getServletContext();
String smtpServer = context.getInitParameter("mailServer");

Second problem:
Trying to use "locale" strings in files. I
know I can define one, and get to it with the struts ActionMessage or the
jsp tag <bean:write >. How can I get the value and read it into a string in
my action class.
e.g.: (in an Action class)
void someMethod() {
String messageSubject = // read from

Thanks in advance
Mike Mayer Removed)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
the relation between C++ locale and C locale zade C++ 1 03-05-2010 06:04 PM
Re: List of locale values for locale.setlocale() under Windows Gabriel Genellina Python 0 02-18-2009 12:00 AM
Create C++ std::locale without changing C locale C++ 4 08-26-2008 01:15 PM
i18n problem, involving Locale.getDisplayLanguage and Locale.getDisplayCountry Maurice Hulsman Java 1 07-25-2004 06:11 PM
locale.nl_langinfo(RADIXCHAR) vs locale.localeconv()['decimal_point'] Jeff Epler Python 2 08-31-2003 02:18 PM