1-5 练习题

单选练习题

  • 1

假设在helloapp应用中有一个HelloServlet类,它在 web.xml文件中的配置如下:






<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>org.javathinker.HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>


那么在浏览器端访问HelloServlet的URL是什么?


A

http://localhost:8080/HelloServlet

B

http://localhost:8080/helloapp/HelloServlet

C

http://localhost:8080/helloapp/org/javathinker/hello

D

http://localhost:8080/helloapp/hello