Prospect of JSP-based e-commerce website development

Source: Internet
Author: User
Tags websphere application server

Separate Web page logic from Web page design and display in JSP development e-commerce websites, and support Reusable Component-based design, making Web-based application development fast and easy. The JSP business website page consists of HTML code and Java code embedded in it. The server processes the Java code after being requested by the client on the e-commerce website page, and then returns the generated HTML page to the browser of the e-commerce website. Java Servlet is the technical basis of JSP in the development of e-commerce websites, and the development of large-scale Web applications requires the cooperation of Java Servlet and JSP. JSP is easy-to-use and fully object-oriented with Java technology. It is platform-independent, secure, and reliable. It mainly targets all features of the Internet.

JSP pages can be contained in a variety of application architectures or models and can be used in a consortium composed of different protocols, components, and formats. JSP-based dynamic information publishing technology is an open and scalable standard for establishing dynamic web pages. No matter what creation tool is used, developers can use JSP pages to create portable Web applications and run them on different Web application servers.

Use JSP to develop the P processor in an e-commerce website to create and compile a Servlet for each JSP file. The processor also generates two files for each JSP file:

(1) java file: contains Java code that can be used for Servlet;

(2) class file: compiled Servlet. The JSP processor places the. java and. class files under the directory servlets \ pagecompile \ JSP_file_path, where JSP_file_path is the directory path of the JSP source file. For example, if the JSP file is in WebSphere \ AppServer \ samples \ Web
The. java and. class files are under the WebSphere \ AppServer \ servlets \ pagecompile \ WebSphere \ App Server \ samples \ WebBank directory .. The file name of the java and. class files is the same. The processor uses a naming convention that includes adding underline characters and suffixes to JSP file names. For example, if the JSP file name is login. jsp, the generated file is _ login_xjsp.java and _ login_xjsp.class.

JSP is used to develop e-commerce websites, including servlet technology extensions. Servlets and JSP are used together for complex Web applications.

A good start in developing e-commerce websites to use Java for Web programming is to learn servlet technology. Even if you plan to use only JSP pages in your Web application, you still need to learn servlet technology. In more complex Web applications, JSP pages are only used for display, while JavaBeans and custom tag libraries are used to embed business logic. That is, you must be proficient in JavaBeans and custom tag libraries.

In JSP development e-commerce websites, JSP files access beans or other components that can send generated dynamic content to the browser. Figure 5-1 illustrates the JSP access model. When the Web server receives a JSP file request, the server sends the request to the WebSphere Application Server. The WebSphere Application Server performs syntax analysis on JSP files and generates the Java source file to be compiled and executed as a Servlet ). Java source file generation and compilation only occur when the Servlet is called for the first time, unless the original JSP file has been updated. In this case, the WebSphere Application Server will detect the updates and rebuild and compile the Servlet before executing them. The browser requests a servletPopulateBeanServlet through an HTML form on a Web page. The servlet creates a dataBean instance named DataBean and calls the JSP file to send the content to the browser. The Servlet example and JSP file example illustrate the JSP access model that enables content separation.

JSP is a relatively new technology and rarely used in China. However, in foreign countries, JSP is already a popular technology, especially for e-commerce websites, mostly using JSP. JSP should be the future development trend. Some big E-commerce solution providers in the world use JSP/Servlet. Ibm e-business is a well-known company. Its core is to use JSP/Servlet Web Sphere. Another famous Western E-commerce software provider, Intershop, its original products Intershop1, 2, 3, and 4 occupy the main share of e-commerce software. Websites using PHP, such as xinlang net sina and Chinaren, are not suitable for large-scale e-commerce sites due to some shortcomings of PHP, it is more suitable for some small commercial sites.

  1. ResultSet problems caused by Microsoft driver in JSP website development
  2. Analysis on the advantages and disadvantages of JSP
  3. Advantages of JSP: Application Scope and Performance Comparison
  4. Flexible Use of JSP and JDBC
  5. How to Use Hidden in JSP webpage creation?

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.