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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
accessing message resources in processPreprocess
Jason Berk
Ranch Hand
Posts: 41
posted 17 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 17 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
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...