I am passing இயற்பியல் in subject name from Javascript to Java, while using alert in javascript.

alert(subject name);

இயற்பியல் is shown, whereas if I get value of subject name using

String subname=request.getParameter("subject name").toString;

..it's not returning.

有帮助吗?

解决方案

don't put spaces in URL arguments. If you want to pass the subject name, use something like "&subjectName="+encodeURIComponent(yoursubjectnamevar), and make sure to then unpack it in Java as well, because it'll now look like %E0%AE%87%E0%AE%AF%E0%AE%B1%E0%AF%8D%E0%AE%AA%E0%AE%BF%E0%AE%AF%E0%AE%B2%E0%AF%8D

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top