你已部署了名为PTS的Web网站,在根目录下有login.jsp的页面。以下( )是访问页面的正确的方法。
A: http://localhost:8080/servlet/login.jsp
B: http://localhost:8080/login.jsp
C: http://localhost:8080/PTS/servlet/login.jsp
D: http://localhost:8080/PTS/login.jsp
A: http://localhost:8080/servlet/login.jsp
B: http://localhost:8080/login.jsp
C: http://localhost:8080/PTS/servlet/login.jsp
D: http://localhost:8080/PTS/login.jsp
举一反三
- tomcat中访问helloapp应用的login.html文件时,在浏览器地址栏应写的url为 A: http://localhost:8080/helloapp/; B: http://localhost:8080/helloapp/login; C: http://localhost:8080/login.html; D: http://localhost:8080/helloapp/login.html
- 以下哪种格式是正确的URL( )。 A: http://localhost/8080/news/index.jsp B: http://localhost:8080/news/index.jsp C: http:localhost://8080/news/index.jsp D: http://localhost/8080:news/index.jsp
- 在Servlet中使用语句“response.sendRedirect("test/main.jsp");”实现页面重定向时,如果当前Servlet位于为本机项目的test的子目录test中,则实际重定向的页面URL为( ) A: http://localhost:8080/main.jsp B: http://localhost:8080/test/main.jsp C: http://localhost:8080/test/test/main.jsp D: http://localhost:8080/test/test/test/main.jsp
- 下面选项中,能够正确访问下面代码中方法是() A: http://localhost:8080/chapter12/hello/firstController B: http://localhost:8080/chapter12/first/firstController C: http://localhost:8080/chapter12/first/first D: http://localhost:8080/chapter12/hello/first
- 对于名为helloweb的Web应用程序,<;url-pattern>;的定义为/helloServlet/hello/abc.jsp,那么测试页面abc.jsp用的URL为( ) A: http://localhost:8080/helloweb/helloServlet/hello/abc.jsp B: http://localhost:8080/helloweb/abc.jsp C: http://localhost:8080/helloweb/helloServlet/abc.jsp D: http://localhost:8080/helloweb/hello/abc.jsp