Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Rajnish Ojha
Greenhorn
+ Follow
1
Posts
0
Threads
0
Cows
since Jun 05, 2007
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (1/100)
Number Threads Started (0/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (1/10)
Number Threads Started (0/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by Rajnish Ojha
A href command not working
Hi Suleman
There is no error in your code except in a method
public static String encodeHtmlTag(String tag) { if (tag==null) return null; int length = tag.length(); StringBuffer encodedTag = new StringBuffer(2 * length); for (int i=0; i<length; i++) { char c = tag.charAt(i); if (c=='<') encodedTag.append("<"); else if (c=='>') encodedTag.append(">"); else if (c=='&') encodedTag.append("&"); else if (c=='"') //ERROR : encodedTag.append("""); encodedTag.append("\""); //when trying to output text as tag's value as in // values="???". else if (c==' ') encodedTag.append(" "); else encodedTag.append(c); } return encodedTag.toString(); }
indicated by ERROR: .And it working fine with satisfying your requirement.
show more
16 years ago
Servlets