The first thing to install is JDK. Taking the Windows NT environment as an example, JSDK downloadable version is an installable compressed file that provides a complete Java development environment.
One installation 1 first installs JDK. Taking the Windows NT environment as an example, JSDK downloadable version is an installable compressed file that provides a complete Java development environment that allows you to build Java solution using standard API as the core. Run the downloaded JDK1_2_2-win.exe, follow the prompts to complete the installation. However, the only thing your server to apply to JSP is the Java compiler. Let the server know the location of the compiler.
2 Modify the system environment parameters, the JDK can be Sun JDK1.2.2 or 1.3, IBM JDK1.1.7 or BluePrint's JDK. If you are installed on Windows98, you set this line set java_home = [x:] / jdk1.2.2 (where [x:] is a hard disk C:, d: et al.) Add to your autoexec.bat; if Yes Windows NT, you can select the path parameter in the control panel / system / environment page and add [x:] / jdk1.2.2.2.2.2.2.2.2.2.2/2, you can add new environment parameters ClassPath = [x:] / jdk1.2.2 / lib /Tools.jar, then reboot.
3 JSWDK installation. Just release jswdk1_0_1-win.zip with directory to the root directory of the hard disk (C: /, D: /, etc.), then you can find / get /jswdk-1.0.1/ directory on your hard drive, if you don't want to keep JSWDK, delete This directory is OK, there is no system file and registry missing problem.
The process of adding more detailed installation and the JDK under Solaris / Unix and Linux, and Tomcat installations can be referred to the installation instructions in the file package. It is worth mentioning that the document such as Readme is carefully read before installation is a good habit.
Two configuration
The JSP code needs to be installed on the server to install the JSP engine. Here we use Sun's JavaServer Web Development Kit (JSWDK). In order to facilitate learning, this package provides a large example of an example of available modification. After installing JSWDK, just execute the startserver.bat command to start the server. On the default configuration, the server port is 8080. Use http: // localhost: 8080 to open the default index.html page, if it can be successfully opened, that is, the configuration has been successfully completed, and the real JSP trip can start.
What needs to be explained is that you will execute startServer.bat every time you boast, you can start the JSP server, which is the program running in the DOS window. If you want to exit, you can execute StopServer.bat.
(If you are a UNIX system, you can perform% StartServer and stopserver, respectively.)
If a problem occurs, the biggest possibility is that the JDK environment parameter is not set correctly, you can check again.
If the 8080 port has been expropriated, you can open the Webserver.xml under the JSWDK directory to re-set this port. (In fact, this file contains all configurations.) The specific is as follows:
That's in other ports.
Opening the JSP page is: http: // localhost: 8080 / examples / xxx.jsp
If you want to build your own execution directory, you can add such settings in the webserver.xml file:
Opening the JSP page is: http: // localhost: 8080 / myWeb / xxx.jsp
Before running the JSP sample page, you can pay attention to install the JSWDK directory, especially the contents of the "Work" subdirectory. When performing an example page, you can see how the JSP page is converted to a Java source file, and then compiled into a Class file (ie, servlet). The sample page in the JSWDK package is divided into two categories, they or the JSP file, or the HTML file containing a form, these forms are processed by JSP code. Like ASP, JAVA code in JSP is executed on the server side. Therefore, using the "View Source File" menu in the browser cannot see the JSP source code, you can only see the result html code. All sample source code is available through a separate "Examples" page.