News for hackers. Stuff that matters.
Re:Ask HN: Why do sane developers use Spring MVC? by splix on Thursday June 18, 2015 @11:19PM (#9742835)
> Show me your empty -servlet.xml file!

Easy. You don't event need empty one, just in web.xml:

<servlet>

    <servlet-name>spring-dispatcher</servlet-name>

    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

    <init-param>

        <param-name>contextClass</param-name>

        <param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>

    </init-param>

    <init-param>

        <param-name>contextConfigLocation</param-name>

        <param-value>com.mycompany.MyConfig</param-value> <!-- annotated with @Configuration -->

    </init-param>
</servlet>

There are no comments on this comment yet.