Software Name installation package name Download address
J2SDK J2sdk-1_4_2-windows-i586.exe http://java.sun.com/
Jakarta-tomcat Jakarta-tomcat-5.0.28.zip http://jakarta.apache.org/
Apache-tomcat
installation and configuration of J2SDK:
1. My Computer/attribute/Advanced/system environment variable/path
Add "E:\j2sdk1.4.2\bin;";
2. My Computer/attribute/Advanced/system environment variable/java_home
Add "E:\j2sdk1.4.2";
3. My Computer/attribute/Advanced/system environment variable/classpath
Add "e:\j2sdk1.4.2\lib\dt.jar;d:\j2sdk142\lib\tools.jar;d:\j2sdk142\lib;.;";
Note that the following point, which represents the current directory, contains the directory, you can go to any directory to perform the need to use the directory of a class of Java programs;
4. At the command prompt, enter Javac, and a parameter hint indicates that the installation was successful.
Tomcat Installation and configuration:
1. Extract the Jakarta-tomcat-5.0.28.zip file into the E:\tomcat directory
2. My Computer/attribute/Advanced/system environment variable/tomcat_home
Add "E:\tomcat";
3. My Computer/attribute/Advanced/system environment variable/catalina_home
Add "E:\tomcat";
4. Start TomCat: Enter the "D:\TomCat\jakarta-tomcat-5.0.5\bin\" directory
Double-click Startup.bat to start the Tomcat service (double-click Shutdown.bat to turn off the Tomcat service);
5. The input http://localhost:8080 appears Tomcat welcome main interface;
6. Check the configuration of environment variables:
Write time.jsp with Notepad
<%@ page contenttype= "text/html;charset=gb2312"%>
<%@ page import= "java.util.*"%>
<HTML>
<BODY>
<P>
Now the time is:
<% Date Date=new date ();
%>
<BR>
<%=date%>
</BODY>
</HTML>
Store the file time.jsp in: E:\tomcat\webapps\ROOT directory, enter http://localhost:8080/time.jsp
Appear:
Now the time is: XXXXXXXX (the current time on your computer)
Then the tomcat configuration was successful.
Tomcat vs. oracle9i default port conflict resolution:
The Oralce Oracle Servlet engine page appears because the Oracle service input http://localhost:8080 is first opened.
First, modify the port of Tomcat:
Found in E:\tomcat\conf\server.xml:
......
<!--Define a non-ssl Coyote http/1.1 Connector on port 8080-->
<connector port= "8080" maxthreads= "150"
......
Change 8080 to a different port, such as 5555.
Second, modify the oracle9i port:
**************
Tomcat New Virtual directory method:
First, under the WebApps construction:
1. Build folder test;
2.test Web-inf folder under construction;
3.web-inf under the construction of Classes folder;
4. My Computer/attribute/Advanced/system environment variable/classpath plus "E:\tomcat\webapps\test\classes;";
5. Restart Tomcat;
6. Enter http://localhost:5555/test1/oracle.jsp (connect Oracle).
If the connection sqlserver2000 need to drive:
1.web-inf to build Lib folder;
2. Add Msbase.jar,mssqlserver.jar,msutil.jar to Lib;
3. Restart Tomcat;
4. Enter http://localhost:5555/test1/sqlserver.jsp.
Second, under the non-WebApps construction:
(3) Under C disk, open the "Tomcat 4.1" folder, and then open the subdirectory "conf" to find "server.xml" file, open it with Notepad and find "</Host>",
Add this code before </Host>: <context path= "/ZGTT" docbase= "D:\ZGTT" debug= "0" reloadable= "true"
Crosscontext= "true" ></Context>, and then save the file.
(4) Start the Tomcat server (method see "Four, Test Tomcat" (1)).
(5) Enter http://localhost:8080/zgtt/index.jsp link in IE, if see "Hello world! "Indicates that the virtual directory ZGTT settings were successful.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.