servlet integration and bug fix