The most detailed JSP configuration practical tutorial

Source: Internet
Author: User

JSPJavaServerPages introduced by Sun is a dynamic web page development technology executed on the server, which is based on Java technology. When executing JSP, you need to set up an engine for compiling JSP Web pages on the Web server. You can configure the JSP environment in multiple ways, but the main task is to install and configure the Web server and JSP Engine. This JSP practical tutorial will show you how to configure.

The following uses Tomcat as the JSP Engine and uses Tomcat, Apache, and IIS as the three Web servers to describe how to build a JSP running environment.

I. Introduction to related software

1. J2SDK: the software development tool of Java2, which is the basis of Java applications. JSP is based on Java technology, so you must install J2SDK before configuring the JSP environment.

2. Apache server: a common Web server developed by Apache to provide Web services.

3. Tomcat server: a JSP engine developed by Apache. It has the Web server function and can be used as an independent Web server. However, as a Web server, Tomcat does not process static HTML pages as quickly as Apache, nor is Apache robust. Therefore, we generally use Tomcat with Apache, apache provides services for website static page requests, while Tomcat, as a dedicated JSP Engine, provides JSP parsing for better performance. Tomcat itself is a sub-project of Apache, so Tomcat provides powerful support for Apache. Tomcat is a good choice for beginners.

4. mod_jk.dll: Developed by the Jakarta project team of Apache to support Tomcat plug-ins. With this plug-in, Tomcat can be seamlessly connected to Apache.

52.16tc4ntiis.zip: this plug-in is developed by the Jakarta project team of Apache to support Tomcat.

2. Software Download

1. j2sdk

Version: j2sdk1.4.1 (35.9 MB)

Address: [url] http://java.sun.com/j2se/1.4.1/download.html#/url]
: [Url] response-
SingleVariationTypeFilter

2. Apache2

Version: apache_2.0.63-win32-x86-no_ssl.msi4.2MB)

Address: [url] http://apache.freelamp.com/httpd/binaries/win32/#/url]

32.16apache-tomcat-4.1.39-le-jdk14.exe

Version: 4.1.398.04MB)

Address: [url] URLs

: [Url] URLs

4. mod_jk2-2.0.43.dll: (148KB)

Address: [url] http://d.download.csdn.net/down/746321/foreverwts#/url]

Iii. software installation and configuration

1. Run the j2sdk-00004_000007-windows-i586.exe file and install JSDK. Assume that the installation directory is D: \ jsdk. The default value is used for all other installation directories,

2. Configure jsdk

New variable name: JAVA_HOME variable value: D: \ jsdk

Create the second system variable: CLASSPATH with the value of.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; % JAVA_HOME % \ bin;

Add % JAVA_HOME % \ bin to the path value of the system environment variable;

Therefore, % JAVA_HOME % \ bin; % SystemRoot % \ system32; % SystemRoot % \ System32 \ Wbem; The setting is complete and must be restarted before it takes effect. Then, you can write a simple java program to test whether the JSDK has been installed successfully:

 
 
  1. publicclassTest{  
  2. publicstaticvoidmain(Stringargs[]){  
  3. System.out.println("Thisisatestprogram.");  
  4. }  

Save the above program as a file named Test. java.
Then open the Command Prompt window, cd to the directory where your Test. java is located, and then type the following command
JavacTest. java
JavaTest

If Thisisatestprogram is printed, the installation is successful.
Print out this sentence, you need to carefully check your configuration.

2.run the apache-tomcat-4.1.39-le-jdk14.exe file in double-click mode to install tomcat. The installation path is D: \ Tomcat4.1. By default, it is the path to automatically go to jsdk.

Add D: \ Tomcat4.1 to the path value of the system environment variable
So % JAVA_HOME % \ bin; % SystemRoot % \ system32; % SystemRoot % \ System32 \ Wbem; D: \ Tomcat4.1

After the configuration is complete, you must restart the machine to make it take effect.

Start tomcat and access [url] http: // localhost: 8080 [/url] in IE. If you see the welcome page of tomcat, the installation is successful. The JSP practical tutorial ends here.

  1. Introduction to several open-source JSP development frameworks
  2. Introduction to JSP development framework FastJSP
  3. Comparison between JSP development framework and Servlet-based Tapestry
  4. Learning the basic concepts of JSP: Nine implicit objects
  5. JSP data paging instance: MySQL Paging

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.