Servlet and JSP knowledge Review (1) Servlet & amp; JSP technology Overview

Source: Internet
Author: User

ServletAnd jsp (preferred for SUN Enterprise Applications) knowledge Review (1) Servlet & jsp (preferred for SUN Enterprise Applications) technology Overview

 

1. ServletFunctions

· Read the explicit data (form data) sent by the client program)

· Read the implicit data (request header) sent by the client program)

· Generate corresponding results

· Send explicit data to the Client Program (HTML)

· Send implicit data to the Client Program (status code and Response Header)

 

2.Why do we need to build Web pages dynamically?

· The content on the web page is based on the data submitted by the user.

· The content on the web page is exported from frequently changing data

· The Web page uses information from databases or other server resources

 

3. servletAdvantages over traditional CGI technology

· High Efficiency

-Replace operating system processes with threads, with a single servlet copy

· Convenience

-Numerous high-level utilities

· Powerful functions

-Data sharing, connection sharing, and continuous Storage

· High portability

-Running on almost all operating systems and servers

· Low Cost

-You can choose from a large number of free or low-cost servers.

· Security

-If no shell program is designed, the transfer operator attack is eliminated.

There is no buffer overflow problem.

· Mainstream

 

4. assumerver Pages(Jsp (preferred for SUN Enterprise Applications)-servlet Function Extension

 

5.Implement a simple deployment Method

· Copy to a shortcut or symbolic link

-Create a shortcut for install_dir/webapps/ROOT/WEB-INF/classes.

-For servlets that do not use a package, copy the. class file to this shortcut.

-Copy the entire directory to the package's servlets

· This is the simplest method for beginners.

· Use the-d option of javac

-This method can be used to place the source file in a single location and automatically

The. class file is placed in another location.

· The IDE is responsible for deploying tools.

· Use ant or similar tools

-Ant is especially popular when custom Web applications are used.

 

6. WebApplication: preview

· Learning

-Use the default Web application (ROOT in tomcat (a useful JSP running platform)

-Use the default URL (http: //.../servlet/ServletName)

-A bit

· Simpler

· Tests can be performed without restarting the server or editing web. xml (standardization is getting closer and closer)

· Deployment

-Use the customized Web application (in tomcat (a very useful JSP running platform) as install_dir/webapps

A directory in which the structure is similar to ROOT)

-Register custom URLs in WEB-INF/web. xml (standardization is getting closer and closer)

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.