title: How to pass a url query string containing another url with query strings
body: <p>I'm building a service that takes a complete url as a parameter and then processes the CSV data pointed by that url. So I want to pass the the url of the CSV file as a single parameter after my service url. The whole url I really what it to work is like following,</p>
  
  <p><a href="http://mydomain.com/myservice?CSVUrl=" rel="nofollow">http://mydomain.com/myservice?CSVUrl=</a>"<a href="http://ichart.finance.yahoo.com/table.csv?s=FB&amp;d=1&amp;e=10&amp;f=2014&amp;g=d&amp;a=4&amp;b=18&amp;c=2012&amp;ignore=.csv" rel="nofollow">http://ichart.finance.yahoo.com/table.csv?s=FB&amp;d=1&amp;e=10&amp;f=2014&amp;g=d&amp;a=4&amp;b=18&amp;c=2012&amp;ignore=.csv</a>"</p>
  
  <p>I hope my Java Spring MVC controller can work in following way. The issue is, the CSVUrl string I want to pass as a parameter contains special characters and other query strings that are supposed to be kept as a whole string for the CSVUrl. In addition, the CSVUrl is supposed to be something given by users. So I don't know it in advance. It also give me difficulty to encode it before passing it in the url.</p>
  
  <pre><code>public ModelAndView processCSVFile(@RequestParam String CSVUrl) {
      ModelAndView mav = new ModelAndView();
      CsvDataProcessor csvDataProcessor = new CsvDataProcessor();
      String vizData = csvDataProcessor.getVizDataTableString(CSVUrl);
  
      mav.addObject("csvData", csvData);
      mav.setViewName("myservice.jsp");
  
      return mav;
  }
  </code></pre>
  
  <p>It does not work in this way. How can I make it work? As I searched, I may need use URLEncoder and URLDecoder. But have not figured out how to make it work. Appreciate for any help in advance!</p>