At the beginning of some of the tools used to work. The most important is probably installed Eclipse with JBoss Tools. Next ... Well no more, Eclipse itself is enough :-)
Okay, so yes, there are several cases to consider:
- We want to do a connection to the database in UTF-8
- We want to display a static XHTML in UTF-8
- We want to have URLs in UTF-8
Second point.
Here you can help Eclipse. To display a static XHTML in JavaServer Faces (UTF-8), which is built on JBoss Seam, you must file with the JSF is to encode to UTF-8. Now you can put this file in UTF. Oh, one more thing - how to encode in Eclipse? It's easy, from the main menu click File, then Properties, from section Text file properties choose Other and UTF-8 select. Click Apply and OK. Oh, and do it with an open file that you want to encode.
And the last, URL encoding in UTF-8. Here are more combinations. Open a file components.xml and add tag:
<web:character-encoding-filter encoding="UTF-8" override-client="true" url-pattern="*.html" />
Instead, *. html, use your own pattern (default is *. seam). I use the JBoss application server, and it is for this server will further tip. One must set the connector support the processing of URLs with UTF. Generally, this is a setting for Tomcat, so if you have another application server, you probably also will use Tomcat, and the configuration process is similar. Open the file server.xml located in $JBOSS_HOME / server / (your server configuration) / deploy / jbossweb.sar.
See for this part of the file:
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
enableLookups="true" disableUploadTimeout="true"
useBodyEncodingForURI="true" URIEncoding="UTF-8"
scheme="https" secure="true" clientAuth="false"
sslProtocol = "TLS" SSLCertificateKeyFile="${jboss.server.home.dir}/conf/459659.crt"
SSLCertificateFile="${jboss.server.home.dir}/conf/privatekey.pem" />
In your file is certainly a little different this entry, but the two most important fields that you need to add are those that have mark red. Add them, and restart the JBoss AS.
IT Systems Java Developers