mainApp must be configured in servlet