JavaServer Pages and Servlets: A Comparison

JSP is based on the concept of server-side parsing. A JSP page is an HTML page with Java statements embedded in it. JSP files do not have an extension of .html or .htm but rather a special extension, .jsp. This extension indicates to the server that the file is a JavaServer Page.

When a browser requests a JSP page from the server, the server identifies the page as a JSP page from the extension. The server does not return the JSP file as it is but rather processes it. The processing of the JSP file includes parsing it for special tags in the Java code in the file. The Java code in the JSP page is compiled by the server using a special compiler called a JSP compiler. If no errors are encountered by the ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.