[英]How to redirect the home page of the site to /public/index.html path
[英]Makes index.html part of the path
我正在构建一个网络游戏,也使用Java servlet-使用TomCat在本地运行它。 主页网址是: localhost:8080/index.html/
每当我尝试移动到其他servlet \\ page时,路径为: localhost:8080/index.html/inGame.html
,就好像index.html
是文件夹一样。
我该如何解决? 非常感谢你!
我认为你的代码应该是这样的
RequestDispatcher a = request.getRequestDispatcher(“其他servlet网址/映射”);
转发(请求,响应);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.