How to serve static web pages from a JSF application using Glassfish

不打扰是莪最后的温柔 提交于 2019-12-01 10:47:23

This exact configuration requires a /images/myimages folder relative to the absolute root of the same disk as where the JVM of the webserver is running in. A file foo.png in that folder is then available by http://localhost:8080/contextname/myimages/foo.png.

A common confusion around this setting is that the from attribute is been interpreted as alone the context path in URL and not as an actual subfolder in the dir location. But this is thus not true.

If you're running Glassfish on a Windows environment then you need to specify the disk letter in the dir as well like so dir=C:/images.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!