auto update content ajax struts2 example

There may be a requirement to update some content in web application . I have done this in struts2 and ajax (dojo plugin). I have try many websites but found example that not worked then i have spent time to do this and the following example develops.

Versions that i have use:
Struts2 2.2.3


<%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

        JSP Page auto update

"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "">      success.jsp  error.jsp       
package actions;
import com.opensymphony.xwork2.ActionSupport;
/*** @author Abhishek
public class Update extends ActionSupport{
    public String execute()

   {        System.out.println("1");
         return "success";
  • can u please give me clear example for this

    • Hi Rajesh,
      Thanx for your comment. Please let me know what is not clear in this example?