Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use a href tag within a custom tag

 
Anjali Naveen
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a custom tag which has to render a link. Im using a href for rendering the link

String str ="a href="+actionName+"?method="+methodName+"&productId="+productId+"&productName=" + productName+">"+ productName+"</a>";

The product id and name is retrieved from the data base
The link works fine except that if the product name consists of spaces, the spaces dont get passed through the request
Eg: If the product name is 'Photo Frame' just Photo gets displayed on the next page
How do i ensure that the spaces are escaped within the string
Plz help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic