Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DataSourceLoader and content-type

    Hello, quick question - going through old code, this one from 2011 :)

    I extend the DataSourceLoader class to ensure utf-8. Is this still needed?

    Code:
    public class MyDataSourceLoader extends DataSourceLoader {
    
        @Override
        public void processRequest(HttpServletRequest request, HttpServletResponse response) {
            try {
                response.setContentType("text/json; charset=UTF-8");
                super.processRequest(request, response);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    #2
    No, this is not necessary.

    Comment

    Working...
    X