title: Open multiple windows using servlet
body: <p>I have a String Array of URLs coming from a JSP.</p>
  
  <p>Now I want to open each URL in a new tab of the same browser.</p>
  
  <pre><code>protected void doPost(HttpServletRequest request,
          HttpServletResponse response) throws ServletException, IOException {
      String[] urls = request.getParameterValues("URLs");
      String env = request.getParameter("env");
      for (int i = 0; i &lt; urls.length; i++) {
          openInNewTab(urls[i]);
      }
  }
  </code></pre>
  
  <p>So how do I write The method openInNewTab(String Url).
  I am new to servlets and JSP.
  Any help is greatly appreciated.</p>