title: Tomcat servlet, redirect all urls to a single webpage
body: <p>I deployed a servlet '<code>csvreports</code>' in tomcat. '<code>index.html</code>' in csvreports picks csv file from <code>data/</code> folder and displays as html table. </p>
  
  <p>The url format is </p>
  
  <pre><code>localhost:8080/csvreports/?csv=test.csv
  </code></pre>
  
  <p>I am parsing the url in <code>index.html</code> to get csv file name and read from <code>/data/test.csv</code> in the code. </p>
  
  <p>Now, the url is changed to like <code>localhost:8080/csvreports/folder1/?csv=test.csv,</code> 
  <code>localhost:8080/csvreports/folder2/?csv=test.csv</code> etc. </p>
  
  <p>folder1 and folder2 gets generated dynamically and assuming the folders are already present in <code>tomcat/webapps/csvreports/</code></p>
  
  <p>I need to execute the same <code>index.html</code> for all urls. My idea is to parse url to get the path and finally use the path to read csv. </p>
  
  <p>I wanted to how to redirect <code>localhost:8080/csvreports/*/?csv=test.csv</code> to a single webpage. </p>
  
  <p>Any other ideas on how to accomplish this would be appreciated. </p>