title: how to send string array as a response to ajax call from servlet
body: <p>I made a ajax call from my jsp to servlet. when I want to return string then it is working fine. But I want to send response as a String array then its not working. Is it possible that I can send string array from servlet as a ajax response.</p>
  
  <pre><code>  String[] roleAccess=null; 
                response.setContentType("text/html");
                           try{
                              roleAccess=new String[23];
                              roleAccess[0]="";
                              roleAccess[1]="checked";
                              roleAccess[2]="";
  
   response.getWriter().write(roleAccess.toString());---this part I need to change.
  </code></pre>