The most common answer to why you don't see .jsp extensions in URLs is because (at least with well-developed JEE sites) is that JSP pages are never accessed directly. They form templates or extension points associated to URIs and resolved by some form of controller or filter.
It used to be the case in the early years (pre-serlvlet era) that you would publish JSP-suffixed URLs, but no more.
The standard JEE practice now is to
- have all JSP files under WEB-INF
(thus rendering them
un-referenciable with URLs),
- define one or more controllers that
handles URL requests
- define a mapping of each URL to a
set of resources (JSP pages for
instance)
The controller(s) then know how gather all those resources, compose them together and spit out the HTTP response for a HTTP request.
The reason to do so is to separate the URL from the actual artifacts used to make up the resource. If a user bookmarks your JSP page, you cannot move it or rename it, not unless you break his bookmark or introduce a HTTP redirection. But if you hide your JSPs, you can manage them anytime you want without breaking the URL.
It is pretty much an application of the rules of composition and encapsulation to URLs.
For example, imagine that you have a URL, /hello.
Then you have a header.jsp, a footer.jsp and a body.jsp file under WEB-INF (hidden from the public).
When you send a HTTP request for /hello, the controller behind it will do its magic, composing a HTML page using the header, footer and body jsp pages.
If you later need to add a navigation bar on the left (say navbar.jsp under WEB-INF), you configure your controller to compose a new HTML body using navbar.jsp to create the navigation bar.
You URL remains the same even though you added a new JSP file to its composition.
Another reason for doing so is information hiding and security. There is no reason to advertise to the outside world (or even users inside a corp's intranet) about the technology behind your web application. If you let URLs have JSP suffixes, you are telling the world that JEE is behind the scenes. Even if such knowledge poses no risk, you never want to do that.
Lastly, what happens if you ever want to change technologies, but don't want to break existing URLs? You may have a contractual obligation to keep them alive. Divorcing URLs from technology-specific file extensions will help to do that.
Hope it helps.