<form action="./" >或者为<form action="/" >的提交路径

<form action="./" >或者为<form action="/" >的提交路径:

这里表示提交到项目的根路径:

比如:http://localhost:8080/suyuyuan/

表示为访问项目的根目录下的 默认加载的首页,这个默认加载的首页可以在web.xml中配置:

welcome-file子元素用于指定默认文件的名称。welcome-file-list元素可以包含一个或多个welcome-file子元素。如果在第一个welcome-file元素中没有找到指定的文件,Web容器就会尝试显示第二个,以此类推。

如:

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>


比如访问:http://localhost:8080/项目名称/     

这里是:http://localhost:8080/suyuyuan/

则会先加载:http://localhost:8080/suyuyuan/index.html

加载失败则往下递推。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值