• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to use <a href=""> in resource bundle file

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
On my jsp I am displaying a message from resource bundle. Some part of this message contains a hyperlink. Please, tell me how can use for the value in properties file.
Here is a dummy example

Message Resource:

mykey=This is swapnil guys.Want your help.Want to visit
 Javaranch.How to do?.

Jsp File:

<bean:message key="mykey"/>

Here it is getting displayed as it is, "This is swapnil guys.Want your help.Want to visit  Javaranch.How to do?."
Wherein I want a link on "Javaranch".

Help me out...
 
swapnil dangore
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,
The anchor tag I used in value attribute(a href="some link".) for Javaranch, got converted to a link.
But,on my Jsp, its not rendering a link. Its simple a plain text that we use for link a href="some link".
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a hard time understanding what you're saying. But it sounds like your HTML is getting escaped. I'm not familiar with the bean:message tag, but maybe if you did some googling for not escaping HTML. Or maybe if you didn't store the HTML in the string but used parameters to insert the HTML later. Normally when you store strings you're not intending to store HTML but the actual words that might need translating.
 
Seriously? That's what you're going with? I prefer this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic