• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Access resources from jsp without using "bean:message" tag

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I need access to message resources from jsp page not using <bean:message key=some.key/>.

So what is the name of bean, whitch stores messages? I found out, that it's name stores in Action.MESSAGES_KEY property of Action class. But i cannot download sources of struts.

Or maybe someone can tell me how to do this:<some_tag value="HERE MUST BE MESSAGE SOME.KEY"/> using JSTL or EL. Not using scriptlets

Thanks.
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello sir


Tell me what u need exactly ....because u dont need <bean:message and u dont need scriptlets .........then how will u achieve this with out writing a custom tag even that will do the same as <bean:message
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know your motivations for wanting this and I have a funny feeling I'd disagree with them if I knew what they were. Anyway, this might do the trick:
<bean efine name="org.apache.struts.action.MESSAGE" id="resources" scope="session"/>
 
intenter
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sreenath reddy:
Tell me what u need exactly ....



I need to do: <input type="submit" value="LOCALIZED MESSAGE"/>

And also <tiles ut name="value" value="LOCALIZED MESSAGE"/>
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Alexander

Seems u r not aware of html:submit tag .......... the first one u can do by using

<htnl:submit><bean:message key/></html:submit>

and coming to ur second requirement why do u need the path of a resource to come from resource bundle ..........because this will be in xml that too its very tough to get the path from bundle ...tell me excatly the scenarion where u need this type
 
intenter
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Layout source (take a look at title):

Of cource, i could insert <bean:message> directly into layout page, but in this case, this layout will not be "template" any more.

[ September 01, 2004: Message edited by: Alexander Chasovsky ]
[ September 01, 2004: Message edited by: Alexander Chasovsky ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic