EJBs since 3.0 are simple POJOs, so using the beans in the JSP is possible. By evaluating OGNL expression in
"gmathreshold.distinctBnumberRatio"
the corresponding getters and setters will be called. Then you can update the EJB container. DTOs doesn't belong to any container unless you manage them manually or by the another container and also could be used by the presentation layer. Both of them are correct.