Tomcat server under win98/2000

Source: Internet
Author: User
Tags mssql mssql server variables variable tomcat tomcat server
Server method One:
System environment:
1. Operating system: Windows Professional
2, Software: JBuilder 4.0
3, Installation path: C:\JBuilder4
This example uses the software:
1, JBuilder (because JBuilder4 has integrated Jdk1.3 and Tomact3.1, and JBuilder increased the ability to develop JSP programs. )
Installation method:
I. Installation of JBuilder
The first step is to install JBuilder to C:\JBuilder4, then the JDK and Tomact are automatically installed under C:\JBuilder4\jdk1.3 and C:\JBuilder4\tomcat;
Step two, update the environment variables
Start-> Setup-> Control Panel-> System-> Advanced-> Environment variable-> System variable
Append Classpath:c:\jbuilder4\jdk1.3\bin\tools.jar; C:\JBuilder4\jdk1.3\lib\dt.jar;
Append path:c:\jbuilder4\jdk1.3; C:\JBuilder4\jdk1.3\bin
Two, set Tomcat
First step, go to C:\JBuilder4\tomcat\bin directory, find startup.bat batch file, open edit
Row: Start with the following two lines:
SET Tomcat_home=c:\jbuilder4\tomcat
SET java_home=c:\jbuilder4\jdk1.3
Step three, double-click Startup.bat to start the Tomcat server
At this point, a DOS window appears on the screen, stops motionless, and there are some running successful tomcat and initialization information to prove that Tomcat is running successfully.
Fourth step, enter http://localhost:8080/or http://127.0.0.1:8080 on the browser
If you can see the Tomcat Version 3.1 page, the Tomcat installation is successful.
There are some examples of JSP and servlet, the JSP environment is completed. Note: The above Stop DOS window cannot be turned off, otherwise the Tomcat server stops serving.
Note: The JSP file runs slowly for the first time



Method Two:
The database server is the default installation of the MSSQL server Ann.
JDK is version 1.4, download page: http://java.sun.com/j2se/1.4/index.html
is also installed in the default manner.
JSP server is Jakarta TomCat 4.0, now the latest is 4.0.4, download page: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4-b2/
or the default installation, to install the JDK first.
Add the following lines to the Autoexec.bat:
Path= "%PATH%"; C:\progra~1\micros~1\80\tools\binn; C:\JDK140; C:\JDK140\BIN
Set java_home=c:\jdk140
Set TOMCAT_HOME=C:\TOMCAT40
SET classpath=.; C:\JDK140\LIB\merlia.jar; C:\JDK140\LIB\dt.jar; C:\JDK140\LIB\tools.jar; C:\JDK140\LIB\htmlconverter.jar
Notice the Merlia.jar inside the classpath, which is the inet JDBC driver, which is type 4.
The following is said JDBC driver, download page is: http://www.inetsoftware.de/English/Produkte/MERLIA/default.htm
Choose Download on the left, then add a table can be downloaded. After downloading is a zip file, I Merlia.jar solution to the Java under the Lib, but also changed the name (because at the beginning of the time out of the problem, I randomly come up with the method, in fact, there is no need. But the blunt knife said, The case should be consistent!).
OK, so far, a JSP server has been done. The method of testing the JSP is: http://localhost:8080, the method of testing the database is: first compile Merlia extract the Classicdriver.java in the catalog of sample ( Javac Classicdriver.java), then run (Java classicdriver>result.txt), and note that you want to start MSSQL server.
Another point to note is that the default port for SQL Server in Classicdriver is 1433, and the default port I install is 1113, which is: Start-> program->mssql server-> server-side Network Utility-> TCP/IP properties, and restart SQL Server after modification.
Configuring Tomcat under Win2000 is actually very simple, as long as you set the Win2000 two environment variables.
Add the following environment variables as follows:
java_home=d:\jdk1.3//directory to install path to JDK
tomcat_home=d:\tomcat4.0//directory against Tomcat installation path
Add d:\jdk1.3\lib\tools.jar;d:\jdk1.3\lib\dt.jar;//directory in classpath to the installation path of JDK
Add d:\jdk1.3\bin;d:\jdk1.3;//directory to the installation path of the JDK in path
All OK, no reboot, you can start Tomcat.



First JSP Example
Name the program test.jsp, and put it in the C:\JBuilder4\tomcat\webapps\test directory.
Enter http://localhost:8080/test/test.jsp in Browser
<title>my the Example!</title>
<body>
<%
String Str = "Hello jsp!";
Out.print ("Hello jsp!");
%>
</body>


Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.