Response. getWriter (). write () Prints garbled information to the front-end. Solution: response. getwriter
Response. getWriter (). write (): displays a piece of information on the front-end page.
In normal url mode, a new page is generated to display the content.
When ajax is used, the content is displayed in alert.
Garbled error using response. getWriter (). write ()
Solution:
Response. setContentType ("text/html; charset = UTF-8"); response. getWriter (). write ("pass the content to display here! ");
ResponsegetWriter () write ()
'<>' Needs to be changed, such as: I <depressed>.
After reading the results, the browser automatically converted my symbols. I separated the characters by 'add'. When you write the code, you can remove 'add': & add lt; and & add gt; note <or> after the semicolon cannot be lost. do you understand?
Why does the content of responsegetWriter () write ("xxxxxxx") in java appear in the title of the page?
Page title?
Is it the title bar of the browser?
Or is the title tag of the html head on the page?
Du tianwei [authoritative expert]