Question: ```
double getDistance(int rssi, int txPower) {
    return Math.pow(10d, ((double) txPower - rssi) / (10 * 2));
}

```

I tried calculating distance between the Bluetooth devices using the above equation. But it returns wrong results. The results are in the format "3.4565216E9". But the results varies from "3.4565216E9" to "9.9645352E9" randomly. Can someone suggest a different method

Answer: 
I ran into this issue as well. The environment we work in requires the STRICT\_SERVLET\_COMPLIANCE be set to true, but the validation of the web.xml was not the driving force behind the requirement. To get around the issue try setting the xmlValidation to false in the conf/context.xml's tag:

```
<Context xmlValidation="false"> ... </Context>

```
Below will address this issue

catalina.properties

org.apache.catalina.STRICT\_SERVLET\_COMPLIANCE=false