骑猪闯天下

J2ME随笔,记录成长的脚步

统计

留言簿(3)

阅读排行榜

评论排行榜

[J2ME] 服务器端servlet相关知识

服务器端servlet中 PrintWriter out=response.getWriter() 用法


1. 打个通俗的比方就是通过HttpServletResponse对象得到一支笔,然后就可以用out.print()方法在网页上写任何你想显示的内容。  
  out.print("<html><body>");  
  out.print("任何内容");  
  out.print("</body></html>");

2. 通过PrintWrite,以流方式输出html,返回给客户端,显示在IE上。

posted on 2008-09-01 16:45 骑猪闯天下 阅读(342) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: