【发布时间】:2021-06-15 21:07:48
【问题描述】:
我有一个使用 websphere 的 java ee-struts 应用程序,如果用户未登录,一切都会受到限制。即使是像 css 和图像这样的静态资源。我想不限制访问 2 件事,style.css 和 @ 987654323@ 文件,以便它们无需注册即可使用。我发现这篇帖子here 显示了如何做到这一点,但我不知道如何编写确切的路径来指定我需要的 2 个资源中的每一个。有人可以根据文件夹向我提供确切的路径我提供的结构?谢谢
这是我拥有的限制一切的代码。这是来自位于我的模块的 WEB-INF 文件夹中的 web.xml 文件。
<security-constraint>
<display-name>ABC_Access<display-name>
<web-resource-collection>
<web-resource-name>All_resources</web-resource-name>
<url-pattern>/*</url-pattern>
<web-resource-collection>
<auth-constraint>
<description>all_authent</description>
<role-name>all</role-name>
</auth-constraint>
</security-constraint>
我的文件夹结构是:
src>main>webapp>WEB-INF>web.xml
>css>style.css
>images>blue_logo.gif
【问题讨论】:
标签: java authentication websphere web.xml