使索引.html路径的一部分

Makes index.html part of the path

本文关键字:一部分 路径 html 索引      更新时间:2023-09-26

我正在构建一个网页游戏,也使用Java servlets-使用TomCat在本地运行它。主页网址为:localhost:8080/index.html/

每当我尝试移动到其他servlet''page时,路径是:localhost:8080/index.html/inGame.html好像index.html是一个文件夹。

我该如何解决它?谢谢!

我认为你的代码应该是这样的

RequestDispatcher

a = request.getRequestDispatcher("other servlet url/mapping");

a.转发(请求、响应);