Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration of jsp+mysql+tomcat under windows system

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

From: http://dev.csdn.net/article/50/50452.shtm

Configuration of jsp+mysql+tomcat under windows system

1. Download the jdk1.5 version from sun website

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-oth-JPR:1/jdk-1_5_0-windows-i586.exe

2. Download the tomcat5.5.4 version from the official tomcat site

Http://www.apache.org/dist/jakarta/tomcat-5/v5.5.4/bin/jakarta-tomcat-5.5.4.exe

3. Download mysql driver from mysql image

Http://mysql.ihostunit.com/Downloads/Contrib/mm.mysql-2.0.4-bin.jar

1. Before installing jdk, you need to configure the environment variables. Add the following environment variables to my computer-> Properties-> Advanced-> Environment variables-> system variables (assuming your jdk is installed in e:jdk):

Then set up JAVA_HOME=e:jdk

Then execute the executable file of jdk and follow the prompts to next all the time on ok.

You can then write a simple java program to test whether jdk has been successfully installed:

Public class Test {

Public static void main (String args []) {

System.out.println ("This is a test program.")

}

}

Save the above program as a file named Test.java.

Then open a command prompt window, cd to your Test.java directory, and type the following command

Javac Test.java

Java Test

At this point, if you see the printed This is a test program. If this sentence is not printed out, you need to check your configuration carefully.

Second, the executable file that executes tomcat is also prompted to next all the way down, then start tomcat. (the same management tools as apache)

Then enter http://localhost:8080 in the browser

If you can see the kitten, it means that tomcat has been successfully installed and the jsp file can be parsed normally.

Note that if it does not display properly, please check whether port 8080 of your machine is occupied by other applications. The solution is to (1) change the port for tomcat and (2) turn off the application that occupies port 8080.

3. Install mysql driver

Make sure you have mysql installed on your computer before installing mysql (version above mysql4.0 is recommended)

Put mm.mysql-2.0.4-bin.jar in e:jdklib

Then set up CLASSPATH=e:jdkmm.mysql-2.0.4-bin.jar

Then restart your computer and start tomcat, and save the following code to the E:Tomcat 5.5webappsROOT directory (assuming your tomcat is installed in e:Tomcat5.5), with the file name testmysql.jsp.

After typing http://localhost:8080/testmysql.jsp in the browser, if a blank is displayed, everything will be fine, otherwise there will be an error prompt.

[@ more@]

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report