title: Problems With encoding Java Web Project - Using Netbeans 7.3
body: <p>Although this theme is recurrent, and even though I'm two days trying to solve this problem so far failed. </p>
  
  <p>I have a web project, created in NetBeans 7.3, using GlassFish 3.1.2, JSF2.0, EJB3.0 and MySQL </p>
  
  <p>I'm at the beginning of the project and have come across this problem which is as follows: When I input some word with á, à, ã, ç, etc on the inputText, this word is stored with bizarre characters in the database. 
  What I've done to try to resolve: </p>
  
  <p>1 -) I put the project encode to UTF-8. Right click on project> Properties> Encode = UTF-8. 
  2 -) Compile options-enconding = UTF-8. Right click on project> Properties> Compile-encoding = UTF8. 
  3 -) vm-options = Dfile.encoding = UTF-8. Right click on project> Properties> Run =-Dfile.encoding = UTF-8. 
  4 -) private.properties project netbeans, I added the line: runtime.encoding = UTF-8. 
  5 -) changed the netbeans.conf file which is in the installation folder of netbeans, I added the line-J-Dfile.encoding = UTF-8 option in netbeans_default_options. 
  6 -) a table in my database is to encode UTF-8 </p>
  
  <p>By debug I've checked that by the method that saves the object in the database: </p>
  
  <pre><code>public void create(T entity)    
  {  
      getEntityManager().persist(entity);  
  }
  </code></pre>
  
  <p>no problems with String, ie, with accentuation is ok. The problem happens from now on, where I can no longer debug ... </p>
  
  <p>I edited the connection pool's settings of GlassFish on the admin panel with the property characterEncoding = UTF-8.</p>
  
  <p>And finally I edited the jdbc connecion as jdbc:mysql://localhost:3306/igreja?characterEncoding=utf8</p>
  
  <p>I'm going crazy with this bug. Please anyone out there has gone through this? </p>
  
  <p>I thank you in advance!</p>
  
  <p>Daniel</p>