Struts: Accessing Message Resource in an Action

T

Tim Adler

Hi everybody!

Basically the subject already states everything that this is about.
I'd like to access the message resource file for retrieving a
localized String value, but from within an action. I don't know how to
accomplish that. Can anybody help me?!

Thanks!

Tim

P.S.: BTW: Can anybody reach http://java.sun.com?! I'm not able to
from my point here. Either the company's proxy s****s or the page is
really down...
 
R

Ryan Stewart

Tim Adler said:
Hi everybody!

Basically the subject already states everything that this is about.
I'd like to access the message resource file for retrieving a
localized String value, but from within an action. I don't know how to
accomplish that. Can anybody help me?!

Thanks!

Tim

P.S.: BTW: Can anybody reach http://java.sun.com?! I'm not able to
from my point here. Either the company's proxy s****s or the page is
really down...

This is how it's done in the Struts html:messages tag:
String msg = RequestUtils.message(pageContext, bundle, locale,
report.getKey(), report.getValues());

where report is an ActionMessage. And yes, java.sun.com seems to be out of
commission. That's somewhat alarming. But did anyone else notice that the
net as a whole seemed slow yesterday? From work (Scott AFB, IL), from home
(same place but different access method), and from my parents' place in
Texas, everything was running slow. Maybe there's a new bug out? Or DOS's
going on?
 
L

Larry Steeger

Ryan Stewart said:
This is how it's done in the Struts html:messages tag:
String msg = RequestUtils.message(pageContext, bundle, locale,
report.getKey(), report.getValues());

where report is an ActionMessage. And yes, java.sun.com seems to be out of
commission. That's somewhat alarming. But did anyone else notice that the
net as a whole seemed slow yesterday? From work (Scott AFB, IL), from home
(same place but different access method), and from my parents' place in
Texas, everything was running slow. Maybe there's a new bug out? Or DOS's
going on?

They have apparently moved the server to a new ip:

http://192.18.97.175

The DNS change is very slow in propagating.

Larry Steeger
 
W

Warren

Whenever use <bean:message key=... />, it logs a couple of lines in weblogic
log looks like

[INFO] ......html.LocaleStrings.....

Anyone knows how to turn that off? What is the logging method struts use, if
none is configured
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top