This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Using dynamic keys with bean:message tag  RSS feed

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to do use dynamic key to display messages using <bean:message>. For example, I'd like to do something like this in my JSP:



Now, the above doesn't work because the JSP compler doesn't know how to find the key "title.<%=action%>". I think I understand why this doesn't work. However, I don't see how I can make it work.

Here is my intent: I want a page to add/view/edit an object. THe pages will be close to identical. The only differences will be:

  • The title will change (to say View or Edit or Add)
  • The buttons will change (in the case of Edit or View, there will be a "Delete" button


  • I would like to limit the proliferation of pages, so one single JSP page should handle everything. The display will be controlled by the value of the "action" attribute of the request.

    Can anyone help me out?

    T'anks,

    L
     
    L Duperval
    Ranch Hand
    Posts: 63
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    AArgh! I posted to the wrong forum. Can someone move it to "Frameworks" or to the "JSTL" forum, whichever is more appropriate?

    Thanks,

    L
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!