I am developing a web application using Primefaces JSF using the XHTML page in that I am not able to retrieve the Arabic data from <p:inputText>
tag to the getter and setter method it is showing as ???? ????
while printing in the console and the same is storing in the MySQL database.
Things that I have tried.
Written this encoding in the filter
@WebFilter("/*") public class CharacterEncodingFilter implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { req.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8"); chain.doFilter(req, resp); }
Mentioned the contentType and Encoding in the
<f:view>
tagadded this in the glassfish-web.xml
<parameter-encoding default-charset="UTF-8"/>
Nothing works for me.