Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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 ]
 
    Bookmark Topic Watch Topic
  • New Topic