Hide .html and .jsp

In a Java web app, you have three choices for implementing a page: You should always consider using a servlet, regardless of the underlying implementation. Only a servlet can handle all three cases.

It's simple to write a servlet to forward to an HTML or JSP file. In this case, a naming convention is often useful. For example, a URL ending in:

some/path/blah.do
might be mapped internally by a servlet to a file:
..some/path/blah.html
at some location in the app's source tree.

If you always use a servlet (or controller), then the underlying implementation is hidden from the browser. That's a good thing, since it leaves you completely free to change your mind later on, without needing to do extra work for existing bookmarked URLs.

If you choose not to use a servlet, and your URLs end in .html or .jsp, then, if you later change the implementation, you'll need to decide what to do with obsolete links: