add service and refactor jsp