• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

hyperlink and message resources..

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like my JSP to render a link similiar to this:
"User DOYLE_T is out of office" (for example). The username in capitals is a URL that once the user clicks can see a page showing that user's profile. I can do this on the JSP fine (i.e store the username in the request and construct the link on the JSP using the username).

For my application though the above message needs to be generic so that any action can add their own specific text. In this respect i will need to construct the message (including the URL) in the action (and then store in the request).

Does anyone know how i can cleanly do this (apart from prepending "a href" etc into my variable in my action) ? Normal text would be fine but ament sure how to incorporate the URL part..

any help (code sample / link / example) would be great. Thanks...
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ronan,
What about something like:

In your Struts Message Resources
page.one={$} is out of the office
page.two={$} is on another planet


In your action(s):




Or what about instead of putting it in your action, using "bean-el:message" in your JSP something like:


Good luck!
-Jim
[ July 24, 2007: Message edited by: Jim Hardin ]
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic