The Web Module

The web module is the module that enables you to write an web application using the spring-annotation almost without XML, to use it you just need to configure the web.xml

Configuring your web.xml

Just add the following lines in your web.xml file:


















As you can see, except for the contextConfigLocation, it is a vanilla spring-mvc configuration, after that just follow the instruction of the base module and add the following code to your applicationContext.xml or to your dispatcher-servlet.xml:

add the Spring-Annotation Schema to your spring XML file:

<beans xmlns=""




and use the following code:

<import resource="classpath*:applicationContext.xml"/>

<sa:annotation-autoload />


After you have configured your web.xml, you just need to use the web annotations in your beans as follows:


Configures the URL for this controller, must be used in a class that implements the Controller from the springMVC framework


Enables the configuration of more that one URL for the same controller


Your can look at Example 2 or Example 2 with libs to look how to use the basics of this module.