Java如何定义Web应用程序的欢迎文件?
下面的配置为我们提供了如何为Web应用程序定义欢迎文件的示例。当我们访问URL而不告知要加载哪个页面时,欢迎文件是servlet容器要加载的默认文件。
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
热门推荐
10 英语寄信祝福语范文简短
11 麻将打牌祝福语简短霸气
12 鼓励弟弟高考祝福语简短
13 婚礼父母在家祝福语简短
14 妹妹生日宴祝福语简短
15 疫情加油蛋糕祝福语简短
16 搬家祝福语卡片文案简短
17 新车新家祝福语大全简短
18 边防女兵祝福语大全简短