How to redirect page after ajax complete?
<p>My ajax is performing successfully because it deletes the row from database :</p>

<pre><code>    @Controller
    ...
    @ResponseBody
    @RequestMapping(value = "/ajaxDeleteUser", method = RequestMethod.POST)
    public ModelAndView ajaxDelUser(HttpServletRequest request) {
        int userId = Integer.parseInt(request.getParameter("id"));
        userDao.delete(userId);
        return new ModelAndView("redirect:/");
    }
    ...
</code></pre>

<p>At the view :</p>

<pre><code>&lt;c:url value="/" var="home" scope="request" /&gt;
$.ajax({
        data: {"id":data},
        type: "POST",
        url:  "${home}"+"ajaxDeleteUser",
        async: false
});
</code></pre>

<p>The problem is that after the <code>ajax</code> is complete then I saw the row on the list ! So how to redirect to the list actual page after <code>ajax</code> complete ?</p>

<p><strong>UPDATE :</strong></p>

<p>Here is servlet-context.xml :</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&gt;

    &lt;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;

    &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
    &lt;annotation-driven /&gt;

    &lt;!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --&gt;
    &lt;resources mapping="/resources/**" location="/resources/" /&gt;

    &lt;!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --&gt;
    &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
        &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
        &lt;beans:property name="suffix" value=".jsp" /&gt;
    &lt;/beans:bean&gt;

    &lt;context:component-scan base-package="com.ambre.hib" /&gt;

&lt;/beans:beans&gt;
</code></pre>

<p>And here is web.xml :</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;

    &lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
        &lt;param-value&gt;/WEB-INF/spring/root-context.xml&lt;/param-value&gt;
    &lt;/context-param&gt;

    &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
    &lt;listener&gt;
        &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
    &lt;/listener&gt;

    &lt;!-- Processes application requests --&gt;
    &lt;servlet&gt;
        &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
        &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
        &lt;init-param&gt;
            &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
            &lt;param-value&gt;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt;
        &lt;/init-param&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;

    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;

&lt;/web-app&gt;
</code></pre>