title: How does URL-rewriting work?
body: <p>I have read many posts and blogs about rewriting and I know there is a difference between internal server rewriting and redirecting. I am interested in knowing how the internal rewriting works, and how this is done in Java. I am using PrettyFaces for my Java webapplication and it would have been great to know how (in very simple terms ofcourse) your able to look at the request before it is served. Is it a kind of filter that is invoked first?</p>
  
  <p>And last, url rewriting on server is "program" that converts a URL in the rewrite rules to a real resource on the server right? This all happens internally so the user thinks that the address is for a "real" resource? </p>
  
  <p>Thank you.</p>