I am trying to get some user input value from a text box with special characters. But when I get it string is getting discarded with special character.
Like If i m passing input: poly&&(mer@) Below code is giving this string as: poly
HttpServletRequest request = ServletActionContext.getRequest();
request.setCharacterEncoding("UTF-8");
String text = (new String(request.getParameter("searchBarField")
.getBytes("UTF-8")));
In my jsp character encoding tag is there. Please suggest.