Hello to everyone;
I need information on something.
1. I want to internationalize a web page. I found out that I can do this with a properties file. I researched on the internet and it says that I can use the properties file using the @FacesConfig annotation or faces-config.xml. However,
I found out that in JSF 4.0 there was an update regarding @FacesConfig and the version declaration was removed. Although they say that there is no need for the faces-config.xml file with JSF 4.0. How can I use the properties file?
Properties files used:
src/main/resources/internationalization/localeEN.properties
src/main/resources/internationalization/localeTR.properties
2. It is said that extensionless matching feature is coming. To enable this in the web.xml file, I added the necessary parameters to the web.xml file below. However, it did not activate. Could you please check this file? Am I making a mistake
somewhere?
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="6.0" xmlns=https://jakarta.ee/xml/ns/jakartaee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd>
<context-param>
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>jakarta.faces.AUTOMATIC_EXTENSIONLESS_MAPPING</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>AudioServlet</servlet-name>
<servlet-class>tr.gov.meb.servlets.AudioServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>tr.gov.meb.servlets.ImageServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AudioServlet</servlet-name>
<url-pattern>/AudioServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ImageServlet</servlet-name>
<url-pattern>/ImageServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
<mime-mapping>
<extension>woff2</extension>
<mime-type>application/font-woff2</mime-type>
</mime-mapping>
</web-app>
Tools I use:
NetBeans IDE 20
Eclipse GlassFish 7.0.9
Thank you in advance for your interest.
Mehmet Fatih ÇİN
mfatihcin@xxxxxxxxxxxxxx