[Servlet + JSP programming] common development tools and development environment construction

Source: Internet
Author: User

1. What isServlet?

Background:

In the Client/Server solution, the program can be automatically downloaded to the client and executed. In the past, more people focused on developing the applet and graphical user interface (GUI) components on the client. Applet is indeed an important part of the client/server computing environment, but it is only half of the problem. Now, we need to have an in-depth understanding of the other side of the problem-servlet.

Concept:

Servlet is a server applet written in Java. It can be considered as a server-side applet. The servlet is loaded and executed by the Web server, just as the applet is loaded and executed by the browser. The servlet receives a request from the client (through a web server), executes a job, and then returns the result (may be displayed on the browser's JSP page ).

II,Servlet framework composition (servletapi)

The servlet framework consists of two Java packages: javax. servlet and javax. servlet. HTTP. In our programming, We need to import data at the beginning,

Javax. servlet .*;

Core of the servlet framework: javax. servlet. servlet interface, which must be implemented by all servlets.

The javax. servlet class contains all the interfaces and classes to be implemented. javax. servlet. Http contains all the classes using the HTTP Communication Protocol.

 

Note: The introduction and usage of specific classes are as follows.

 

Iii. Development Tools

JDK: jdk1.6.0 _ 10

Server: C:/tomcat 5.0 (strictly speaking, it should be a Web Container)

Compilation tool: jcreator pro 3.5038513 Chinese version (I used this tool. It supports Chinese display and is downloaded from csdn .)

 

Tomcat settings:

1) create a folder: C:/tomcat 5.0/webapps/myservlet/WEB-INF/classes

2) C:/tomcat 5.0/webapps/myservlet/Add web under the WEB-INF. XML file, you can directly copy C:/tomcat 5.0/webapps/root/WEB-INF under the web. paste the XML file.

3) [import ORACLE data connection component] copy and paste D:/Oracle/ora90/jdbc/lib/classes12.jar to C:/tomcat 5.0/common/lib.

NOTE: If MSSQL is used, you need to copy three components.

 

Jcreator settings:

1. Introduce the servlet package

Click "add" -- "add Archive" (second), select C:/tomcat 5.0/common/lib/servlet-api.jar, and then apply -- OK.

2. Similarly, classes12.jar is introduced.

 

In this way, the servlet + JSP programming environment has been set up. Let's start the servlet + JSP programming journey.

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.