日期:2014-05-17  浏览次数:20936 次

访问地址的斜杠
新建了一个工程,web.xml文档中定义了登录页面
<welcome-file-list id="WelcomeFileList">
  <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

访问地址为,http://localhost:8088/csgc
在浏览器中敲入该地址回车后,跳转到正确的页面,但地址后面自动加了斜杠,变成http://localhost:8088/csgc/
虽然不影响登录,但不知道该斜杠是怎么自动加上去的,谢谢!

------解决方案--------------------
csgc是web application ,你输入上面那个地址,默认访问的是csgc默认下的index.html,index.jsp等。。。。
------解决方案--------------------
你可以把它理解成一个目录,目录下的index.html,index.jsp等文件会被默认。一个目录后有货没有"/"都没有关系。