I have some properties file in /WEB-INF
. And I want to load it in a JSF managed bean. Is there any way to do that?
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- How to add optgroups to a django ModelMultipleChoi
- PrimeFaces block UI does not work when the compone
- Creating Unknown Number of Beans With Configuratio
相关文章
- Does JavaScript allow getters and setters?
- Notice: Undefined property - how do I avoid that m
- Using the typical get set properties in C#… with p
- Mocking nested properties with mock
- How to allow numbers only using f:validateRegex
- Python - What is a lazy property?
- JSF 2.0: ajax request when press ENTER
- Formatting a double in JSF
Put it in WEB-INF/classes. That is part of the classpath.
Use either
ExternalContext#getResource()
orExternalContext#getResourceAsStream()
wherein you pass the webcontent-relative path.E.g.:
This delegates under the covers to
ServletContext#getResource()
/getResourceAsStream()
.See also: