From Sludgy Goose, 6 Months ago, written in Text.
Embed
  1. targetURL = request.getHeader("User-Agent").indexOf("Mobile") != -1 ? String.valueOf(this.getServletConfig().getInitParameter("spaURL"))
  2.                                 + params.toString() : String.valueOf(this.getServletConfig().getInitParameter("desktopURL")) + params.toString();
  3.                 response.sendRedirect(targetURL);