Currently, the three most popular dynamic Web page languages are: ASP (Active Server pages), PHP (hypertext Preprocessor), and JSP (Java Server pages).
Both JSP and ASP are programs that can be embedded in HTML, but they are fundamentally different.
(i) Support for Web servers
Most general-purpose web servers, such as Apache, Netscape, and Microsoftiis, support JSP pages, and only Microsoft's own Microsoftiis and Personal Web Server support ASP.
(ii) support for the platform
JSP has platform independence, as long as the general Java program can run the platform to support the JSP program. The Windows platform supports ASPs well, but the ASP's reliance on the WIN32 model makes it difficult to migrate to other platforms.
(iii) Component models
JSP is built on reusable and cross-platform components, and ASP uses a WIN32 COM component model.
(iv) scripting language
JSP can use the Java programming language or JavaScript as the scripting language, while the ASP uses VBScript or JScript as the scripting language.
(v) Security
JSP uses the Java security model, while the ASP uses the WindowsNT security architecture.
(vi) connection to an Access database
JSP uses JDBC to establish a connection to an Access database, and the ASP uses the data acitve Object
(vii) User-defined labels
JSP can be expanded using a custom tag library, but there is no user-defined tag library in the ASP and cannot be expanded.
(eight) efficiency
In the database test, the JSP and ASP execute the insert Update Delete 1000 times in Oracle8 respectively. The JSP takes 13 seconds, and the ASP takes 73 seconds.
The comparison between JSP and PHP
Both JSP and PHP are languages that can be used across platforms, run normally on Windows, UNIX, and Linux Web servers, and support common Web servers such as IIS and Apache. Users change the platform without the need to transform the code, which can be used, but the two are essentially different.
(i) Scope of application
JSP is suitable for large e-commerce sites, can obtain scale support through the Java class and EJB of Sun Java, obtain structure support through Ejb/corba and numerous vendors ' application server, PHP lacks scale support, multi-layer structure support, And the database interface provided is not uniform, making it more suitable for some small commercial sites.
(ii) Database access
JSP through JDBC technology to connect to the database, if a specific database without JDBC driver, only ODBC driver, Java can provide a JDBC-ODBC bridge to convert JDBC to ODBC calls, PHP can be compiled into a variety of database connected functions, It is perfect with the MySQL combination, and developers can write peripheral functions to access the database indirectly. But its database interfaces support one another, unlike Oracle, MySQL, and Sysbase interfaces.
(iii) efficiency
In the database test, the JSP and ASP execute the insert Update Delete 1000 times in Oracle8 respectively. JSP takes 13 seconds, and PHP takes 69 seconds.
Among the three, JSP will be the trend of future development, some of the world's largest e-commerce solution providers using Jsp/servlet. More famous, such as: IBM's e-business, its core is the use of Jsp/servlet server WebSphere.