title: How to Pass URL as Path Variable
body: <p>I am trying to pass a URL as a path variable, but when I input the URL as a parameter and access the route, it returns an error. I want to be able to see the address after it passes into the route as a parameter.</p>
  
  <pre><code>@RequestMapping("/addAddress/{address}")
  public String addAddress(@PathVariable("address") String address) {
      System.out.println("Address: "+address)
      return address;
  }
  </code></pre>
  
  <p>For example, if I put into the URL:</p>
  
  <pre><code>localhost:8080/addAddress/http://samplewebsite.com
  </code></pre>
  
  <p>I should see </p>
  
  <pre><code>http://samplewebsite.com 
  </code></pre>
  
  <p>printed out in the back end.</p>