The problem is as follows. There are two pages - main.jsp and books.jsp and the search form. When searching with books (GET method) everything is fine. When searching with main (if the search_str parameter came to the url), I do a response.sendRedirect(String url) on the books, specifying the address and search parameters that came in the request. But according to the result, the parameter does not come to books.jsp, for example, "books.jsp? Search_str = smith ", but "books.jsp? Search_str = A <8B ". That is, Russian characters come in a different encoding.
<%request.setCharacterEncoding("UTF-8");%> <%response.setCharacterEncoding("UTF-8");%> did not help. What to do to properly transfer the parameters when redirecting?
response.sendRedirect(java.net.URLEncoder.encode("index?name=Русский язык"));Took from here - MrFylypenkogetServletContext().getRequestDispatcher("/pages/books.jsp").forward(request,response);- gnoomqw6