java工程师信产部认证考试

在J2EE 中,myWebApp目录是一个Web应用程序根目录,当在浏览器中输入http://localhost:8080/myWebApp/时,会自动打开 该目录下的start.jsp文件。为了达到这个要求,需要在web.xml中添加如下代码()。A、<welcome-file>start.jsp</welcome-file> B、<welcome-file-list>start.jsp<welcome-file-list> C、<welcome-list><welcome-file>start.jsp

题目

在J2EE 中,myWebApp目录是一个Web应用程序根目录,当在浏览器中输入http://localhost:8080/myWebApp/时,会自动打开 该目录下的start.jsp文件。为了达到这个要求,需要在web.xml中添加如下代码()。

  • A、<welcome-file>start.jsp</welcome-file> 
  • B、<welcome-file-list>start.jsp<welcome-file-list> 
  • C、<welcome-list><welcome-file>start.jsp</welcome-file></welcome-list> 
  • D、<welcome-file-list><welcome-file>start.jsp</welcome-file></welcome-file-list>
参考答案和解析
正确答案:D
更多“在J2EE 中,myWebApp目录是一个Web应用程序根目录,当在浏览器中输入http://localhost:8080/myWebApp/时,会自动打开 该目录下的start.jsp文件。为了达到这个要求,需要在web.xml中添加如下代码()。A、welcome-filestart.jsp/welcome-file B、welcome-file-liststart.jspwelcome-file-list C、welcome-listwelcome-filestart.jsp/welcome-fil”相关问题