我有一个带有spring服务调用的简单servlet这里是doGet方法
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("==========================TEST=======================");
logger.info("Inside doGet");
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());
MYServiceIF mYServiceIF= (MYServiceIF) wac.getBean("mYService", MYServiceImpl.class);
System.out.println("------------------------" + applicationContext);
//*********************
int recordsFetched = mYServiceIF.readInfo();
//*********************
logger.info("No ofrecords fetched" + recordsFetched );
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>Servlet Testing</TITLE>");
out.println("</HEAD>");
out.println("<BODY>");
out.println("Welcome to the Servlet Testing Center: No of Records fetched in Service" + recordsFetched);
out.println("</BODY>");
out.println("</HTML>");
}
system.out.println没有打印任何内容,我在带有数据的网页中获取输出, 什么可能是错误的,Sysout不起作用,但out.println正在工作。 当我启动本地JBOSS EAP 6.2服务器时,会打印启动日志,但之后在Sysout中没有打印任何内容,但程序正在运行。请帮忙。