JavaServer Pages (JSPs)
JavaServer Pages (JSPs) are HTML or XML pages with Java code embedded, which enables complex server-side processing, conditionalizing output, and communicating with other objects in your application. JSPs are compiled into servlets, either when installed, or the first time they are called. This makes them available to the application environment as standard objects. They can also be called from a client using a URL. Think of servlets and JSPs as opposite sides of the same coin: each can perform the tasks of the other. Because JSPs are written as HTML files with embedded Java code, they are best suited for layout tasks. Servlets are best suited as central dispatchers for incoming requests. |