This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
For my project I am sending the HTML value from one text editor. For that I had set the character set to UTF-8. Here I am sending value through URL. In the text editor I am Providing the facility of changing the color of text.
Now when I change the color of text then on the servlet page where I had to get those values and to store it on database, am not able to get the entire value from URL. I am just getting the value before '#' symbol.
I am sending following HTML value from URL.
<p>Add Your Text<font class="Apple-style-span" color="#FFCC33"> Here.</font></p>
and while getting this value on servlet I got URL:
But can you help me how to encode the URL, and let me know you that before around 20 days this problem was not raised where I was using the same code. but after formatting my laptop and installing softwares again I start getting this problem
Use one of the static methods from the java.net.URLEncoder class. Encode the parameter values. That's all you have to do in your code. Rebooting and reinstalling should have no effect if you do that.
Joined: Nov 08, 2010
Thanks all for your valuable suggestions I had tried URLEncoding but still it was causing problem in safari browser where it was working perfectly with mozila.
So I find another way that now I am sending the value through hidden variable to servlet and now it is working perfectly.