title: Retrieving parameters in URL with Java
body: <p>I have a little Servlet that uses XSL and XML to generate PDF.
  Since I want to specify the files via URL I need to get those Parameters from there:</p>
  
  <pre><code>localhost/Servlet?xml=c:\xml\test.xml&amp;xsl=c:\xsl\test.xsl
  </code></pre>
  
  <p>so the parameters that I need are</p>
  
  <pre><code> c:\xml\test.xml
   c:\xsl\test.xsl
  </code></pre>
  
  <p>and those need to be read into the variables xml-file and xsl-file.</p>
  
  <p>I have this but that doesn't really help me I guess since I don't know how to apply the values into the variables:</p>
  
  <pre><code>Map para = request.getParameterMap();
  java.util.Iterator it = params.keySet().iterator();
  
  while ( it.hasNext() )
  {
      String key = (String) it.next();
      String value = ((String[]) para.get( key ))[ 0 ];
  }
  </code></pre>
  
  <p>Any idea on how to do that?</p>
  
  <p>Thanks,</p>
  
  <p>TheVagabond</p>