• 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

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic