tomcat - 如何在 tomcat 中设置指向 webapp 中另一个文件的 url 路径?
问题描述
我在 tomcat 的 Webapps/MyApp/Web/index.html 位置有一个文件。
如果我使用以下 URL,我可以访问它: :/MyApp/Web/index.html
我想再使用一个 URL 来访问这个位置::/MyApp/Strom/Web/index.html
我的 webapp 中不存在 Strom 目录,我不希望它存在,我只想将 Strom 的 URL 重定向到 Web。
如何通过设置上下文路径在 tomcat 中实现这一点?
我尝试在 host 标记下的 server.xml 中设置上下文路径。
但它没有用。
解决方案
推荐阅读
- laravel - Laravel 7 - 随机延迟(主要是 ajax 请求 - 从 300ms 到随机 4,5s)
- ios - 在 ViewWillAppear 和 ViewWillDisappear UI 故障处隐藏/显示导航栏
- php - Laravel/homestead - 没有指定输入文件
- javascript - 将组件道具传递到 ReactJS/NextJS 中的字符串中
- ios - ModelPresentationStyle FullScreen 总是隐藏状态栏
- javascript - *this* 对象在 React 组件中是“未定义的”
- python - 通过sftp成功上传后删除本地机器中的文件
- javascript - React:番茄钟:考虑到状态的异步更新,如何正确更新状态?
- rust - How can I get web::Data
> in actix-web 2.0 middleware? - sql-server - 无法替换 SQL Server 2017 中的空字符串