Configuration of JSP MYSQL Tomcat under Windows System
1 downloaded from sun website jdk1.5 version http://192.18.97.52/ECom/EComTicketServlet/BEGIN7A4284CD66CD005A87083C005C567D8A/-2147483648/603537147/1/531770/531614/603537147/2ts /westCoastFSEND/jdk-1.5.0-oth-JPR / JDK-1.5.0- 3-jpr: 1/jdk-1_5_0-windows-i586.exe2, download Tomcat5.5.4 from Tomcat official station http://www.apache.org/dist/jakarta/tomcat-5// V5.5.4 / bin / jakarta-tomcat-5.5.4.exe3, download MySQL drive from MySQL drive http://mysql.ihostunit.com/downloads/contrib/mm.mysql-2.0.4-bin.jar
1. Before installing JDK, you need to configure the environment variable, add the following environment variables in my computer -> Properties -> Advanced -> Environment Variables -> System Variables (assuming your JDK installation in E: / JDK): So setting Java_Home = E: / JDK then executes the JDK executable, follow the prompts, never never.
You can then write a simple Java program to test whether JDK has been installed successfully: public class test {public static void main (string args []) {system.out.println ("this is a test program);}} The above program is saved as a file called Test.java. Then open the command prompt window, CD to your directory in your test.java, and type the following command javac test.javajava test At this time, if you see this is a test program. If you have successful, if you don't print out This sentence, you need to check your configuration carefully.
Second, executable executive executive of Tomcat is also followed by prompts, start Tomcat. (The same is the same as Apache)
Then enter http: // localhost: 8080 in the browser can see the little cat's illustrative Tomcat installed successfully can correctly parse the JSP file Note If you don't display properly, please check if your machine is in other parts of the 8080 port by other applications. The solution is (1) to change the Tomcat to change a port (2) Turn off the application occupying the 8080 port.
Third, install MySQL driver Before installing MySQL, MYSQL has been installed in your computer (recommended Mysql4.0 or higher version) put mm.mysql-2.0.4-bin.jar in E: / jdk / lib, then set ClassPath = E: /JDK /MM.MYSQL-2.0.4-bin.ja then restart the computer to start Tomcat, save the following of the code to the E: / Tomcat 5.5 / WebApps / root directory (assuming your Tomcat is installed in E) : / Tomcat5.5), file name TestMysql.jsp.