I have a file named 'message.properties' placed on /src/main/resources and it works fine when I try to access its data on any .jsp file inside the /WEB-INF folder.
The thing is: I have a file (404.jsp) placed outside the /WEB-INF folder and I want to use the keys stored inside message.properties, but it cannot find them, giving me errors like "??? key.myKey ???
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="classpath:messages" />
<property name="defaultEncoding" value="UTF-8"/>
</bean>
How can I access the properties file from a file outside the /WEB-INF folder? I've tried changing the base name to "../resoruces/" or something like this, but couldn't solve the problem.
Again: it works fine for every file inside the WEB-INF folder, the issue is only with 404.jsp
Edit: I cannot solve it adding a scriptlet, because inside my 404.jsp I have some includes that need the same keys from message.properties