*
The moose likes Struts and the fly likes How to use a href tag within a custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to use a href tag within a custom tag" Watch "How to use a href tag within a custom tag" New topic
Author

How to use a href tag within a custom tag

Anjali Naveen
Greenhorn

Joined: Jun 28, 2005
Posts: 15
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use a href tag within a custom tag
 
Similar Threads
need to transfer productID from url to action class in struts 2
Part of Composite-Id is foreign Key:How specify in Mapping?
shopping cart prob
Displaying Non-English Characters in XML attribute
Setting string variable with bean tag