网络 格式化输出流;字符打印流
With a PrintWriter, you can now output string-based content.
使用Print Writer,您现在可以输出基于字符串的内容了。
Also, the results of the controller logic are written out using the PrintWriter.
而且,控制器逻辑的结果要用Print Writer写入。
This adds import statements of the packages needed for using classes such as PrintWriter.
这将添加使用诸如print Writer等类所需的包的导入语句。
Finally, since this is a servlet, we set the appropriate content type and flush the data from the PrintWriter.
最后,由于这是一个servlet,我们会设置相应的内容类型,并使用来自Print Writer的数据刷新它。
Another option, which we didn´t use in our example, lets you use PrintWriter in the servlet to print the form embedded in the page.
另外一种方式(我们在例子中并未使用)是允许使用servlet内的Print Writer打印嵌入在此页面内的表单。