title: How to create a xml file at a particular location from the output generated from jsp page
body: <p>sports.jsp:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;%@ page contentType="text/xml;charset=ISO-8859-1" %&gt;
  &lt;% response.setHeader("Content-Disposition", "attachment; filename=\"playlist.xml\""); %&gt;
  &lt;playlist version="1" xmlns = "http://xspf.org/ns/0/"&gt;
     &lt;title&gt;My Band Rocks Your Socks&lt;/title&gt;
     &lt;trackList&gt;
     &lt;%! String[] sports; %&gt;
     &lt;%
        sports = request.getParameterValues("sports");
        if (sports != null)
        {
           for (int i = 0; i &lt; sports.length; i++)
           {
              // out.println (sports[i]);
              String total=sports[i];
              String[] sa=total.split("[,]");
              // String[] sub=new String();
              out.print("&lt;track&gt;");
              for (int j=0;j&lt;sa.length;j++)
              {
                 // out.println(sa[j]);
                 // out.println("sa["+j+"]="+sa[j]);
                 if( j == 0)
                 {
                    out.print("&lt;location&gt;" + sa[0] +"&lt;/location&gt;");
                 }
                 else if (j == 1)
                 {
                    out.print("&lt;image&gt;" + sa[1] +"&lt;/image&gt;");
                 }
                 else if( j==2)
                 {
                    out.print("&lt;title&gt;" + sa[2] +"&lt;/title&gt;");
                 }
              }// end of inner for loop()
              out.print("&lt;/track&gt;");
              //out.println();
           }// end of outer for()
        }
        //else out.println ("&lt;b&gt;none&lt;b&gt;");
     %&gt;
     &lt;/trackList&gt;
  &lt;/playlist&gt;
  </code></pre>
  
  <p>This code is generating an xml file, but it is prompting me to mention the location where to save it.I want to create and store xml file at a particular location without any prompting and each time for the next input values the current xml file should be overwritten.</p>