title: URL Rewriting in Java and Spring
body: <p>I am new to Java and spring.I need to know how we can achieve URL rewriting in Java and Spring. For example in .NET environment we can achieve this by using following code:</p>
  
  <p>Global.asax.cs:</p>
  
  <pre><code>protected void Application_BeginRequest(object sender, EventArgs e) {
    try {
      string fullOrigionalpath = Request.Url.ToString();
      if (fullOrigionalpath.Contains("/Home-Page")) {
        Context.RewritePath("~/home.aspx"); return;
      }
    }
  }
  </code></pre>
  
  <p>Similarly,we need to achieve in Java and Spring.</p>
  
  <ol>
  <li>Can we have anything related to this in Java and Spring?     </li>
  <li>If we cannot do using above code,How we can achieve URL Rewriting?</li>
  </ol>
  
  <p>Help would be appreciated.</p>