File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
intenter
Greenhorn
Posts: 7
  • 0
  • 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.
 
sreenath reddy
Ranch Hand
Posts: 415
  • 0
  • 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
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic