📄 readme_setup.html
字号:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (Win95; U) [Netscape]">
<META NAME="Author" CONTENT="Chad Darby">
<TITLE>Applet and Servlet Communication</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
<TABLE WIDTH="100%" >
<TR>
<TD WIDTH="20%"></TD>
<TD WIDTH="60%">
<CENTER>
<H1>
Applet and Servlet Communication</H1></CENTER>
<CENTER>
<H3>
<FONT COLOR="#000000"><FONT SIZE=+1>By Chád Darby</FONT></FONT> </H3></CENTER>
<CENTER>
<H3>
<FONT SIZE=+0>Java Developer's Journal, September 1998</FONT></H3></CENTER>
</TD>
<TD WIDTH="20%"></TD>
</TR>
</TABLE>
<HR>
<H2>
Installation Guide</H2>
<H3>
1. Setting up Database Connection</H3>
The application requires a database connection.
<P>You can connect to any database that has a JDBC-compliant driver.
By default, this application uses the JDBC-ODBC bridge-driver that is provided
with the JDK 1.1. A sample MS Access database is provided (<B>students.mdb</B>).
<P>1.1 You can use the sample database provided or create your own.
If you create your own, then you should use the following database schema.
You should also populate your database with sample data.
<UL>
<LI>
ID: autonumber</LI>
<LI>
LastName: text</LI>
<LI>
FirstName: text</LI>
<LI>
Email: text</LI>
<LI>
Company: text</LI>
<LI>
CourseTitle: text</LI>
<LI>
CourseLocation: text</LI>
<LI>
CourseStartDate: date/time</LI>
</UL>
1.2 Setup a data source connection (DSN) to your database.
<UL>
<LI>
If you are using a Windows 95/NT platform then select START | SETTINGS
| CONTROL PANEL. Run the 32-bit ODBC program.</LI>
<UL>
<LI>
ADD a new datasource.</LI>
<LI>
Choose the driver type for your database (ie MS Access, SQL Server)</LI>
<LI>
For Data Source Name enter: <B>StudentDatabase</B></LI>
<LI>
Select your database (students.mdb) by navigating the file system or giving
the database server information.</LI>
</UL>
For other platforms, please consult your JDBC driver documentation.</UL>
1.3 <B>Database Parameters.</B> You can provide different database
parameters to the servlet. These parameters are set during the administration
of the servlet.
<UL>
<LI>
dbDriver - name of the database driver class name (default = sun.jdbc.odbc.JdbcOdbcDriver)</LI>
<LI>
dbURL - complete database URL (default = jdbc:odbc:StudentDatabase)</LI>
<LI>
userid - user id (default = <none>)</LI>
<LI>
passwd - password (default = <none>)</LI>
</UL>
<H3>
2. Install the Servlet</H3>
2.1 Copy the file <B>studentdb_server.jar</B> to your web servers
"servlet" directory.
<BR>
<WEB_SERVER_HOME>/servlets
<P>2.2 Add the <B>studentdb_server.jar</B> file to your CLASSPATH.
(very important)
<P>2.3 Start your web server and add your servlet using your web
server's admin tool. Set the following properties:
<UL>
<LI>
servlet name = StudentDBServlet</LI>
<LI>
servlet class = StudentDBServlet</LI>
<LI>
You can configure optional parameters as listed above in step 1.3</LI>
</UL>
<H3>
3. Install the Applet</H3>
3.1 Create a directory in your web server's "public_html" directory,
I'll call it <B>students</B>.
<P>3.2 Copy the file <B>studentdb_client.jar</B> to the <B>students</B>
directory created in step 3.1
<P>3.2 Copy the files <B>index.html</B> and <B>index_no_plugin.html</B>
to the <B>students</B> directory created in step 3.1
<P>3.4 You should have the following files in the <B>students</B>
sub-directory:
<UL>
<LI>
studentdb_client.jar</LI>
<LI>
index.html</LI>
<LI>
index_no_plugin.html</LI>
</UL>
<H3>
4. Test the Applet and Servlet</H3>
<I><B>NOTE:</B> You must use a browser that is fully JDK 1.1 compliant.
I'd recommend that you use Sun's Java Plug-In for best results.</I>
<P>4.1 Make sure your web server is started w/ <B>studentdb_server.jar</B>
in the CLASSPATH.
<P>4.2 Visit your web site <B>http://localhost:8080/students/index.html</B>
<P>4.3 Press the button to display the students. Register a
new student.
<P>4.4 Congrats!
<P>
<HR WIDTH="100%"><!--webbot bot="Include" u-include="../../basic_footer.htm" tag="BODY" startspan -->
<CENTER><FONT SIZE=-2><A HREF="http://www.j-nine.com/main.htm">HOME</A></FONT></CENTER>
<CENTER><FONT SIZE=-2><A HREF="http://www.j-nine.com/services/training.htm">TRAINING</A>
| <A HREF="http://www.j-nine.com/services/consulting.htm">CONSULTING</A>
| <A HREF="http://www.j-nine.com/services/development.htm">DEVELOPMENT</A>
| <A HREF="http://www.j-nine.com/pubs/index.htm">PUBLICATIONS</A> | <A HREF="http://www.j-nine.com/aboutj9.htm">ABOUT</A></FONT></CENTER>
<CENTER><FONT SIZE=-2><A HREF="http://www.j-nine.com/aboutj9.htm#Contacts">REQUEST
INFO</A></FONT></CENTER>
<CENTER><I><FONT SIZE=-1>Copyright © 1998, J9 Consulting</FONT></I></CENTER>
<CENTER><I>August 02, 1998</I></CENTER>
<!--webbot bot="Include" endspan i-checksum="58553" -->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -