Publicvoid service(HttpServletRequest request,HttpServletResponse response)
ThrowsServletException,IOException{
PrintWriterout = response.getWriter(); out.println(“hello!”);
}} [单选题] *
编译该文件时会提示缺少 doGet()或者 dopost()方法,编译不能够成功通过
编译后,把 Servlet1.class 放在正确位置,运行该 Servlet,在浏览器中会看到输出
文字:hello!(正确答案)
编译后,把 Servlet1.class 放在正确位置,运行该 Servlet,在浏览器中看不到任何
编译后,把 Servlet1.class 放在正确位置,运行该 Servlet,在浏览器中会看到运行期
10. 在 Servlet 中,response.getWriter()返回的是() [单选题] *
11 . 在 web.xml 中使用() 标签配置过滤器 [单选题] *
D. <filter-pattern>和<filter>
12. 自定义标签的描述文件在 web.xml 中配置正确的() [单选题] *
<tag-uri>bob-tld</tag-uri> <tag-location>/WEB-INF/bob.tld</tag-location>
B. <tag>
<taglib-uri>bob-tld</taglib-uri> <taglib-location>/WEB-INF/bob.tld</taglib-location>
评论0
最新资源