public ActionForward displaySearchResults( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { log.debug("Start of displaySearchResults() in " + InternalBSOContactsAction.class.getSimpleName()); //String pageForward = "displayInternalBSOContactsPage"; //ActionForward af = null; List wsineList = null; String searchQuery = request.getParameter("apCode"); log.debug(searchQuery); ReferenceCodeDelegate refDelegate = new ReferenceCodeDelegate(); InternalBSOContactsForm internalBSOContact = (InternalBSOContactsForm) form; // Modify this try { wsineList = refDelegate.getWSINEList("MSP"); String JSONResponse = new Gson().toJson(wsineList); log.info("JSON Response: " + JSONResponse); //PrintWriter out = response.getWriter(); //out.print(JSONResponse); //out.flush(); response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); response.getWriter().write(JSONResponse); } catch (DataException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } log.debug("End of displaySearchResults() in " + InternalBSOContactsAction.class.getSimpleName()); return null; }