title: How to pass String collection from controller to view in Spring MVC
body: <p>I'm trying to use "Tag-it" jQuery UI plugin with Spring MVC</p>
  
  <p>My controller gets list of available tags from DAL and add it to model as attribute:</p>
  
  <pre><code>@RequestMapping(value = "/", method = RequestMethod.GET)
      public String home(Model model){
          DAL dal = new DAL();
          model.addAttribute("FBAppId", ConfigurationManager.getInstance().getFBAppId());
          model.addAttribute("FBAppSecret", ConfigurationManager.getInstance().getFBSecret());
          model.addAttribute("tags", dal.getAllTags());
          return "home";
      }
  </code></pre>
  
  <p>Then I want to read it in view and pass it as list of available tags:</p>
  
  <pre><code>$(document).ready(function() {
  
          $("#myTags").tagit({
              availableTags: '${tags}'
          });
          $.ajaxSetup({ cache: true });
          $.getScript('//connect.facebook.net/en_UK/all.js', function(){
              FB.init({
              appId: '${FBAppId}',
              channelUrl: '//yourapp.com/channel.html',
          });     
          $('#loginbutton,#feedbutton').removeAttr('disabled');
          FB.getLoginStatus(updateStatusCallback);
  
          FB.XFBML.parse();
          });
  
      });
  </code></pre>
  
  <p>However what interpreted is : "[tag1, tag2]" instead of ["tag1", "tag2"]</p>
  
  <p>Does somebody know how to solve this issue?</p>