Problem with front desk printing information garbled

  • 2020-12-13 19:02:57
  • OfStack

response.getWriter().write() function: display 1 paragraph of information on the front page.

When in normal url mode, a new page is generated to display the content.

When in ajax mode, content is displayed in alert.

response.getWriter().write() problem

Solutions:


response.setContentType("text/html;charset=UTF-8"); 
response.getWriter().write(" Pass the content to display here! ");

Related articles: