• 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

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

 
Ranch Hand
Posts: 77
Android MyEclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you re-describe what you're trying to do?
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 MyEclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 MyEclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 MyEclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic