AngularJs send value to Struts2
<p>i am having some problems to receive a value from angularJS in struts2 action.</p>

<p>The objective is to receive the index of the current image in a carousel.</p>

<p><strong>selectArm.jsp</strong></p>

<pre><code>var app = angular.module('menuAPP', ['ui.bootstrap']);
        app.controller('mainController', function($scope, $http, $window, $location) {
            $scope.hideError=true;
            $scope.show = function() {


                $scope.currentIndex = $('div.active').index() + 1;//Carousel index
                var params = "NSlider :"+ $scope.currentIndex;
                var data = angular.toJson(params)
                $http({
                    method: 'post',
                    url: 'showArm',
                    data: 'NSlider =' + data
                }).success(function(response)
                {
                    post("formShowBrazo");
                });
            };  
</code></pre>

<p><strong>ArmAction.java</strong></p>

<pre><code>import javax.servlet.http.HttpSession;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.Action;

public class BrazoAction implements Action 
{
private static final Logger log = LogManager.getLogger(BrazoAction.class);
private String NSlider;

public String execute() throws Exception {

    HttpSession session = ServletActionContext.getRequest().getSession();

    session.setAttribute("forward","sBrazo");
    String aux = NSlider.split(":")[1]; //Receive "NSlider : {int}"
    session.setAttribute("id_brazo", aux);
    return SUCCESS;
}

public String getNSlider() {
    return NSlider;
}

public void setNSlider(String NSlider) {
    this.nSlider = NSlider;
}
</code></pre>

<p>}</p>

<p>This jsp must show the index of selected picture in the carousel.</p>

<p><strong>showArm.jsp</strong></p>

<pre><code>&lt;body&gt;
    &lt;script src="lib/threejs/three.min.js"&gt;&lt;/script&gt;
    &lt;script src="lib/threejs/OrbitControls.js"&gt;&lt;/script&gt;
    &lt;script src="lib/threejs/dat.gui.min.js"&gt;&lt;/script&gt;
    &lt;script src="lib/threejs/stats.min.js"&gt;&lt;/script&gt;
    &lt;script src="js/webGL.js"&gt;&lt;/script&gt;      
    &lt;%
        out.println(session.getAttribute("id_brazo"));
    %&gt;
    &lt;div id='container' width=800, height=600&gt;  
&lt;/body&gt;
</code></pre>

<p>If I debug the action, I can see that i don't receive any value from angular.</p>

<p><strong>UPDATE</strong>
Changed the json petition, changed the name of get and set and also changed to string the parameter.</p>

<p>Now i receive null value. Still not working well.</p>

<p><strong>UPDATE 2</strong>
Now show the final result. Now works fine.</p>