当前位置: 代码迷 >> J2SE >> response.getWriter().write("google");这句话为什么打印不出来呢?解决办法
  详细解决方案

response.getWriter().write("google");这句话为什么打印不出来呢?解决办法

热度:95   发布时间:2016-04-24 15:10:34.0
response.getWriter().write("google");这句话为什么打印不出来呢???
public   ActionForward   execute(ActionMapping   mapping,   ActionForm   form,
HttpServletRequest   request,   HttpServletResponse   response)   {
//   TODO   Auto-generated   method   stub

try   {
response.getWriter().write( "google ");
}   catch   (IOException   e)   {
//   TODO   Auto-generated   catch   block
e.printStackTrace();
}
return   null;
}

一运行这个action什么反应也没有

------解决方案--------------------
中关村 <JAVA> 高级群 40483505 欢迎高手加入讨论学习!
------解决方案--------------------
你直接用OUT对像来打印啊.
------解决方案--------------------
你想把代码打到那去!!!!!!
------解决方案--------------------
response就是不能打印出东西到页面上的,用out
  相关解决方案