Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

html link href

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Can anybody tell me how do i make use of <bean:message> inside <html:link href>... I meant

<html:link href="E:/hi.jsp">Url</html:link>

In my ApplicationResources.properties i have the following parameter

my.link=E:/hi.jsp

So i wanted to replace "E:/hi.jsp" in <html:link> tag to <bean:message key="my.link"/>

I do not want to use forward and action.
Since it is a static page, when i click that link i just want to display that page.

Please suggest me how to accomplish this.

thanx in advance.
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I dont think <html:link href="<bean:message key=''/>">text</html:link> will work.

There is another way how you can proceed. Read the properties file in the action class and set it using request.setAttribute() which can be retrieved in the jsp using

<% String val = (String) request.getAttribute(name); %>
and then set to href as

<html:link href="<%=val%>">

Hope this helps you....

regards
bhuvan
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<a href='<bean:message key="my.link"/>'>Url</a>

That should be simple enough.
 
I love a good mentalist. And so does this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic