Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Struts
accessing message resources in processPreprocess
Jason Berk
Ranch Hand
Posts: 41
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
is it possible to access my message resource bundle from the processPreprocess method?
Durgaprasad Guduguntla
Ranch Hand
Posts: 99
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes, you can access Messages within that request processor method as follows:
protected boolean processPreprocess(HttpServletRequest request, HttpServletResponse response) { //Obtain message resources handle from the request MessageResources resources = (MessageResources) request.getAttribute(Globals.MESSAGES_KEY); String msg=resources.getMessage("app.test.msg"); return true; }
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Session time out in Struts app
process() & processPreprocess()
Compilation Problem
Accessing message resources outside an action class
Getting ApplicationResources from a Custome Request Processor
More...