Spring Annotation Based Single Class Web Application with JSP View Resolver

Works on Servlet 3.0+ containers. Better not mix Configuration classes with Controller classes. It is only for simplicity 😉 import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRegistration;   import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.servlet.view.JstlView;   @Configuration @EnableWebMvc @Controller public Read more about Spring Annotation Based Single Class Web Application with JSP View Resolver[…]

jetty: hot redeploy

1 2 3 4 5 6 7 8 9 10 11 12 13 14 <Configure id="Server" class="org.eclipse.jetty.server.Server"> <Ref id="DeploymentManager"> <Call name="addAppProvider"> <Arg> <New class="org.eclipse.jetty.deploy.providers.ContextProvider"> <!– Directory to scan for context descriptors or war files –> <!– <Set name="monitoredDirName"><Property name="jetty.home" default="." />/contexts</Set> –> <Set name="monitoredDirName"><Property name="jetty.home" default="." />/webapps</Set> <Set name="scanInterval">1</Set> </New> </Arg> </Call> </Ref> </Configure><Configure id="Server" Read more about jetty: hot redeploy[…]