With this method, the browser makes a request for resource A.
Resource A does something and then, sends back a 301 or 302 response code (Moved permanently or moved temporarily) along with a 'Location' HTTP Response Header containing the URL for resource B.
The browser then issues a new request for resource B.
The browser, in this case, is doing the work and knows that it's making a new request
The browser's address window will display the URL for resource B
Because this involves a new request, it is possible for firewalls or proxy servers to dissallow this, causing unexpected behavior in your application (not common these days).
This method can be used to redirect users to resources that are not part of the current context, or even in the same domain.
Because this involves a new request, the original HttpServletRequest object, with all of its parameters and attributes will not be available to resource B. Variables will need to be passed by via the session object (if resource A and B are in the same context) or as querystring variables.
This method is a key part of the Post-Redirect-Get (or PRG) pattern. A technique used to insure that applications deal gracefully with browser refreshed and back button clicks.
Which is better?
This is like asking whether a pen or pencil is better. You need to understand both and decide which is the best tool for the task at hand.
Which is faster?
The forward method, because it involves fewer trips between the browser and server.
This should be the least important consideration when trying to decide which to use.
It is especially important that you don't switch from one to the other in an existing application to try to optimize it without understanding both the difference between the two and exactly what the application is doing with them.
Where can I find some examples or sample code that uses the two?
Because server side forwards are an important part of the Model, View, Controller architecture, you can find examples that use this in any of our CodeBarnservlet applications that teach MVC.
SimpleMvc and SimpleCommand are two of them.