To learn about JQuery, I found an article "use JQuery" on the IBM website and downloaded the sample compression program (jquery. war), because it is designed using JSP, I need to configure the JSP development environment.
1. download Java 5.0 (D: \ Program Files \ Java \ jdk) and Tomcat5.0 (D: \ Program Files \ Java \ Tomcat), and install them by default.
2. Configure the environment variables. Right-click my computer-properties to open system variables. Edit System variables.
JAVA environment Configuration:
Variable name: CLASSPATH; variable value: D: \ Program Files \ Java \ jdk \ lib \ dt. JAR; D: \ Program Files \ Java \ jdk \ lib \ tools. jar;
Variable name: PATH; variable value: D: \ Program Files \ Java \ jdk \ bin;
Variable name: JAVA_HOME, variable name: D: \ Program Files \ Java \ jdk
Tomcat environment Configuration:
Variable name: TOMCAT_HOME; variable value: D: \ Program Files \ Java \ Tomcat
3. Test Tomcat and deploy JSP files
3.1 run D: \ Program Files \ Java \ Tomcat \ bin \ startup. bat, load environment variables, and start the Tomcat server. Open IE and access http: // 127.0.0.1: 8080/. The default image of tomcat is displayed, with a cat.
3.2 download jquery. war is placed in the D: \ Program Files \ Java \ Tomcat \ webapps folder. Right-click the folder and refresh it. Then, jquery is automatically decompressed. on the homepage, visit http: // 127.0.0.1: 8080/jquery.
4. Notes
This is also because of service installation. The following error message occurs when I execute some programs:
Unable to find a javac compiler; com. sun. tools. javac. Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. The error message is that the JAVA_HOME environment variable has not been set, and the reader may have encountered this problem. If this environment variable is set, an error occurs when the service is started, however, enter D: \ Program Files \ Java \ Tomcat \ bin \ startup in the command line. bat can be started but run. I found the reason why it was not read from the JAVA_HOME environment variable during startup in the service, but defined this environment variable in the configuration, so I added the following to Java Options: java. home = D: \ Program Files \ Java \ jdk. If TOMCAT is started again, it will be OK.