• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts 1 supports in using <bean:message> multiple times

 
damodar kumar
Ranch Hand
Posts: 77
Android Chrome MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have a requirement to show multiple messages in a jsp , can i use <bean:message>, will this support to get multiple messages in a jsp.

Im using sturts 1 .

Please help me
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you re-describe what you're trying to do?
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you mean by message, that you have to print some dynamic text on the page?

if yes you could add the messages to an ArrayList in you controller and pass it to the JSP and in the JSP use a c:forEach tag to iterate over the list and print the "messages"
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However if your application in internationalized (multiple languages) you can put the "keys" of your messages in the ArrayList, and use the <bean:message> to print the internationalized message.
 
damodar kumar
Ranch Hand
Posts: 77
Android Chrome MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes im implementing internationalization, and also im using struts version 1.1 did struts version supports using of <bean: message> multiple times in a jsp.

for example :

lets think

there are 5 labels in my jsp which needs to be internationalization so that i want use <bean: message> five times in my jsp

did struts 1.1 supports using of <bean: message> 5 times in my jsp are there i any other alternate present

please suggest me.

Thanks & Regards,

Damodar.
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if it accepts <bean:message> once it will accept it 100000 times

just try it and everything will be fine, but check out how to use it first
 
damodar kumar
Ranch Hand
Posts: 77
Android Chrome MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Omar Al Kababji


I did a RND , but

Struts 1.1 doesnot support to have multiple beam message tags in a singal jsp file ,

Please any body provide me any other approach to show the lables of the jsp depending on locle.

Thanks & Regards,

Damodar.
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
impossible, you can use it as much as you want:



two things, you didn't try it, or I don't understand what you mean by multiple messages on a JSP.
 
damodar kumar
Ranch Hand
Posts: 77
Android Chrome MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Omar Al Kababji ,

Thanks for your support and suggestions.

The problem is not with struts it the problem with weblogic 8.1 , it is not compiling the jsp having two bean:message tags,

the problem was solved , i moved to weblogic 9.1 and websphere 6.0.

Thanks a lot abd your support for all the people who replayed me.

Dam
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That doesn't make any sense--there's nothing in WL 8.1 that "doesn't support" mutliple <bean:message> tags; we had multiple S1 apps, all with many tags, running on 8.1.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic