Building Dynamic Web sites with JSP (4)

Source: Internet
Author: User
Tags execution functions iis linux
js| Dynamic Eight, technical analysis

Microsoft's ASP technology is also a dynamic web development technology. JSP and ASP form very similar, ASP programmer at a glance can recognize <%%> and <%=%>. But there are a lot of differences that can be found in deep exploration, the main one being the following three points:

1, JSP efficiency and security is higher

ASP to the source form storage, to explain the way to run, each ASP Web page calls need to explain the source code, running efficiency is not high. In addition, the IIS vulnerability has caused many web site source program exposure, including the author of the previous use of ASP developed Web site, the ASP program has been downloaded to the people.

JSP before execution is compiled into the bytecode (byte code), bytecode by the Java Virtual machine (Java Machine) Interpretation of the execution, more efficient than the source interpretation, the server also has bytecode cache mechanism, can improve the access efficiency of bytecode. The first call to the JSP Web page may be a bit slow because it is compiled into a cache and is much faster later. At the same time, the JSP source program is not likely to be downloaded, especially the JavaBean program can be placed in the wrong directory.

2, the JSP component (Component) way is more convenient

ASP extends complex functions through COM, such as file uploads, sending emails, and separating business processing or complex computing into independent reusable modules. JSP achieves the same function expansion through JavaBean.

In the development aspect, the development of COM is far more complex and tedious than JavaBean, it is not difficult to learn ASP, but it is not easy to learn to develop COM. And JavaBean is much simpler, from the above examples in this article can see that the development of JavaBean is very convenient.

In terms of maintenance, COM must be registered on the server, and if the COM program is modified, it must be registered or even shut down and restarted. JavaBean do not need to register, put in the classpath contained in the directory on the line. If JavaBean is modified, then JSWDK and Tomcat now need to shut down and rerun (but not shut down), but the developer has promised to do so in later versions without shutting down the server.

In addition, JavaBean is a complete oop, can easily set up a reusable object library for different business processing functions, such as user Rights control, email automatic reply and so on.

3, the JSP adapts the platform to be more extensive

ASP is currently available only for NT and IIS. Although there are chilisoft Plug-ins under UNIX to support ASP, the ASP itself has limited functionality and must be augmented by a combination of asp+com, which is difficult to implement under UNIX.

JSP is different, almost all platforms are supported Java,jsp+javabean can be all over the platform to the unimpeded. NT under IIS can support JSP through a plug-in such as JRun (http://www3.allaire.com/products/jrun/) or servletexec (http://www.newatlanta.com/). The famous Web server Apache has been able to support JSP. Because Apache is widely used on NT, UNIX, and Linux, JSP has a wider operating platform. Although the NT operating system now occupies a large market share, but the advantages of UNIX in the server is still very large, and the new rise of Linux is not small.

Porting from one platform to another, JSP and JavaBean don't even have to recompile because Java bytecode is standard and platform-independent. The author will be in the NT under the experiment JSP page intact to get Linux under the run up, feel very satisfied.

Ix. Conclusion

To sum up, JSP is a dynamic site to build a sharp weapon, so recommended to the reader, wish you master JSP, to develop excellent website. ASP programmer also Please try, JSP also has session, request, response/out and other objects, try how to personally.

Attached text

Here is an important reference for JSP, interested readers can read further.

Http://java.sun.com/products/jsp/faq.html
Http://www.esperanto.org.nz/jsp/jspfaq.html
Http://www.zdnet.com/pcweek/stories/news/0,4153,410709,00.html
http://developer.netscape.com/viewsource/kuslich_jsp
/kuslich_jsp.html
Http://web2.java.sun.com/products/jsp/jsp-asp.html
Http://www.asptoday.com/articles/19991022.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.