【发布时间】:2014-12-08 03:09:19
【问题描述】:
我有一个 jsf 应用程序,它使用 servlet 显示来自硬盘的图像,现在我开始使用 spring security 并将我的 xhtml 文件移动到另一个文件夹。现在浏览器找不到图像。
在 servlet 中,我用“/file”定义了映射 url
当我尝试显示我收到此警告时更改文件夹后
No mime type could be found for file /secured/file/repositorio/48/55/56/351/352.jsp
chrome isspector显示的图片url是
http://localhost:8080/WSysGED/secured/file/repositorio/48/55/56/351/352.jpg?pfdrid_c=true
但是如果我输入这个 ulr
http://localhost:8080/WSysGED/file/repositorio/48/55/56/351/352.jpg?pfdrid_c=true
图片显示在浏览器中
我不明白为什么 url 中的 /secured/ 会有所不同,因为 servlet 映射在 /file 之后
在我定义的spring application-context-security.xml文件中
<http pattern="/secured/file/**" security="none" />
因此该文件夹没有任何访问限制
为什么图片没有显示,我该如何解决?
提前感谢您的时间和回答
【问题讨论】:
标签: jsp jsf spring-security