The JSP (Java Server Pages) 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.
JSP-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.
5.tc4ntiis.zip: Developed by the Jakarta project team of Apache to enable IIS to support Tomcat plug-ins.
Prepare a JSP webpage for testing, open a text editor, such as Notepad, enter the following code, and save it as test. jsp (note that the extension is. jsp ). Reference content is as follows:
- <HTML>
- <HEAD>
- <TITLE> JSP test page </TITLE>
- </HEAD>
- <BODY>
- <% Out. println ("
- </BODY>
- </HTML>
1. Install JSP-related software
Run the j2sdk-00004_000001-windows-i586.exe file in windows and install it in a directory according to the installation wizard, for example, f: \ j2sdk 1.4.1;
2. Add Environment Variables
(1) If your operating system is Win 98, you can use NotePad to directly edit Autoexec. bat and add the following command line: The reference content is as follows:
◆ PATH = % PATH %; f: \ j2sdk1.4.1 \ bin
◆ SET JAVA_HOME = f: \ j2sdk1.4.1
◆ Set classpath = f: \ j2sdk1.4.1 \ lib \ tools. jar
After saving, restart the computer so that the added environment variables will be valid.
(2) If your operating system is Win2000, right-click "my computer ", select "properties"> "system features"> "advanced"> "environment variables" in the pop-up menu. In the displayed environment variables dialog box, you can edit the environment variables of the system. Add three variables: PATH, JAVA_HOME, and CLASSPATH. The variable value is the same as the preceding one. The above is the introduction of JSP-related software
- Summary of redirection Technology in Servlet and JSP
- Notes for connecting JSP to ORACLE databases
- Brief Introduction to advanced operations on JSP Databases
- Solutions to Jsp output of excel documents and Chinese garbled characters
- How to solve the problem of garbled JSP page display