在J2EE中,给定某Servlet的代码如下,编译运行该文件,以下陈述正确的是 PublicclassServlet1extendsHttpServlet{ Publicvoidinit()throwsServletException{ } Publicvoidservice(HttpServletRequestrequest,HttpServletResponseresponse) ThrowsServletException,IOException{ PrintWriterout=response.getWriter(); out.println(“hello!”); }}
在J2EE中,给定某Servlet的代码如下,编译运行该文件,以下陈述正确的是 PublicclassServlet1extendsHttpServlet{ Publicvoidinit()throwsServletException{ } Publicvoidservice(HttpServletRequestrequest,HttpServletResponseresponse) ThrowsServletException,IOException{ PrintWriterout=response.getWriter(); out.println(“hello!”); }}
1