gpt4 book ai didi

java - Servlet容器: how to forbid access to a folder

转载 作者:行者123 更新时间:2023-12-01 17:37:08 27 4
gpt4 key购买 nike

我使用 Jersey 作为我的 REST API。我使用 JSP 文件作为 View 。我将 JSP View 文件放在 www/views/... 中。现在,我想禁止通过规范 URL 上的简单 HTTP 请求来访问这些 View 。

禁止客户端直接访问这些 JSP 的最佳方法是什么?

最佳答案

将 JSP 粘贴到 WAR 中的 /WEB-INF 下。

关于java - Servlet容器: how to forbid access to a folder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5156674/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com