Refactor into Spring MVC web app.