Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top