I have a Servlet project with JSP to which i made a i18n
.
My resources.properties
files are in src/main/resources/
and all working on my PC (Windows 10).
I commited update to git, my friend fetched it, and it is not working. The resource bundle seems like not found. He has bundle var names instead of values.
In JSP i do:
At the top <fmt:setBundle basename="resources"/>
(resources is the bundle name),
and every value replace with <fmt:message key="leftbar.librarian"/>
When i want to change languages from JSP i made:
<c:choose>
<c:when test="${cookie.get('language').value == 'ru'}">
<fmt:setLocale value='ru' scope="session"/>
</c:when>
<c:otherwise>
<fmt:setLocale value='en' scope="session"/>
</c:otherwise>
</c:choose>
<fmt:setBundle basename="resources"/>
and via JS i set cookies from click on button. It is all working on my PC. At three another PC the bundle is not loaded (but without errors).
So, how i should define the bundle in Java, so others can get it?
P.S. I am not used Java code to configure it. All in JSP. But ready to refactor if i am wrong.
Solved. Tomcat not found recources from /resources path. So i had to move bundle to root. Now projects start on all PC`s