<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
加载失败则往下递推。