JSP Concise Tutorial: Contrast and summary _jsp programming

Source: Internet
Author: User
JSP, Ssjs and NAS
JSP does not replace or threaten the status of Ssjs as a Web development platform, and they have their own markets. Although JSP is more powerful and flexible than SSJS, you have to learn java―― at least until a manufacturer launches a simpler language such as JavaScript. At the same time, Ssjs still offers a simple, powerful JavaScript language that is easier to learn than Java and more flexible in some ways, because it can be loosely typed. From the time the NAS was noticed, it was certain that JSP could not replace the powerful functionality provided by NAS. JSP is an advanced expression layer technology that can coexist well with the NAS architecture. NAS now uses a unique identity language to build a form-level template. This identification language is somewhat "stubborn" and it does not allow scripting to be added to the page, which is clearly not as flexible as JSP. In NAS4.0, Netscape will introduce JSP as an alternative identifier language to work with the underlying NAS servlet model that is also introduced in NAS4.0. In fact, the presence of JSP is good news for NAS developers.

JSP and XML
JSP has an interesting relationship with XML. On the one hand, you can mix JSP and XML, just like mixed JSP and HTML, so that you dynamically generate XML pages with JSP. In other words, you can use JSP to write the original XML document. JSP provides this functionality in several special classes, but this is not unique to it. Theoretically, you can use any scripting language, including CGI, SSJS, and ASP, to dynamically generate XML pages, just as you would generate HTML. It is explicitly stated in the JSP specification that JSP supports the dynamic generation of XML documents, and that this method of generating dynamic content does not violate any XML rules.

On the other hand, the JSP page itself can be interpreted as an XML document. The JSP specification defines XML-applicable tags and XML-not-applicable tags to choose from. For example, a script fragment (written in <%...%>) can also be written between the XML application tags <jsp:sriptlet> and </jsp:scriptlet>. Obviously, when you write JSP code manually, the previous method is easier than the XML format. However, in the IDE (integrated development environment) or other JSP development tools, using the XML writing format makes it easier to generate valid JSP pages. For more information about JSP and XML relationships, see the JSP specification.

Conclusion
JSP must certainly be the concern of a wide variety of web developers, as it is supported not only by the use of tags to the novice programmer, but also by the advanced scripting Writers and Java developers. In fact, other vendors, other than Netscape, have already provided such or such JSP development tools. Although Sun has not officially released the JSP1.0 specification (the JSP1.0 published in this article is only a draft), IBM, Beaweblogic, and Livesystems have implemented JSP in their application servers. Because JSP is an open standard, it allows other languages (such as JavaScript) to replace Java, so it will win more extensive support in the industry. As mentioned earlier, Netscape has announced that NAS4.0 will support JSP and Javaservlets.

JSP's inherent flexibility, support for component-centric programming, and its cross-platform nature make it a perfect complement to Netscape's Cross-platform service system. Since NAS itself is a component-centric, Java-enabled service system, JSP appears to be the ideal form-layer technology to match future versions of NAS. If you are or are about to become a NAS programmer, I strongly recommend that you download the Sun-released JSP reference implementation and learn from it now. This tool is not used as a production software PRODUCT, but you can use it to build and run some simple applications to familiarize yourself with JSP. It also includes some sample programs that will guide you along the path of JSP development together with this article.
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.