I am writing a jsp page, in which I want to determine the character encoding of request parameters. This is my 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 >>"+e3.getMessage()+"<br>");
}

```

In the second line(which I mentioned) an exception is thrown. The error printed in catch is:

```
Error: Jasper Exception >>org/mozilla/universalchardet/prober/CharsetProber

```

What should I do?