如何设置web工程的首页--jsp

     在配置之前, 

     例如有工程CharigFH,在IE地址栏输入:http://localhost:8080/ChargFH,会出现该工程下的jsp文件列表。有时候会需要指定1个首页,那就需要如下方法了。

     这种现象可以通过在web.xml文件中添加如下标记来完成:

     <welcome-file-list>
          <welcome-file>/trad.jsp</welcome-file>
      </welcome-file-list>

      这样设置以后,输入http://localhost:8080/ChargFH后,回车,会指向到trad.jsp页面。

     

     

猜你喜欢

转载自blog.csdn.net/llxsharp/article/details/3183884