jsp - 地址栏中的本地主机地址

标签 jsp jakarta-ee tomcat servlets localhost

当我输入以下网址时

http://localhost:8080/helloapp (no slash in last position)

在地址栏回车,自动显示

http://localhost:8080/helloapp/ (note the slash at last position)

这是什么意思?

http://localhost:8080/helloapphttp://localhost:8080/helloapp/ 是一回事吗?

我正在使用 tomcat。

最佳答案

它们是同一件事,这很可能是由于 php 或 apache 设置强制尾随/

这是 seo 中防止重复内容的常见做法。

关于jsp - 地址栏中的本地主机地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21734712/

相关文章:

java - 关于Interceptor中读取POST方法参数

tomcat - jsf 东西的 gzip 压缩

jsp - Tomcat 禁用/销毁或重用特定请求的 session 创建

java - 如何在JSP三元运算中使用scriptlet值?

javascript - 将 JSON 字符串从 jsp 传递到 js 文件

java - 无法在 Person 和 Address 类之间建立 'many-to-many' 关系

java - 为什么struts2-junit插件提示约定插件?

jsp - 本地主机上的 Tomcat v9.0 服务器无法在 Eclipse 中启动

jsp - 服务器如何优先使用哪种类型的 web.xml 错误页面?

java - Spring Boot YML 和 StandAlone Tomcat 8 服务器