title: Exception in Using org.mozilla.universalchardet.UniversalDetector
body: <p>I am writing a jsp page, in which I want to determine the character encoding of request parameters. This is my code:</p>
  
  <pre><code>String name= request.getParameter("hey");
  UniversalDetector detector;
  try{
      detector = new UniversalDetector(null); //Exception is thrown here
  
      detector.handleData(name.getBytes(), 0, name.length());
      detector.dataEnd();
      String encoding = "s";//detector.getDetectedCharset();
      if (encoding != null) {
          out.println("Detected encoding = " + encoding);
      } else {
          out.println("No encoding detected.");
      }
      detector.reset();
  }catch(Throwable e3)
  {
      out.print("Error: Jasper Exception &gt;&gt;"+e3.getMessage()+"&lt;br&gt;");
  }
  </code></pre>
  
  <p>In the second line(which I mentioned) an exception is thrown. The error printed in catch is:</p>
  
  <pre><code>Error: Jasper Exception &gt;&gt;org/mozilla/universalchardet/prober/CharsetProber
  </code></pre>
  
  <p>What should I do?</p>