List of usage examples for javax.servlet GenericServlet GenericServlet
public GenericServlet()
From source file:br.com.bancooriginal.notificacao.servlet.SampleServletApplication.java
@SuppressWarnings("serial") @Bean//w ww.j a va2 s.co m public Servlet dispatcherServlet() { return new GenericServlet() { @Override public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { res.setContentType("text/plain"); res.getWriter().append("Hello World"); } }; }
From source file:org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContext.java
@SuppressWarnings("serial") public GroovyPagesPageContext(Binding pageScope) { this(new GenericServlet() { @Override/*from www . j ava 2 s . com*/ public ServletConfig getServletConfig() { return this; } @Override public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException { // do nothing; } }, pageScope != null ? pageScope : new Binding()); }