开发者

Problem in getting symbol from URL

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.

Ex. 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:

localhost:23056/OUMS/recent_event?text=%3Cp%3EAdd%20Your%20Text%3Cfont%20class=%22Apple-style-span%22%20color=%22#FFCC33%22%3E%20Here.%3C/fo开发者_Go百科nt%3E%3C/p%3E%20%20&col_id=c1

And when I display the value of 'text' variable then it shows:

<p>Add Your Text<font class="Apple-style-span" color="

Here U can see that from URL of Servlet I am not able to get the value after symbol "#".

What's the reason of this? How can I solve this problem.


You need to escape the # because it has a special meaning in HTTP URLs.


Did you used javascript escape function before sending the data to servlet?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜