Not able to retrieve the form values with special characters (such as Latin characters)

0 comments



Issue Faced:

Not able to retrieve the form values with special characters (such as Latin characters) in the servlet by using getter methods of Action form or Dyna Action form (form.get("textBoxName")).

Resolution:

Set character encoding to UTF-8 and then get data from request parameter.

E.g.:
request.setCharacterEncoding(encoding);
String textBoxValue = request.getParameter("textBoxName");

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club