title: How can I pass an angular request throught a spring filter before a validation?
body: <p>I have a XSS Filter in a back app (an app with JAVA, Spring...) and I need to check from a front app (Angularjs) if the input values are ok according to the filter before validate the rest of the content.</p>
  
  <p>So far I have achieved that:</p>
  
  <p>Form (AngularJS) -> Validations (AngularJS) -> Filter (Back, Spring) -> Store</p>
  
  <p>I need: </p>
  
  <p>Form (AngularJS) -> Filter (Back, Spring) -> Validations (AngularJS) -> Store</p>
  
  <pre><code>I have this filter in the back application.
  
  &lt;!--XSS filter--&gt;
  &lt;filter&gt;
      &lt;display-name&gt;XSSFilter&lt;/display-name&gt;
      &lt;filter-name&gt;XSSFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.filter.XSSFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;XSSFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  
  And I need to clean the XSS info
  
  
      $scope.save = function ($event) {
  
      -&gt; Here I need to clean the XSS info
  
      //Validate
      if (!$scope.validate()) {
          manageValidationErrors();
          return;
      }
  </code></pre>