title: Struts2 json and ajax integration is not working
body: <p>Here I am trying into integrating Struts 2 with JSON ,jQuery and ajax It is calling to the action class but i am not getting json response. I have added all json plugin and json-defult in struts-xml  </p>
  
  
  
  <p><strong>Ajax function</strong> </p>
  
  <pre class="lang-java prettyprint-override"><code>function callajax() {
      alert(1);
      $.getJSON('edituser.action', function(data) {
          alert(data);
      });
  }
  </code></pre>
  
  <p><strong>Action class.</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.hyva.accounts.master.useraccountsetup;
  
  import com.opensymphony.xwork2.ActionSupport;
  
  /**
   *
   * @author ranjeeth.g
   */
  public class MasterUserSetUpActionEdit extends ActionSupport {
  
      private String username = "ranjith";
      private String password = "1234";
      private String fullname = "Ranjith";
      private String emailaddress = "Ranjith";
      private String telephone = "8762232246";
  
      @Override
      public String execute() {
  //        System.out.println("session = " + session.isOpen());
          return "success";
      }
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      public String getFullname() {
          return fullname;
      }
  
      public void setFullname(String fullname) {
          this.fullname = fullname;
      }
  
      public String getEmailaddress() {
          return emailaddress;
      }
  
      public void setEmailaddress(String emailaddress) {
          this.emailaddress = emailaddress;
      }
  
      public String getTelephone() {
          return telephone;
      }
  
      public void setTelephone(String telephone) {
          this.telephone = telephone;
      }
  }
  </code></pre>
  
  <p>Struts-xml</p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;action name="edituser" class="com.hyva.accounts.master.useraccountsetup.MasterUserSetUpActionEdit"&gt;
              &lt;result type="json"&gt;&lt;/result&gt;
     &lt;/action&gt;
  </code></pre>
  
  <p>Updated code;</p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
  &lt;!DOCTYPE struts PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
          "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
  
  &lt;struts&gt;
      &lt;package name="accounts" namespace="/" extends="hibernate-default,json-default"&gt;    
          &lt;action name="login" class="com.hyva.accounts.userlogin.LoginAction" &gt;
              &lt;interceptor-ref name="defaultStack"&gt;&lt;/interceptor-ref&gt;
              &lt;result name="success"&gt;/index.jsp&lt;/result&gt;
              &lt;result name="error"&gt;/login.jsp&lt;/result&gt; 
              &lt;result name="input"&gt;/login.jsp&lt;/result&gt;          
          &lt;/action&gt; 
  
          &lt;action name="edituser" class="com.hyva.accounts.master.useraccountsetup.MasterUserSetUpActionEdit"&gt;
              &lt;result type="json"&gt;&lt;/result&gt;
          &lt;/action&gt;
  
          &lt;action name="userlist"  class="com.hyva.accounts.master.useraccountsetup.MasterUserSetUpActionList"&gt;
              &lt;result name="success"&gt;/setup_useracount_list.jsp&lt;/result&gt;
          &lt;/action&gt;
  
          &lt;action name="adduser"  class="com.hyva.accounts.master.useraccountsetup.MasterUserSetUpAction"&gt;
              &lt;interceptor-ref name="jsonValidationWorkflowStack"/&gt;
              &lt;result name="input"&gt;/setup_useracount_list.jsp&lt;/result&gt; 
              &lt;result name="success"&gt;/setup_useracount_list.jsp&lt;/result&gt;
          &lt;/action&gt;
          &lt;action name="countryList" method="list" class="com.hyva.accounts.master.country.CountryAction"&gt;
              &lt;result name="success"&gt;/setup_country_list.jsp&lt;/result&gt;
          &lt;/action&gt;
          &lt;action name="addCountry" method="saveOrUpdate" class="com.hyva.accounts.country.CountryAction"&gt;
              &lt;result name="success" type="redirect"&gt;countryList&lt;/result&gt;
          &lt;/action&gt;         
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p><strong>If call to this url i am getting</strong> </p>
  
  <pre class="lang-java prettyprint-override"><code>java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtils
      org.apache.struts2.json.SerializationParams.&lt;init&gt;(SerializationParams.java:57)
      org.apache.struts2.json.JSONResult.writeToResponse(JSONResult.java:214)
      org.apache.struts2.json.JSONResult.execute(JSONResult.java:204)
      com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
      com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
      com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
      com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
      org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
      com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
  </code></pre>